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-46252] Mark Declarative jobs with DeclarativeJobAction #222

Merged
merged 2 commits into from Nov 21, 2017

Conversation

Projects
None yet
3 participants
@abayer
Copy link
Member

abayer commented Nov 21, 2017

  • JENKINS issue(s):
  • Description:
    • If we are in a Declarative run, mark the parent job as a Declarative job via DeclarativeJobAction, if it's not already present. Note that we never remove this - if a job was ever once Declarative, we still count it as such. Imperfect, but close enough.
  • Documentation changes:
    • n/a
  • Users/aliases to notify:
[FIXED JENKINS-46252] Mark Declarative jobs with DeclarativeJobAction
If we are in a Declarative run, mark the parent job as a Declarative
job via DeclarativeJobAction, if it's not already present. Note that
we never remove this - if a job was ever once Declarative, we still
count it as such. Imperfect, but close enough.

@abayer abayer added this to the 1.2.5 milestone Nov 21, 2017

@abayer abayer requested review from michaelneale , i386 , rsandell and svanoort Nov 21, 2017

@reviewbybees

This comment has been minimized.

Copy link

reviewbybees commented Nov 21, 2017

This pull request originates from a CloudBees employee. At CloudBees, we require that all pull requests be reviewed by other CloudBees employees before we seek to have the change accepted. If you want to learn more about our process please see this explanation.

@rsandell
Copy link
Member

rsandell left a comment

One way to clean it up would be to also have a marker for every run. and then a runlistener that checked for the marker on the run, and if it is the last build and missing the marker then remove the marker on the job.

@abayer

This comment has been minimized.

Copy link
Member Author

abayer commented Nov 21, 2017

@rsandell Thought about that, decided I'd rather just keep it around forever and not have the additional overhead, especially since I think we may actually want it to be around forever.=)

Had to move job action logic out of runtime parser
Ended up getting some fun StackOverflows if I left it where it was - I
assume because it was trying to load a run record of the run in
question and things just went weird. Anyway, Utils is fine.
@@ -270,7 +272,7 @@ public class Utils {
return nodes
}

static void markExecutedStagesOnAction(CpsScript script, String astUUID) throws Exception {
static void updateRunAndJobActions(CpsScript script, String astUUID) throws Exception {

This comment has been minimized.

@rsandell

rsandell Nov 21, 2017

Member

should be @Restricted but eh.

This comment has been minimized.

@abayer

abayer Nov 21, 2017

Author Member

I should do a whole chunk of that over in #210...

This comment has been minimized.

@abayer

abayer Nov 21, 2017

Author Member

And I did! =)

@abayer abayer merged commit d0a67d2 into jenkinsci:master Nov 21, 2017

1 check passed

continuous-integration/jenkins/pr-merge This commit looks good
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.