wrapping all the commands in one script, hope it works?
parent
f8c20541d5
commit
9e5a4069a4
|
|
@ -48,14 +48,15 @@ pipeline {
|
|||
stage('Build deliverable') {
|
||||
steps {
|
||||
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||
sh 'mkdir -p url-shortener'
|
||||
sh 'cp -R !(url-shortener) url-shortener/'
|
||||
sh 'rm -rf url-shortener/features'
|
||||
sh 'rm -rf url-shortener/spec'
|
||||
sh 'rm -rf url-shortener/coverage'
|
||||
sh 'tar -czvf url-shortener.tgz url-shortener/'
|
||||
archiveArtifacts artifacts: 'url-shortener.tgz'
|
||||
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
|
||||
tar -czvf url-shortener.tgz url-shortener/
|
||||
'''
|
||||
}
|
||||
archiveArtifacts artifacts: 'url-shortener.tgz'
|
||||
}
|
||||
}
|
||||
stage('Clean up deliverable') {
|
||||
|
|
|
|||
Loading…
Reference in New Issue