mirror of
https://github.com/muerwre/vault-frontend.git
synced 2025-04-24 20:36:40 +07:00
added jenkins
This commit is contained in:
parent
1de4fbfcea
commit
91e05932e8
1 changed files with 67 additions and 0 deletions
67
Jenkinsfile
vendored
Normal file
67
Jenkinsfile
vendored
Normal file
|
@ -0,0 +1,67 @@
|
|||
def failed = false
|
||||
|
||||
pipeline {
|
||||
agent any
|
||||
|
||||
environment {
|
||||
WWW = "${env.BRANCH_NAME == "master" ? env.ORCHID_STABLE_WWW : env.ORCHID_STAGING_WWW}"
|
||||
ENV = "${env.BRANCH_NAME == "master" ? env.ORCHID_STABLE_ENV : env.ORCHID_STAGING_ENV}"
|
||||
}
|
||||
|
||||
stages {
|
||||
stage('check') {
|
||||
steps {
|
||||
echo "WWW: ${WWW}"
|
||||
echo "ENV: ${ENV}"
|
||||
echo "WORKSPACE: ${WORKSPACE}"
|
||||
sh 'pwd'
|
||||
sh 'ls'
|
||||
|
||||
script {
|
||||
if("${WWW}" == "" || "${ENV}" == "" || ("${env.BRANCH_NAME}" != "master" && "${env.BRANCH_NAME}" != "develop")) {
|
||||
println "INCORRECT VARIABLES"
|
||||
currentBuild.result = 'FAILED'
|
||||
failed = true
|
||||
error "Build failed :-("
|
||||
return
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// stage('copy env') {
|
||||
// steps {
|
||||
// sh "cp -a ${ENV}/. ${WORKSPACE}"
|
||||
// }
|
||||
// }
|
||||
|
||||
// stage('LS') {
|
||||
// steps {
|
||||
// sh "ls -a ./"
|
||||
// sh "ls -a ${ENV}"
|
||||
// sh "ls -a ./src/config"
|
||||
// }
|
||||
// }
|
||||
|
||||
// stage('Build') {
|
||||
// steps {
|
||||
// sh 'npm install'
|
||||
// sh 'npm run build'
|
||||
// }
|
||||
// }
|
||||
|
||||
// stage('deploy') {
|
||||
// when {
|
||||
// // branch 'develop'
|
||||
// expression {
|
||||
// !failed
|
||||
// }
|
||||
// }
|
||||
|
||||
// steps{
|
||||
// sh "rm -rf ${WWW}"
|
||||
// sh "mv ${WORKSPACE}/dist ${WWW}"
|
||||
// }
|
||||
// }
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue