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 {
stage('Show the branch 1') {
GIT_BRANCH_LOCAL = sh (
script: "echo $Branch | sed -e 's|origin/||g'",
returnStdout: true
).trim()
stage('Build') {
steps {
sh 'npm install'
sh 'npm build'
}
}
stage('If dev') {
when {
branch 'develop'
}
steps{
echo "Git branch: ${GIT_BRANCH_LOCAL}"
sh '/bin/true'
echo "BRANCH IS: ${env.BRANCH}"
echo "====== its a dev!!! ======"
}
}
stage('If dev') {
when {
branch 'master'
}
steps{
echo "====== its a MASTER!!! ======"
}
}
}