From 7cdd091a6d678ce75a9aa366b71ead580cfd9f4f Mon Sep 17 00:00:00 2001 From: Max Nanis Date: Fri, 27 Jun 2025 13:45:48 +0700 Subject: variable isn't available outside of script block --- Jenkinsfile | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'Jenkinsfile') diff --git a/Jenkinsfile b/Jenkinsfile index c6faaf8..f2d9ef6 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -90,10 +90,11 @@ pipeline { def branch = env.BRANCH_NAME echo "Detected branch: ${branch}" def versioned = "${env.BUILD_DIR}/${env.JS_FILENAME}-${branch}.js" + sh "cp ${env.BUILD_DIR}/${env.JS_FILENAME}.js ${versioned}" + sh "/usr/bin/rsync -v ${env.BUILD_DIR}/${versioned}.js grl-cdn:/root/gr-cdn/" } - sh "/usr/bin/rsync -v ${env.BUILD_DIR}/${versioned}.js grl-cdn:/root/gr-cdn/" } } } @@ -111,11 +112,11 @@ pipeline { def tag = env.TAG_NAME echo "Detected tag: ${tag}" def versioned = "${env.BUILD_DIR}/${env.JS_FILENAME}-${tag}.js" + sh "cp ${env.BUILD_DIR}/${env.JS_FILENAME}.js ${versioned}" + sh "/usr/bin/rsync -v ${env.BUILD_DIR}/${versioned} grl-cdn:/root/gr-cdn/" } - sh "/usr/bin/rsync -v ${env.BUILD_DIR}/${versioned} grl-cdn:/root/gr-cdn/" - } } } -- cgit v1.2.3