Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: copyArtifactPermission path requires current job without path #1566

Closed
kavilla opened this issue Jan 27, 2022 · 1 comment · Fixed by #1653
Closed

[Bug]: copyArtifactPermission path requires current job without path #1566

kavilla opened this issue Jan 27, 2022 · 1 comment · Fixed by #1653
Labels
bug Something isn't working opensearch-dashboards

Comments

@kavilla
Copy link
Member

kavilla commented Jan 27, 2022

Describe the bug

https://github.com/opensearch-project/opensearch-build/blob/main/jenkins/opensearch-dashboards/distribution-build.jenkinsfile#L13

copyArtifactPermission currently takes the JOB_NAME provided. If you have a job called jobA and run the job from a nested location for example Playground, JOB_NAME will be Playground\jobA. So Jenkins will configure the run to allow permissions from Playground\jobA but Jenkins requires it to be jobA.

To reproduce

Run an OpenSearch Dashboards job from a nested location. Notice the failure similar to this

hudson.AbortException: Unable to find project for artifact copy: Playground/avillk-distribution-build-opensearch-dashboards
This may be due to incorrect project name or permission settings; see help for project name in job configuration.
	at hudson.plugins.copyartifact.CopyArtifact.perform(CopyArtifact.java:452)
	at jenkins.tasks.SimpleBuildStep.perform(SimpleBuildStep.java:123)
	at org.jenkinsci.plugins.workflow.steps.CoreStep$Execution.run(CoreStep.java:99)
	at org.jenkinsci.plugins.workflow.steps.CoreStep$Execution.run(CoreStep.java:69)
	at org.jenkinsci.plugins.workflow.steps.SynchronousNonBlockingStepExecution.lambda$start$0(SynchronousNonBlockingStepExecution.java:47)
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
	at java.lang.Thread.run(Thread.java:748)

Expected behavior

Nested pipelines should be able to copy the artifact.

Screenshots

If applicable, add screenshots to help explain your problem.

Host / Environment

Jenkins

Additional context

No response

Relevant log output

hudson.AbortException: Unable to find project for artifact copy: Playground/avillk-distribution-build-opensearch-dashboards
This may be due to incorrect project name or permission settings; see help for project name in job configuration.
	at hudson.plugins.copyartifact.CopyArtifact.perform(CopyArtifact.java:452)
	at jenkins.tasks.SimpleBuildStep.perform(SimpleBuildStep.java:123)
	at org.jenkinsci.plugins.workflow.steps.CoreStep$Execution.run(CoreStep.java:99)
	at org.jenkinsci.plugins.workflow.steps.CoreStep$Execution.run(CoreStep.java:69)
	at org.jenkinsci.plugins.workflow.steps.SynchronousNonBlockingStepExecution.lambda$start$0(SynchronousNonBlockingStepExecution.java:47)
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
	at java.lang.Thread.run(Thread.java:748)
@kavilla kavilla added bug Something isn't working untriaged Issues that have not yet been triaged opensearch-dashboards and removed untriaged Issues that have not yet been triaged labels Jan 27, 2022
@kavilla
Copy link
Member Author

kavilla commented Feb 28, 2022

Use JOB_BASE_NAME

@kavilla kavilla linked a pull request Mar 14, 2022 that will close this issue
1 task
@kavilla kavilla closed this as completed Mar 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working opensearch-dashboards
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant