Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

kie-issues-777: attempt to fix scripted pipeline as well #1183

Merged
merged 1 commit into from
Feb 20, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 18 additions & 16 deletions dsl/scripts/pr_check.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
import org.kie.jenkins.MavenCommand

// TODO Docker image and args could be passed as env or anything ?
dockerGroups = [
dockerGroups = [
'docker',
]
dockerArgs = [
Expand All @@ -39,21 +39,23 @@ void launch() {
}

void launchInDocker(String builderImage) {
docker.image(builderImage).inside(dockerArgs.join(' ')) {
sh 'printenv > env_props'
archiveArtifacts artifacts: 'env_props'
util.waitForDocker()
sh 'ls -last /var/run/docker.sock'
try {
launchStages()
} finally {
echo "Got build result ${currentBuild.currentResult}"
if (currentBuild.currentResult != 'SUCCESS') {
// TODO ci token as env ?
postComment(
util.getMarkdownTestSummary('PR', getReproducer(true), "${BUILD_URL}", 'GITHUB'),
'kie-ci3-token'
)
node(util.avoidFaultyNodes()) {
docker.image(builderImage).inside(dockerArgs.join(' ')) {
sh 'printenv > env_props'
archiveArtifacts artifacts: 'env_props'
util.waitForDocker()
sh 'ls -last /var/run/docker.sock'
try {
launchStages()
} finally {
echo "Got build result ${currentBuild.currentResult}"
if (currentBuild.currentResult != 'SUCCESS') {
// TODO ci token as env ?
postComment(
util.getMarkdownTestSummary('PR', getReproducer(true), "${BUILD_URL}", 'GITHUB'),
'kie-ci3-token'
)
}
}
}
}
Expand Down
Loading