Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.
Sign upDeclarative pipeline and ActiveData submission #293
Conversation
| unstash 'workspace' | ||
| try { | ||
| writeCapabilities(capabilities) | ||
| withCredentials([[ |
This comment has been minimized.
This comment has been minimized.
davehunt
Feb 25, 2017
Member
This is something missing from the new pipeline. I've not done with with a cedentials file, but up on line 18 you could try:
VARIABLES = credentials('MOZILLIANS_VARIABLES')Then on line 24 add it to the PYTEST_ADDOPTS:
"--variables=capabilities.json " +
"--variables=${VARIABLES}"Hopefully that will work.
This comment has been minimized.
This comment has been minimized.
stephendonner
Feb 26, 2017
Author
Contributor
Doesn't seem to, but thanks for the suggestion:
org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed:
WorkflowScript: 25: ""--variables" is not a valid identifier and cannot be used for an environment variable. Identifiers must start with a letter or underscore and can contain only letters, numbers or underscores. @ line 25, column 7.
"--variables=${VARIABLES}"
^
WorkflowScript: 17: Expected name=value pairs @ line 17, column 3.
environment {
^
This comment has been minimized.
This comment has been minimized.
davehunt
Feb 27, 2017
Member
It must be that we can't reference another variable defined within environment. A couple of other suggestions, though it would be good to test these on a replay:
"--variables=${credentials('MOZILLIANS_VARIABLES')}""--variables=" + credentials('MOZILLIANS_VARIABLES')If these don't work, we may need to ask on the Jenkins developer mailing list for advice.
This comment has been minimized.
This comment has been minimized.
davehunt
Feb 27, 2017
Member
I spoke to @abayer and apparently this will be addressed by jenkinsci/pipeline-model-definition-plugin#110. We may need to hold off upgrading this pipeline to declarative for now...
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
stephendonner
Mar 14, 2017
Author
Contributor
@abayer what's the preferred, new way (if there are multiple) of setting this, in a post-1.1.1 Pipeline Model Definition plugin world? Thx!
This comment has been minimized.
This comment has been minimized.
abayer
Mar 15, 2017
Probably something like MOZ_VARS = credentials('MOZILLIAN_VARIABLES') in the environment directive, and then add --variables=${MOZ_VARS} to the PYTEST_ADDOPTS declaration in environment - that should work. I think. =)
|
Staging Jenkins is now on 1.1.1 of Pipeline Model Definition Plugin, but still needs:
|
|
Just a comment to add about known issues with declarative pipelines. |
| } | ||
| stage('Test') { | ||
| environment { | ||
| PYTEST_ADDOPTS = "--color=yes --driver=SauceLabs --variables=capabilities.json --variables=${VARIABLES}" |
This comment has been minimized.
This comment has been minimized.
davehunt
Mar 16, 2017
Member
Once you've opened the two issues, please add comments so we can move this into the main evnironment section and make it more readable by splitting it over multiple lines.
This comment has been minimized.
This comment has been minimized.
| } | ||
| stage('Test') { | ||
| environment { | ||
| /** See https://issues.jenkins-ci.org/browse/JENKINS-42857 - we'd like to expand this out into multi-line concatenations */ |
This comment has been minimized.
This comment has been minimized.
davehunt
Mar 17, 2017
Member
Same comments as other pull requests regarding the issue number, and potential to hold out for the next version of the plugin. Sorry to comment the same in so many places, maybe we should aim to finish this one up before we move onto the others.
| stage('Test') { | ||
| environment { | ||
| /** See https://issues.jenkins-ci.org/browse/JENKINS-42771 - we'd like to expand this out into multi-line concatenations */ | ||
| PYTEST_ADDOPTS = "--color=yes --driver=SauceLabs --variables=capabilities.json --variables=${VARIABLES}" |
This comment has been minimized.
This comment has been minimized.
|
@davehunt final r? |
jrbenny35 left a comment
|
Python file and tox look good! |
Addressed review comments, and had Benny take a look and r+
|
Crud, this broke on our "prod" Jenkins: https://fx-test-jenkins.stage.mozaws.net/job/mozillians.dev/71/console, https://fx-test-jenkins.stage.mozaws.net/job/mozillians.prod/, https://fx-test-jenkins.stage.mozaws.net/job/mozillians.stage/ Going to revert so I don't block @viorelaioia ; sorry for the seemingly premature merge! |
|
Doesn't this require Pipeline Definition Model plugin v1.1.1? I'm not sure we have this installed on our production Jenkins yet. |
stephendonner commentedFeb 25, 2017
•
edited by davehunt
[davehunt]: I removed the original description because this is now ready.