just set it in the script

pull/26/head
Adam Townsend 2023-10-17 17:40:23 -07:00
parent 340614dadc
commit 4587c35806
1 changed files with 3 additions and 6 deletions

9
Jenkinsfile vendored
View File

@ -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