I am still having problems with jenkins when coping artifacts from a project that is selected by using a variable value.
I read the question: copy artifacts build step using a dynamic project name alternatives
and I tried it, but, still it doesn't work.
Maybe you could help me find the problem.
Enviroment:
Jenkins ver. 1.460
Copy Artifact Plugin ver. 1.24
User:
luis.ribeiro - all rights in: Overall;Slave;Job;Run;View;SCM;Artifactory
Jenkins Jobs:
build_project_2_0
build_project_1_0
deploy_project
1° Test:
Description: Run deploy_project and copy artifacts from build_project_2_0 and build_project_1_0
Configuration of deploy_project in Copy artifacts from another project:
Project name: build_project_2_0
Which build: Lastest successful build
Stable build only: checked
Artifacts to copy: **/*.war
Target directory: libs/wars
Optional: unchecked
Flatten directories: unchecked
Result:
Copied 5 artifacts from "build_project_2_0" build number 244
The same result when testing with Project name: build_project_1_0
2° Test:
Description: Run deploy_project and copy artifacts from build_project_2_0 and build_project_1_0. But the Project name comes from a parameter.
Configuration of deploy_project:
in This build is parameterized
Parameter type: Choice
Name: project_name_parameter
Choices:
build_project_2_0
build_project_1_0
in Copy artifacts from another project:
Project name: $project_name_parameter
Which build: Lastest successful build
Stable build only: checked
Artifacts to copy: **/*.war
Target directory: libs/wars
Optional: unchecked
Flatten directories: unchecked
Result:
in Copy artifacts from another project under Project name appears this message:
Value references a build parameter, so it cannot be validated.
When running:
Unable to find project for artifact copy: build_project_2_0
This may be due to incorrect project name or permission settings; see help for project name in job configuration.
Build step 'Copy artifacts from another project' marked build as failure
The same when build_project_1_0
3° Test:
Description: Run deploy_project and copy artifacts from build_project_2_0 and build_project_1_0. But the Project name comes from a parameter.
Configuration of deploy_project:
in This build is parameterized
Parameter type: Extended Choice Parameter
Name: project_name_parameter
Parameter Type: Single Select
Value: build_project_2_0
Property Key: build_project_2_0
Default Value: build_project_2_0
Default Property Key: build_project_2_0
Quote Value: checked
in Copy artifacts from another project:
Project name: $project_name_parameter
Which build: Lastest successful build
Stable build only: checked
Artifacts to copy: **/*.war
Target directory: libs/wars
Optional: unchecked
Flatten directories: unchecked
Result:
in Copy artifacts from another project under Project name appears this message:
Value references a build parameter, so it cannot be validated.
When running:
Unable to find project for artifact copy: build_project_2_0
This may be due to incorrect project name or permission settings; see help for project name in job configuration.
Build step 'Copy artifacts from another project' marked build as failure
The same with build_project_1_0
4° Test:
Description: Run deploy_project and copy artifacts from build_project_2_0 and build_project_1_0. But the Project name comes from a parameter.
Configuration of deploy_project:
in This build is parameterized
Parameter type: Extended Choice Parameter
Name: project_name_parameter
Parameter Type: Single Select
Value: build_project_2_0
Property Key: build_project_2_0
Default Value: build_project_2_0
Default Property Key: build_project_2_0
Quote Value: unchecked
in Copy artifacts from another project:
Project name: $project_name_parameter
Which build: Lastest successful build
Stable build only: checked
Artifacts to copy: **/*.war
Target directory: libs/wars
Optional: unchecked
Flatten directories: unchecked
Result:
in Copy artifacts from another project under Project name appears this message:
Value references a build parameter, so it cannot be validated.
When running:
Unable to find project for artifact copy: build_project_2_0
This may be due to incorrect project name or permission settings; see help for project name in job configuration.
Build step 'Copy artifacts from another project' marked build as failure
The same with build_project_1_0
I still didn't get it running, could someone help me with this problem? Thank you in advance, Luis