aboutsummaryrefslogtreecommitdiffstats
path: root/Jenkinsfile
blob: 812f8c180d4e32677f473afca6d3753591c209c7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
def dockerImage = 'silex/emacs:27.1-alpine-dev'

node('docker') {
    checkout scm

    stage('Build') {
        docker.image(dockerImage).inside {
            sh 'make'
            stash includes: 'public/*', name: 'public_html'
        }
    }

    stage('Deploy') {
        docker.image('instrumentisto/rsync-ssh').inside {
            unstash 'public_html'

            withCredentials([file(credentialsId: 'ryuslash.org-deploy-key', variable: 'KEY_FILE')]) {
                sh 'rsync -e "ssh -p 4511 -i $KEY_FILE" -v -c -r --delete public/ "site@ryuslash.org:"'
            }
        }
    }
}