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

[FIXED JENKINS-42753] No more closure translation! #140

Closed
wants to merge 5 commits into from

Conversation

@abayer
Copy link
Member

commented Mar 16, 2017

  • JENKINS issue(s):
  • Description:
    • This enables/fixes a lot of things, here specifically allowing parameters to be referenced in agent { label ... }, though it sadly does not allow use of something from environment at the top level in an agent at the top level (or same for environment/agent at the same stage level) due to JENKINS-41890 taking priority - i.e., we evaluate environment after we evaluate agent. May revisit that later. ANYWAY.
  • Implementation works, all existing tests pass.
  • Ok, technically, all but one - BasicModelTest#libraryObjectInScript is blowing up over import issues. Needs more investigation, may block this whole thing, we'll see!
  • Find more complicated usage patterns, such as those at JENKINS-42777, and make sure those still work too.
  • No, seriously, TEST THE CRAP OUT OF THIS. I'm willing to bet there at least a couple regressions I haven't found due to not having coverage of those particular syntactic quirks, and I am not releasing this until we're 99% confident we've caught every possible regression.
  • Documentation changes:
    • n/a - this is a purely internal change. Any changes in user-facing behavior would be regressions we need to find before we release anyway.
  • Users/aliases to notify:
[FIXED JENKINS-42753] No more closure translation!
This enables/fixes a *lot* of things, here specifically allowing
parameters to be referenced in `agent { label ... }`, though it sadly
does not allow use of something from `environment` at the top level in
an `agent` at the top level (or same for `environment`/`agent` at the
same `stage` level) due to JENKINS-41890 taking priority - i.e., we
evaluate `environment` after we evaluate `agent`. May revisit that
later. ANYWAY.

@abayer abayer added this to the 1.1.2 milestone Mar 16, 2017

abayer added 2 commits Mar 16, 2017
[FIXED JENKINS-42829] Allow references outside pipeline block to work
Now that we're script.evaluate(...)ing everything, we need to be sure
that anything defined elsewhere in the Jenkinsfile outside the
pipeline block is available in that evaluated scope. This...is the
most effective way I can come up with to do so. It has some risks -
something with side effects could be problematic, but that's not a use
case we're keen on supporting anyway.
@abayer

This comment has been minimized.

Copy link
Member Author

commented Mar 17, 2017

Incorporated JENKINS-42829 as well - notes from that commit:

Now that we're script.evaluate(...)ing everything, we need to be sure
that anything defined elsewhere in the Jenkinsfile outside the
pipeline block is available in that evaluated scope. This...is the
most effective way I can come up with to do so. It has some risks -
something with side effects could be problematic, but that's not a use
case we're keen on supporting anyway.

@abayer abayer removed this from the 1.1.2 milestone Mar 28, 2017

@abayer

This comment has been minimized.

Copy link
Member Author

commented Apr 25, 2017

This is a dead attempt, closing.

@abayer abayer closed this Apr 25, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
1 participant
You can’t perform that action at this time.