mirror of
https://github.com/muerwre/orchidmap-front.git
synced 2025-04-25 02:56:41 +07:00
test jenkins
This commit is contained in:
parent
b207cdd55c
commit
036dae321f
1 changed files with 7 additions and 18 deletions
25
Jenkinsfile
vendored
25
Jenkinsfile
vendored
|
@ -13,25 +13,27 @@ pipeline {
|
|||
}
|
||||
|
||||
stages {
|
||||
stage('CHECK') {
|
||||
stage('check') {
|
||||
steps {
|
||||
echo "WWW: ${WWW}"
|
||||
echo "ENV: ${ENV}"
|
||||
echo "WORKSPACE: ${env.WORKSPACE},${WORKSPACE}"
|
||||
sh 'pwd'
|
||||
sh 'ls'
|
||||
|
||||
script {
|
||||
if("${WWW}" == "" || "${ENV}" == "" || ("${env.BRANCH_NAME}" != "master" && "${env.BRANCH_NAME}" != "develop")) {
|
||||
if("${WWW}" == "" || "${ENV}" == "" || ("${env.BRANCH_NAME}" != "master" && "${env.BRANCH_NAME}" != "dvelop")) {
|
||||
println "INCORRECT VARIABLES"
|
||||
currentBuild.result = 'FAILED'
|
||||
failed = true
|
||||
error "Build failed :-("
|
||||
return
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
stage('Copy ENV files') {
|
||||
stage('copy env') {
|
||||
steps {
|
||||
sh "cp -a ${ENV}/. ./"
|
||||
}
|
||||
|
@ -52,9 +54,9 @@ pipeline {
|
|||
}
|
||||
}
|
||||
|
||||
stage('Deploy: dev') {
|
||||
stage('deploy') {
|
||||
when {
|
||||
branch 'develop'
|
||||
// branch 'develop'
|
||||
expression {
|
||||
!failed
|
||||
}
|
||||
|
@ -65,18 +67,5 @@ pipeline {
|
|||
sh "mv ./dist ${WWW}"
|
||||
}
|
||||
}
|
||||
|
||||
stage('Deploy: master') {
|
||||
when {
|
||||
branch 'master'
|
||||
expression {
|
||||
!failed
|
||||
}
|
||||
}
|
||||
|
||||
steps{
|
||||
echo "====== its a MASTER!!! ======"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue