Skip to content

Commit

Permalink
feat: cleanup fix
Browse files Browse the repository at this point in the history
  • Loading branch information
SandevDewthilina authored and valenad1 committed Mar 3, 2025
1 parent c3b485d commit 57da264
Showing 1 changed file with 18 additions and 6 deletions.
24 changes: 18 additions & 6 deletions scripts/jenkins/jenkinsfiles/Jenkinsfile-Release
Original file line number Diff line number Diff line change
Expand Up @@ -634,12 +634,24 @@ EOF
try {
pipelineContext.getBuildSummary().addStageSummary(this, CLEANUP_STAGE_NAME, env.BUILD_NUMBER_DIR)
pipelineContext.getBuildSummary().setStageDetails(this, CLEANUP_STAGE_NAME, env.NODE_NAME, env.WORKSPACE)
sh """
cd ${env.BUILD_NUMBER_DIR}
rm -rf target/*.zip
rm -rf h2o-dist
find . -name 'h2odriver-3.*.0.jar' -delete -print
"""
docker.image("alpine:latest").inside("--user=root:root") {
sh """
id
printenv | sort
ls -la
pwd
addgroup -g 1002 jenkins
adduser -D -u 1002 -G jenkins -s /bin/sh jenkins
ls -la ${env.BUILD_NUMBER_DIR}
chown -R jenkins:jenkins ${env.BUILD_NUMBER_DIR}
cd ${env.BUILD_NUMBER_DIR}
ls -la
rm -rf target/*.zip
rm -rf h2o-dist
find . -name 'h2odriver-3.*.0.jar' -delete -print
"""

}
pipelineContext.getBuildSummary().markStageSuccessful(this, CLEANUP_STAGE_NAME)
} catch (Exception e) {
pipelineContext.getBuildSummary().markStageFailed(this, CLEANUP_STAGE_NAME)
Expand Down

0 comments on commit 57da264

Please sign in to comment.