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

Draft version to support workflow #108

Closed
wants to merge 2 commits into from
Closed

Draft version to support workflow #108

wants to merge 2 commits into from

Conversation

stchar
Copy link

@stchar stchar commented May 18, 2016

  1. Broken backward compatibility to send In-progress status in freestyle project
  2. For testing purpose removed some logic in calling TokenMacro.expandAll(...)
  3. Working fine in jenkins2.0 + pipleine
  4. Tests are not yet updated.

@ssbarnea
Copy link

@headcrabmeat Any updates on this? I am quite interested in reviewing and testing this fix. At this moment it seems that it is not passing CI.

ssbarnea referenced this pull request in jenkinsci/pipeline-examples May 28, 2016
@stchar
Copy link
Author

stchar commented May 30, 2016

@ssbarnea,

CI is broken as some tests are not passed but *.jpi file could be compiled as well.
As I wrote above I'd broken some minor features in free-style project kind.
However you can use this version of the plugin in your Jenkins setup it works well for both pipeline and freestyle.

@ariellevy
Copy link

any news about this pull request?

@PierreBtz
Copy link

PierreBtz commented Jun 14, 2016

@headcrabmeat

I compiled and installed the version with your fix. I can confirm it's working with my freestyle jobs (I did not notice any issue...yet :)).
I also did a test on a pipeline job using the sample you wrote in #92 and it also worked upon modifying the call to match the name of the enum:

public enum StashBuildState {
    SUCCESSFUL, 
    FAILED,
    INPROGRESS,
}

I just noticed the plugin does not appear in the pipeline syntax helper. Anyway thanks for your work!

EDIT:

After some more tests, I found an issue with your patch: there is a crash when trying to save the Jenkins global configuration due to the fact that the new field you added (buildState) does not appear in the json. Please find the full stack attached:

globalConfigStack.txt

@@ -604,6 +626,7 @@ public boolean configure(
prependParentProjectKey = formData.getBoolean("prependParentProjectKey");

disableInprogressNotification = formData.getBoolean("disableInprogressNotification");
buildState = formData.getString("buildState");

Choose a reason for hiding this comment

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

As mentioned in #108, this causes a crash in Jenkins global configuration page. I'm not familiar with Jenkins plugin development, but I'm not sure you have to query the buildState here as this method seems to be used only to keep global configurations.

Copy link
Member

Choose a reason for hiding this comment

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

Also I think this is a bad architectural design to pass the build state to the notifier constructor. That's not a part of configuration, but a part of runtime call

@scaytrase
Copy link
Member

Implemented with #115

@scaytrase scaytrase closed this Aug 5, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants