test pipeline config - deploy to nginx server
This commit is contained in:
Vendored
+12
@@ -1,11 +1,23 @@
|
|||||||
pipeline {
|
pipeline {
|
||||||
agent any
|
agent any
|
||||||
|
environment {
|
||||||
|
DEPLOY_DIR = '/var/jenkins_home/deployments/personal-website'
|
||||||
|
}
|
||||||
stages {
|
stages {
|
||||||
stage('Checkout') {
|
stage('Checkout') {
|
||||||
steps {
|
steps {
|
||||||
checkout scm
|
checkout scm
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
stage('copy to nginx server') {
|
||||||
|
steps {
|
||||||
|
sh """
|
||||||
|
rm -rf ${DEPLOY_DIR}/*
|
||||||
|
cp -r * ${DEPLOY_DIR}/
|
||||||
|
chmod -R 755 ${DEPLOY_DIR}
|
||||||
|
"""
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
post {
|
post {
|
||||||
failure {
|
failure {
|
||||||
|
|||||||
Reference in New Issue
Block a user