[ci] Custom revision parameter for Jenkins jobs#3419
[ci] Custom revision parameter for Jenkins jobs#3419dliappis wants to merge 1 commit intoelastic:mainfrom
Conversation
This commit introduces a REVISION parameter (when clicking Build With Parameters) to help running adhoc Jenkins builds with a specific revision.
|
This pull request does not have a backport label. Could you fix it @dliappis? 🙏
NOTE: |
|
SonarQube Quality Gate |
| pipelineManager([ cancelPreviousRunningBuilds: [ when: 'PR' ] ]) | ||
| deleteDir() | ||
| gitCheckout(basedir: "${BASE_DIR}", githubNotifyFirstTimeContributor: true) | ||
| gitCheckout(basedir: "${BASE_DIR}", branches: [[name: "${params.REVISION}"]], githubNotifyFirstTimeContributor: true) |
There was a problem hiding this comment.
This is changing the default behaviour, if REVISION is optional, then, I'd say to keep the default behaviour if empty and checkout the given branch otherwise.
On the other hand, branches is not a valid argument for the gitCheckout -> https://github.com/elastic/apm-pipeline-library/tree/main/vars#gitcheckout
| gitCheckout(basedir: "${BASE_DIR}", branches: [[name: "${params.REVISION}"]], githubNotifyFirstTimeContributor: true) | |
| whenTrue("$REVISION" != "") { | |
| gitCheckout(basedir: "${BASE_DIR}", branch: "${REVISION}", githubNotifyFirstTimeContributor: true) | |
| } | |
| whenFalse("$REVISION" != "") { | |
| gitCheckout(basedir: "${BASE_DIR}", githubNotifyFirstTimeContributor: true) | |
| } |
v1v
left a comment
There was a problem hiding this comment.
This commit introduces a REVISION parameter (when clicking Build With Parameters) to help running adhoc Jenkins builds with a specific revision.
Will creating a PR from any given commit could help with? Or even creating a branch in elastic/elastic-agent for the given commit replace this particular implementation?
By doing so, there is no need to interact with Jenkins but wait for the outcome. If using PRs then, the GitHub comment with the build result could help with.
Just an idea
@v1v This sounds like a great idea! In addition, given that #3411 seems to have addressed the issue that triggered this need, I think it might be best to close this PR. |
💔 Tests Failed
Expand to view the summary
Build stats
Test stats 🧪
Test errors
Expand to view the tests failures
|
🌐 Coverage report
|








This commit introduces a REVISION parameter (when clicking Build With Parameters) to help running adhoc Jenkins builds with a specific revision.
It can be useful for re-producing failures similar to elastic/beats#35803