just set it in the script
parent
340614dadc
commit
4587c35806
|
|
@ -45,15 +45,12 @@ pipeline {
|
||||||
stage('Build production deliverable') {
|
stage('Build production deliverable') {
|
||||||
steps {
|
steps {
|
||||||
script {
|
script {
|
||||||
env.ZIP_FILE=sh(script: 'ZIP_FILE="url-shortener_$(date "+%Y-%m-%d_%H-%M-%S").tgz"', returnStdout: true)
|
env.ZIP_FILE=sh(script: 'echo "url-shortener_$(date "+%Y-%m-%d_%H-%M-%S").tgz"', returnStdout: true)
|
||||||
}
|
}
|
||||||
|
|
||||||
sh 'echo $ZIP_FILE'
|
|
||||||
sh 'echo ${ZIP_FILE}'
|
|
||||||
sh 'echo ${env.ZIP_FILE}'
|
|
||||||
|
|
||||||
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||||
sh ''' #!/usr/local/bin/bash
|
sh ''' #!/usr/local/bin/bash
|
||||||
|
EXPORT ZIP_FILE="url-shortener_$(date "+%Y-%m-%d_%H-%M-%S").tgz"
|
||||||
|
echo $ZIP_FILE
|
||||||
CUR_DIR=$(pwd)
|
CUR_DIR=$(pwd)
|
||||||
mkdir -p /tmp/url-shortener
|
mkdir -p /tmp/url-shortener
|
||||||
cp -R * /tmp/url-shortener
|
cp -R * /tmp/url-shortener
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue