ci: update Jenkinsfile for CI/CD pipeline
This commit is contained in:
parent
0e7458caf1
commit
2d8d4e2ad8
22
Jenkinsfile
vendored
22
Jenkinsfile
vendored
@ -1,12 +1,12 @@
|
|||||||
pipeline {
|
pipeline {
|
||||||
agent any
|
agent any
|
||||||
environment { DOCS = '/var/www/docs' }
|
environment { DOCS = '/var/www/docs' }
|
||||||
options { buildDiscarder(logRotator(numToKeepStr: '3')) }
|
options { buildDiscarder(logRotator(numToKeepStr: '3')) }
|
||||||
stages {
|
stages {
|
||||||
stage('Checkout') { steps { checkout scm } }
|
stage('Checkout') { steps { checkout scm } }
|
||||||
stage('Deploy') {
|
stage('Deploy') {
|
||||||
when { branch 'main' }
|
when { branch 'main' }
|
||||||
steps { sh 'mkdir -p ${DOCS} && cp -r . ${DOCS}/' }
|
steps { sh 'mkdir -p ${DOCS} && cp -r . ${DOCS}/' }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Loading…
Reference in New Issue
Block a user