Jenkins Pipeline (former Workflow) looks like a great way to create a 
specialized build workflow that the standard project types can't do.
Currently I am using Multi-configuration projects leveraging templates 
(Template Plugin) for similar build logic among all projects.

Not all plugins have been updated to support Pipeline: Plugin Compatibility 
with Pipeline 
<https://github.com/jenkinsci/pipeline-plugin/blob/master/COMPATIBILITY.md>. 
Given that Jenkins 2.0 is still fairly new.
This makes it difficult to switch from Multi-configuration to Pipeline. 
Is it possible to utilize the plugin directly in the Pipeline Groovy DSL 
using the Jenkins API? 
For instance like this Groovy script of mine that creates a git tag and 
pushes it to remote.
def build = manager.build
def workspace = build.getWorkspace()
def listener = manager.listener
def environment = build.getEnvironment(listener)

def project = build.getProject()
def gitScm = project.getScm()
GitClient gitClient = gitScm.createClient(listener, environment, build, 
workspace);

def gitTagName = env['NEW_GIT_TAG']
def comment = "\"Jenkins Release Build\""
def remoteURI = new URIish("origin")

gitClient.tag(gitTagName, comment)
gitClient.push().tags(true).to(remoteURI).execute()
Could possibly use GitPublisher for this, but it does not yet support 
Pipeline.

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/b2e5c188-1206-4850-ad97-168f33bacb5b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to