From da12ce1b10d704b3f5e6936476d535fcd5c9b616 Mon Sep 17 00:00:00 2001 From: Primakov Alexandr Alexandrovich Date: Sun, 4 Aug 2024 10:02:54 +0300 Subject: [PATCH] cd script --- cd/Jenkinsfile | 6 ++++++ install/ci/Jenkinsfile | 6 ++++++ 2 files changed, 12 insertions(+) create mode 100644 cd/Jenkinsfile diff --git a/cd/Jenkinsfile b/cd/Jenkinsfile new file mode 100644 index 0000000..0050626 --- /dev/null +++ b/cd/Jenkinsfile @@ -0,0 +1,6 @@ +stage ('change folder') { + script { + echo 'CD_DIR=' + CD_DIR + sh "cd ${CD_DIR}"; + } +} diff --git a/install/ci/Jenkinsfile b/install/ci/Jenkinsfile index 65cfd3a..522eb67 100644 --- a/install/ci/Jenkinsfile +++ b/install/ci/Jenkinsfile @@ -7,7 +7,13 @@ stage('install:ci') { } else { currentBuild.displayName = "#${BUILD_NUMBER}, branch ${branchName}" } + + if (CD_DIR) { + sh "cd ${CD_DIR}"; + } + currentBuild.description = "#${BUILD_NUMBER}, branch ${branchName}, tag ${tag ? tag : 'no tag'}\n\n${lastLog}" echo 'starting installing' + sh CD_DIR ? "cd ${CD_DIR} && pwd" : "pwd" sh 'npm ci' } \ No newline at end of file