Notes on Jenkinsfile
‘s
agent
tells Jenkins to allocate an executor and workspace for the Pipeline.
More here:
https://jenkins.io/doc/book/pipeline/jenkinsfile/
First draft:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 |
pipeline { agent any stages { stage('Build') { steps { echo 'Building..' } } stage('Test') { steps { echo 'Testing..' } } stage('Deploy') { steps { echo 'Deploying....' echo 'Tar here...' sh 'tar cfz target.tgz *' } } } } |
This creates Build, Test and Deploy stages.