Skip to content

Commit

Permalink
Update cleanup stage - release (#16582) (#16585)
Browse files Browse the repository at this point in the history
* feat: cleanup fix

* chore: reset

* chore: refactor

(cherry picked from commit 1916d7e)

Co-authored-by: Sandev Dewthilina Kuruppu <[email protected]>
  • Loading branch information
valenad1 and SandevDewthilina authored Mar 5, 2025
1 parent b9a8cb1 commit b7600ff
Showing 1 changed file with 14 additions and 6 deletions.
20 changes: 14 additions & 6 deletions scripts/jenkins/jenkinsfiles/Jenkinsfile-Release
Original file line number Diff line number Diff line change
Expand Up @@ -634,12 +634,20 @@ 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
addgroup -g 1002 jenkins
adduser -D -u 1002 -G jenkins -s /bin/sh jenkins
chown -R jenkins:jenkins ${env.BUILD_NUMBER_DIR}
cd ${env.BUILD_NUMBER_DIR}
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 b7600ff

Please sign in to comment.