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

Option to add a custom message #78

Merged
merged 4 commits into from
May 15, 2015

Conversation

philowest
Copy link
Contributor

Related to issue #49.

Option to include a custom message in the advanced section of the config. Resolves build variables. We use this mostly to include maven variables as shown in the screen shots.

Config:
screen shot 2015-04-07 at 9 08 08 pm

Outcome:
screen shot 2015-04-07 at 9 40 39 pm

@jenkinsadmin
Copy link
Member

Thank you for a pull request! Please check this document for how the Jenkins project handles pull requests

@samrocketman
Copy link
Member

Thanks for submitting this pull request. I don't actively develop this plugin but I do maintain pull requests and releases. I'll leave this PR open a little bit so more eyeballs can look at it. If all turns out well then I'll make it a candidate to merge.

@samrocketman
Copy link
Member

From my quick review and understanding of Java the change seems okay. I'll wait for others to review.

@Brantone
Copy link
Contributor

Brantone commented Apr 8, 2015

For passing variables around : why the need for both includeCustomMessage and customMessage as opposed to just customMessage and do check "if not empty"??
Could still keep the checkbox boolean for property to remember to expand it in Job config.

logger.log(SEVERE, e.getMessage(), e);
}
message.append("\n");
message.append(replaceMacro(customMessage, new VariableResolver.ByMap<String>(buildVariables)));
Copy link
Contributor

Choose a reason for hiding this comment

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

What about using EnvVars expand() ? https://github.com/jenkinsci/jenkins/blob/76adbf922369fae214cf86445d422a424f7d309a/core/src/main/java/hudson/EnvVars.java#L382
If I understand it correctly, would also allow usage of Environment Variables?

@philowest
Copy link
Contributor Author

Thanks for the suggestion - made the change to use the expand method of EnvVars.

With regards to using includeCustomMessage and customMessage, this was done so that the custom message can be disabled/enabled without needing to delete it. So it's more a usability decision, but yes, it does mean that an additional variable needs to be passed around.

@samrocketman
Copy link
Member

Since there was at least one reviewer other than myself I'm moving this into a candidate to merge status. This means I'll merge your change locally, build, and test the functionality of the plugin as best I can. I notice there are merge conflicts with the latest batch of merges. I'll first attempt to resolve those conflicts myself if they're trivial conflicts. If I can't do that then I'll post back for you to resolve the conflict.

@samrocketman
Copy link
Member

I was not able/willing to resolve the conflict adequately. Please rebase or merge in the latest master and resolve the conflicts.

@samrocketman
Copy link
Member

I've changed my mind. I'll open it up for code review a little longer. Also, please update and resolve the merge conflicts.

@samrocketman
Copy link
Member

Code style looks good. I'm going to do some more testing locally and if all looks good then I'll merge.

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.

4 participants