wrapping all the commands in one script, hope it works?

pull/24/head
Adam Townsend 2023-10-16 15:44:50 -07:00
parent f8c20541d5
commit 9e5a4069a4
1 changed files with 8 additions and 7 deletions

15
Jenkinsfile vendored
View File

@ -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') {