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

Jenkins workflow support #7

Closed
wants to merge 2 commits into from
Closed

Conversation

lptr
Copy link

@lptr lptr commented Mar 27, 2015

Added support for Jenkins Workflow, according to this manual:

https://github.com/jenkinsci/workflow-plugin/blob/master/basic-steps/CORE-STEPS.md#adding-support-from-plugins

Not sure what to do with the matrix project dependency. How are dependencies on other plugins handled in Jenkins plugins in general? Is this okay?

@jenkinsadmin
Copy link
Member

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

useUnstable ? regexpForFailed : regexp,
useUnstable ? descriptionForFailed : description);
}

@Override
public boolean perform(AbstractBuild<?, ?> build, Launcher launcher,
Copy link
Member

Choose a reason for hiding this comment

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

This overload can simply be deleted.

@jglick
Copy link
Member

jglick commented Apr 2, 2015

Note that as of 1.4 you can just write

currentBuild.description = 'whatever'

There may still be value in integrating this plugin if it does some special computation of the description that would be awkward to replicate in your script.

jglick added a commit to jenkinsci/pipeline-plugin that referenced this pull request Apr 2, 2015
@lptr
Copy link
Author

lptr commented Apr 2, 2015

Oh, I didn't know about currentBuild, thanks! That solves all my problems. Do you think it's still worth fixing this plugin?

@jglick
Copy link
Member

jglick commented Apr 2, 2015

Do you think it's still worth fixing this plugin?

Not sure. I only know from glancing at its source code what all it does. Seems it has some facility to set a description according to parsing of the log text. Potentially useful, though I think this might be better done by giving you access to the log in currentBuild (ideally more efficiently than loading a multimeg String into memory!), or maybe a custom Workflow step to parse the current build’s log for a supplied regexp, etc. Then you could base decisions on that information using Groovy code. Depends on what people’s use cases are here.

@lptr
Copy link
Author

lptr commented Apr 2, 2015

For my use-case currentBuild.description is already enough functionality. I think exposing the log would be great, too. The only reason I started tempering with this one is that I haven't found documentation on currentBuild. Now searching for it I found it being mentioned in CORE-STEPS.md, but maybe some more explicit mention would be nice. Like listing the description setter plugin in COMPATIBILITY.md with a note saying that you can use currentBuild.description instead.

@lptr lptr closed this Apr 2, 2015
@lptr lptr deleted the jenkins-workflow branch April 2, 2015 20:48
@jglick
Copy link
Member

jglick commented Apr 4, 2015

IIRC the documentation for currentBuild is currently in the inline help for the script textarea.

@jglick
Copy link
Member

jglick commented Apr 4, 2015

But yeah, other mentions would be appropriate.

jglick added a commit to jenkinsci/pipeline-plugin that referenced this pull request Jun 25, 2015
@MarkEWaite MarkEWaite added the enhancement Improvement or new feature label Jan 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Improvement or new feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants