meta data for this page
  •  

This is an old revision of the document!


Pipeline

  • is main Jenkins plugin which act as main build engine
  • replay feature let to run job with modified by hand Jenkinsfile

Jenkinsfile

It is possible to write Jenkinsfile's as Groovy scripts (advanced) or using Declarative Pipeline Syntax.

Scripted pipeline https://jenkins.io/doc/book/pipeline/syntax/#scripted-pipeline

jenkinsfile
node {

https://jenkins.io/doc/pipeline/examples/

Declarative Pipeline

Jenkinsfile
pipeline {
    agent any
}

Global Pipeline Libraries

You may also declare whether scripts need to explicitly request that library (detailed below), or if it is present by default. Furthermore, if you specify a version in Jenkins configuration, you can block scripts from selecting a different version.

https://jenkins.io/blog/2017/10/02/pipeline-templates-with-shared-libraries/

Extending with Shared Libraries

Workspace

/workspace/project@script is checked out on Master only to get Jenkinsfile - it can be safely deleted /workspace/project@2 - folder where build is performed (can be on slave) /workspace/project@tmp - ?