cd script

This commit is contained in:
Primakov Alexandr Alexandrovich 2024-08-04 10:02:54 +03:00
parent c5a16dd2c3
commit 1523bd8f36
2 changed files with 12 additions and 0 deletions

6
cd/Jenkinsfile vendored Normal file
View File

@ -0,0 +1,6 @@
stage ('change folder') {
script {
echo 'CD_DIR=' + CD_DIR
sh "cd ${CD_DIR}";
}
}

View File

@ -7,7 +7,13 @@ stage('install:ci') {
} else {
currentBuild.displayName = "#${BUILD_NUMBER}, branch ${branchName}"
}
if (CD_DIR) {
dir CD_DIR
}
currentBuild.description = "#${BUILD_NUMBER}, branch ${branchName}, tag ${tag ? tag : 'no tag'}\n\n${lastLog}"
echo 'starting installing'
sh "pwd"
sh 'npm ci'
}