-
-
Notifications
You must be signed in to change notification settings - Fork 70
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
feat: add support for jenkins-helper git ref when build pipeline #420
Conversation
Thank you for creating a pull request!Please check out the information below if you have not made a pull request here before (or if you need a reminder how things work). Code Quality and Contributing GuidelinesIf you have not done so already, please familiarise yourself with our Contributing Guidelines and Code Of Conduct, even if you have contributed before. TestsGithub actions will run a set of jobs against your PR that will lint and unit test your changes. Keep an eye out for the results from these on the latest commit you submitted. For more information, please see our testing documentation. In order to run the advanced pipeline tests (executing a set of mock pipelines), it requires an admin to post |
run tests quick 11 |
PR TESTER RESULT ❎ Some pipelines failed or the job was aborted! ❎ |
run tests quick 11 |
PR TESTER RESULT ❎ Some pipelines failed or the job was aborted! ❎ |
run tests quick 11 |
PR TESTER RESULT ✅ All pipelines passed! ✅ |
@@ -626,7 +627,8 @@ class Builder implements Serializable { | |||
try { | |||
context.timeout(time: pipelineTimeouts.API_REQUEST_TIMEOUT, unit: "HOURS") { | |||
// Query the Adopt api to get the "tip_version" | |||
def JobHelper = context.library(identifier: 'openjdk-jenkins-helper@master').JobHelper | |||
String helperRef = DEFAULTS_JSON['repository']['helper_ref'] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Probably needs to check if helper_ref is blank or not set? then default to master?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
or can we assume DEFAULTS_JSON must set it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
so i added it to the pipeline/defaults.json to master as the default value.
see test : https://ci.adoptopenjdk.net/job/build-scripts-pr-tester/job/build-test/job/openjdk11-pipeline/930/parameters/
@zdtsw Should we expect the Test / Groovy GitHub action to pass on this? |
GH action test is based on master's defaults.json which does not have the new helper_ref yet, so the test is expected to get "null" than "master" |
@zdtsw Still seems to be failing the test and the linter... |
close this PR, will add function into #423 |
Fix: #419
As stated in the doc:
You may find that the
RepoHandlerTest.groovy:adoptDefaultsGetterReturns()will fail when you add new values. This is expected as the test is pulling in Adopt's master branch
defaults.jsonwhich does not yet contain the new values. Please inform any reviewers of this in the pull request.
thats why GH action groovy test failed on adoptDefaultsGetterReturns because on master helper_ref does not exist as null