first commit
This commit is contained in:
29
Jenkinsfile
vendored
Normal file
29
Jenkinsfile
vendored
Normal file
@@ -0,0 +1,29 @@
|
||||
pipeline {
|
||||
agent any
|
||||
environment {
|
||||
DEPLOY_PATH = '/var/www/codejava.tech'
|
||||
}
|
||||
stages {
|
||||
stage('Build') {
|
||||
steps {
|
||||
sh 'hugo --minify'
|
||||
}
|
||||
}
|
||||
stage('Deploy') {
|
||||
steps {
|
||||
sh '''
|
||||
rsync -az --delete -e "ssh -o StrictHostKeyChecking=no" \
|
||||
public/ root@172.17.0.1:${DEPLOY_PATH}/
|
||||
'''
|
||||
}
|
||||
}
|
||||
}
|
||||
post {
|
||||
success {
|
||||
echo 'Deployment successful! Visit https://codejava.tech'
|
||||
}
|
||||
failure {
|
||||
echo 'Deployment failed!'
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user