aboutsummaryrefslogtreecommitdiffstats
path: root/Jenkinsfile
blob: 6543c4f88b2279e9b08ceb830953b99f5e676e59 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
pipeline {
    agent { dockerfile true }

    stages {
        stage('Build') {
            sh 'make'
            stash includes: 'public/*', name: 'public_html'
        }

        stage('Deploy') {
            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:public_html/"'
            }
        }
    }
}