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 {
|
||||
agent any
|
||||
environment { DOCS = '/var/www/docs' }
|
||||
options { buildDiscarder(logRotator(numToKeepStr: '3')) }
|
||||
stages {
|
||||
stage('Checkout') { steps { checkout scm } }
|
||||
stage('Deploy') {
|
||||
when { branch 'main' }
|
||||
steps { sh 'mkdir -p ${DOCS} && cp -r . ${DOCS}/' }
|
||||
}
|
||||
}
|
||||
pipeline {
|
||||
agent any
|
||||
environment { DOCS = '/var/www/docs' }
|
||||
options { buildDiscarder(logRotator(numToKeepStr: '3')) }
|
||||
stages {
|
||||
stage('Checkout') { steps { checkout scm } }
|
||||
stage('Deploy') {
|
||||
when { branch 'main' }
|
||||
steps { sh 'mkdir -p ${DOCS} && cp -r . ${DOCS}/' }
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Reference in New Issue
Block a user