Skip to content

Add support for Jenkins Pipeline jobs#12

Merged
slandelle merged 1 commit intojenkinsci:masterfrom
cprice404:feature/master/compatibility-with-jenkins-pipeline
May 19, 2016
Merged

Add support for Jenkins Pipeline jobs#12
slandelle merged 1 commit intojenkinsci:masterfrom
cprice404:feature/master/compatibility-with-jenkins-pipeline

Conversation

@cprice404
Copy link
Copy Markdown

With these commits, the plugin can now be used from Jenkins Pipeline jobs, by adding a line like this to your pipeline build script:

gatlingArchive()

@cprice404
Copy link
Copy Markdown
Author

Fixes gatling/gatling#3018

@cprice404 cprice404 force-pushed the feature/master/compatibility-with-jenkins-pipeline branch 2 times, most recently from 9797799 to 77165fd Compare May 18, 2016 04:54
</j:forEach>
</ul>
</t:summary>
</j:jelly> No newline at end of file
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

missing empty line?

@slandelle
Copy link
Copy Markdown

Awesome Chris, thanks a lot! We'll give it a try asap and release a new version.
Where did you find a migration documentation?

@cprice404
Copy link
Copy Markdown
Author

cprice404 commented May 18, 2016

Pushed up a commit with the proposed whitespace fixes.

@slandelle I didn't really find any comprehensive docs on migration; it was kind of a combination of asking questions in IRC and on the mailing list, looking at the source code of other plugins and of Jenkins itself, and just trying things out until I understood it. The closest thing to docs that I found was this:

https://github.com/jenkinsci/pipeline-plugin/blob/master/DEVGUIDE.md

That actually has most of the information, it's just written in a way that is pretty hard to understand until you get into the code. This also has some useful information:

https://github.com/jenkinsci/workflow-step-api-plugin

I was planning on writing some kind of blog post / tutorial about the upgrade experience to share with Jenkins and hopefully make things easier for the next person :) That's why I broke it into so many commits.

@slandelle
Copy link
Copy Markdown

not_bad

@slandelle
Copy link
Copy Markdown

@cprice404 Could you please squash your commits into a single one?

This commit refactors the plugin to use more modern Jenkins APIs,
so that it is compatible with the new "Pipeline" jobs.

This means that you can include a line like this in your Jenkins Pipeline
script:

    gatlingArchive()

And the effect will be the same as if you'd added the Gatling post-build
action to your freestyle job; that is, you'll see the Gatling link appear
in the sidebar of both the Project and Build pages, the reports will be
available, the graphs will be visible, etc.
@cprice404 cprice404 force-pushed the feature/master/compatibility-with-jenkins-pipeline branch from f686a84 to 6507e68 Compare May 18, 2016 19:31
@cprice404
Copy link
Copy Markdown
Author

squashed.

@slandelle slandelle merged commit 7f8d6bc into jenkinsci:master May 19, 2016
@slandelle
Copy link
Copy Markdown

Awesome work, thanks!

@jglick
Copy link
Copy Markdown
Member

jglick commented May 19, 2016

Does not make sense to both make GatlingPublisher implement SimpleBuildStep (which makes it show up as an option to the step metastep), and create a dedicated Step. You can do the first if you have no special needs beyond “make what worked in a freestyle project also be available in a Pipeline build”; the second if you wanted to customize the options and behaviors available from Pipeline.

@cprice404
Copy link
Copy Markdown
Author

@jglick is it harmful to support both? e.g. you can trigger the 'archive' functionality either way (though I recgonize that the code paths are slightly different).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants