Setting up a Jenkinsfile to tar and commit a repo to S3

Notes on Jenkinsfile‘s

agenttells Jenkins to allocate an executor and workspace for the Pipeline.

More here:

https://jenkins.io/doc/book/pipeline/jenkinsfile/

First draft:

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.