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