testing jenkins

This commit is contained in:
Fedor Katurov 2020-03-20 20:24:04 +07:00
parent 3a8d0021cd
commit 5946f1a618

30
Jenkinsfile vendored
View file

@ -6,16 +6,30 @@ pipeline {
} }
stages { stages {
stage('Show the branch 1') { stage('Build') {
GIT_BRANCH_LOCAL = sh ( steps {
script: "echo $Branch | sed -e 's|origin/||g'", sh 'npm install'
returnStdout: true sh 'npm build'
).trim() }
}
stage('If dev') {
when {
branch 'develop'
}
steps{ steps{
echo "Git branch: ${GIT_BRANCH_LOCAL}" echo "====== its a dev!!! ======"
sh '/bin/true' }
echo "BRANCH IS: ${env.BRANCH}" }
stage('If dev') {
when {
branch 'master'
}
steps{
echo "====== its a MASTER!!! ======"
} }
} }
} }