diff --git a/jenkinsfile-fullbuild b/jenkinsfile-fullbuild index b9f449b..6f7a44b 100644 --- a/jenkinsfile-fullbuild +++ b/jenkinsfile-fullbuild @@ -17,6 +17,18 @@ pipeline { sonarScan('lab-demo') } } + stage('Package') { + steps { + container('build') { + sh ''' + tar -czf app.tar.gz target/*.jar 2>/dev/null || \ + tar -czf app.tar.gz src/ requirements.txt 2>/dev/null || \ + tar -czf app.tar.gz . + ls -lh app.tar.gz + ''' + } + } + } stage('Publish') { steps { publishArtifact(file: 'app.tar.gz', path: 'demo/1.0.0') @@ -28,4 +40,4 @@ pipeline { } } } -} \ No newline at end of file +}