Jenkins Pipeline: Plugins that doesn't yet support it

142 views
Skip to first unread message

Sverre Moe

unread,
May 13, 2016, 6:37:01 AM5/13/16
to Jenkins Users
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. 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.
Reply all
Reply to author
Forward
0 new messages