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

Read actionconfigurations of jobData and make it actionable in the job #45

Open
anmolnehru opened this issue Oct 12, 2020 · 0 comments
Open

Comments

@anmolnehru
Copy link

Implement getData() method to grab the actionConfiguration of a job (https://docs.aws.amazon.com/AWSJavaSDK/latest/javadoc/com/amazonaws/services/codepipeline/model/JobData.html
).

==== Use case ====
I'd like to pass custom actionConfiguration via a customAction type from codepipeline and would like Jenkins to read that info and make it available to the job environment via an env variable or equivalent.

For example when creating the custom action I'd like to specify version of an artifact that the job should consume. So this should be encodable in the custom action type created by specifying in the actionConfiguration array like below (specifies aheversion)

"configurationProperties":[
{
"name":"ProjectName",
"required":true,
"key":true,
"secret":false,
"queryable":true,
"description":"Jenkins custom action for CICD",
"type":"String"
},
{
"name":"AHEversion",
"required":true,
"key":true,
"secret":false,
"queryable":false,
"description":"AHE version of the ZenobiaJob run",
"type":"String"
}
]

If this can be read and stored in an env var of the same name scripts can then access this custom data and do something useful. This will make the build parametrizable from the codepipeline stage itself. This will allow reuse of the same stage for triggering builds with different parameters.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant