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 {
|
stages {
|
||||||
stage('CHECK') {
|
stage('check') {
|
||||||
steps {
|
steps {
|
||||||
echo "WWW: ${WWW}"
|
echo "WWW: ${WWW}"
|
||||||
echo "ENV: ${ENV}"
|
echo "ENV: ${ENV}"
|
||||||
|
echo "WORKSPACE: ${env.WORKSPACE},${WORKSPACE}"
|
||||||
sh 'pwd'
|
sh 'pwd'
|
||||||
sh 'ls'
|
sh 'ls'
|
||||||
|
|
||||||
script {
|
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"
|
println "INCORRECT VARIABLES"
|
||||||
currentBuild.result = 'FAILED'
|
currentBuild.result = 'FAILED'
|
||||||
failed = true
|
failed = true
|
||||||
|
error "Build failed :-("
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
stage('Copy ENV files') {
|
stage('copy env') {
|
||||||
steps {
|
steps {
|
||||||
sh "cp -a ${ENV}/. ./"
|
sh "cp -a ${ENV}/. ./"
|
||||||
}
|
}
|
||||||
|
@ -52,9 +54,9 @@ pipeline {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
stage('Deploy: dev') {
|
stage('deploy') {
|
||||||
when {
|
when {
|
||||||
branch 'develop'
|
// branch 'develop'
|
||||||
expression {
|
expression {
|
||||||
!failed
|
!failed
|
||||||
}
|
}
|
||||||
|
@ -65,18 +67,5 @@ pipeline {
|
||||||
sh "mv ./dist ${WWW}"
|
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