Skip to content

Commit

Permalink
CI: deploy pipeline small fix (#1597) (#1598)
Browse files Browse the repository at this point in the history
Co-authored-by: Tristan Radisson <[email protected]>
  • Loading branch information
github-actions[bot] and radtriste authored Jun 21, 2023
1 parent 9153828 commit 47674ba
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 9 deletions.
13 changes: 6 additions & 7 deletions .ci/jenkins/Jenkinsfile.build-image
Original file line number Diff line number Diff line change
Expand Up @@ -65,12 +65,6 @@ pipeline {
stage('Prepare environment') {
steps {
script {
cloud.prepareForDockerMultiplatformBuild()
cloud.startLocalRegistry()
if (shouldDeployImage()) {
cloud.installSkopeo()
}

// Set the mirror url only if exist
if (env.MAVEN_MIRROR_REPOSITORY) {
env.MAVEN_MIRROR_URL = env.MAVEN_MIRROR_REPOSITORY
Expand Down Expand Up @@ -101,6 +95,9 @@ pipeline {
stage('Build image') {
steps {
script {
cloud.prepareForDockerMultiplatformBuild()
cloud.startLocalRegistry()

// Generate the Dockerfile
runPythonCommand("make build-image ${getMakeBuildImageArgs()} image_name=${getBuildImageName()} ignore_test=true ignore_tag=true build_options='--dry-run'")

Expand All @@ -118,6 +115,8 @@ pipeline {
}
steps {
script {
cloud.installSkopeo()

// Make public if quay registry
if (getDeployImageRegistry() == QUAY_REGISTRY) {
String namespace = getDeployImageNamespace()
Expand Down Expand Up @@ -178,7 +177,7 @@ pipeline {
docker tag ${builtImageTag} ${testImageTag}
"""
try {
runPythonCommand("make build-image ${getMakeBuildImageArgs()} image_name=${getBuildImageName()} ignore_build=true ignore_tag=${isProdCI()}")
runPythonCommand("make build-image ${getMakeBuildImageArgs()} image_name=${getBuildImageName()} ignore_build=true")
} catch (err) {
unstable "Testing error(s) for image ${getBuildImageName()}"
} finally {
Expand Down
2 changes: 1 addition & 1 deletion .ci/jenkins/Jenkinsfile.deploy
Original file line number Diff line number Diff line change
Expand Up @@ -292,7 +292,7 @@ void createBuildAndTestStageClosure(String image) {
buildParams.add(booleanParam(name: 'DEPLOY_WITH_LATEST_TAG', value: isDeployLatestTag()))

def job = build(job: 'kogito-images.build-image', wait: true, parameters: buildParams, propagate: false)
if (!job.result == 'SUCCESS') {
if (job.result != 'SUCCESS') {
if (job.result == 'UNSTABLE') {
registerTestFailedImage(image)
unstable("Tests on ${image} seems to have failed")
Expand Down
2 changes: 1 addition & 1 deletion scripts/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -372,7 +372,7 @@ def update_maven_repo_in_behave_tests(repo_url, replace_jboss_repository):
env_var_key = "MAVEN_REPO_URL"
if replace_jboss_repository:
env_var_key = "JBOSS_MAVEN_REPO_URL"
replacement = "| variable | value |\n | {} | {} |\n | MAVEN_DOWNLOAD_OUTPUT | true |".format(env_var_key,
replacement = "| variable | value |\n | {} | {} |".format(env_var_key,
repo_url)
update_in_behave_tests(pattern, replacement)

Expand Down

0 comments on commit 47674ba

Please sign in to comment.