use tmp as a staging place for building the tgz file
parent
9e5a4069a4
commit
eed17d61a3
|
|
@ -49,11 +49,13 @@ pipeline {
|
|||
steps {
|
||||
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||
sh ''' #!/usr/local/bin/bash
|
||||
mkdir -p url-shortener
|
||||
shopt -s extglob
|
||||
cp -R !(url-shortener) url-shortener/
|
||||
rm -rf url-shortener/features url-shortener/spec url-shortener/coverage
|
||||
CUR_DIR=$(pwd)
|
||||
mkdir -p /tmp/url-shortener
|
||||
cp -R * /tmp/url-shortener
|
||||
rm -rf /tmp/url-shortener/features /tmp/url-shortener/spec /tmp/url-shortener/coverage .git*
|
||||
cd /tmp
|
||||
tar -czvf url-shortener.tgz url-shortener/
|
||||
mv url-shortener.tgz $CUR_DIR
|
||||
'''
|
||||
}
|
||||
archiveArtifacts artifacts: 'url-shortener.tgz'
|
||||
|
|
@ -61,7 +63,7 @@ pipeline {
|
|||
}
|
||||
stage('Clean up deliverable') {
|
||||
steps {
|
||||
sh 'rm -rf url-shortener'
|
||||
sh 'rm -rf /tmp/url-shortener'
|
||||
sh 'rm -rf url-shortener.tgz'
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue