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

Ensure target is reset before loading a jdk pipeline config file #774

Merged
merged 12 commits into from
Aug 11, 2023

Conversation

andrew-m-leonard
Copy link
Contributor

@andrew-m-leonard andrew-m-leonard commented Aug 11, 2023

Fixes #773

When pipeline config is loaded via a groovy "target = load ", target is set to the current groovy binding, and all the variables loaded are set in the groovy variable binding.
When a 2nd load is performed the target return is the same "current groovy binding", thus any previous version loaded variable values will still be set... hence why the jdk21 schedule was being set to the jdk17u schedule!

This PR ensures at the end of each iteration the target binding values are reset.

@andrew-m-leonard andrew-m-leonard self-assigned this Aug 11, 2023
@github-actions
Copy link

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 Guidelines

If you have not done so already, please familiarise yourself with our Contributing Guidelines and Code Of Conduct, even if you have contributed before.

Tests

Github 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 on this PR.
If you are not an admin, please ask for one's attention in #infrastructure on Slack or ping one here.
To run full set of tests, use "run tests"; a subset of tests on specific jdk version, use "run tests quick 11,21"

@github-actions github-actions bot added generation Issues that provide enhancements or fixes to the job generators jenkins-pipeline labels Aug 11, 2023
@andrew-m-leonard
Copy link
Contributor Author

run tests

@eclipse-temurin-bot
Copy link
Collaborator

 PR TESTER RESULT 

✅ All pipelines passed! ✅

Copy link
Member

@sxa sxa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd question whether a try/catch is the nicest way to achieve this, but if we're confident that it fixes the problem I'll give my tentative approval on it (But to be clear I'm not an expert in this area of the code)

@andrew-m-leonard andrew-m-leonard merged commit cedc501 into adoptium:master Aug 11, 2023
6 checks passed
luhenry pushed a commit to luhenry/adoptium-ci-jenkins-pipelines that referenced this pull request Feb 3, 2024
…ptium#774)

* Ensure target is reset before loading a jdk pipeline config file

Signed-off-by: Andrew Leonard <[email protected]>

* Ensure target is reset before loading a jdk pipeline config file

Signed-off-by: Andrew Leonard <[email protected]>

* Ensure target is reset before loading a jdk pipeline config file

Signed-off-by: Andrew Leonard <[email protected]>

* Ensure target is reset before loading a jdk pipeline config file

Signed-off-by: Andrew Leonard <[email protected]>

* Ensure target is reset before loading a jdk pipeline config file

Signed-off-by: Andrew Leonard <[email protected]>

* Ensure target is reset before loading a jdk pipeline config file

Signed-off-by: Andrew Leonard <[email protected]>

* Ensure target is reset before loading a jdk pipeline config file

Signed-off-by: Andrew Leonard <[email protected]>

* Ensure target is reset before loading a jdk pipeline config file

Signed-off-by: Andrew Leonard <[email protected]>

* Ensure target is reset before loading a jdk pipeline config file

Signed-off-by: Andrew Leonard <[email protected]>

* Ensure target is reset before loading a jdk pipeline config file

Signed-off-by: Andrew Leonard <[email protected]>

* Ensure target is reset before loading a jdk pipeline config file

Signed-off-by: Andrew Leonard <[email protected]>

* Ensure target is reset before loading a jdk pipeline config file

Signed-off-by: Andrew Leonard <[email protected]>

---------

Signed-off-by: Andrew Leonard <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
generation Issues that provide enhancements or fixes to the job generators jenkins-pipeline
Projects
None yet
Development

Successfully merging this pull request may close these issues.

buildpipeline generator set trigger even if triggerSchedule_nightly not in the config file
4 participants