From 70ed522f03921ea711a44b587f9b9d3d10cddb2d Mon Sep 17 00:00:00 2001 From: Michal Kovarik Date: Feb 05 2020 15:18:22 +0000 Subject: Fix CI_MESSAGE TESTCASE_CATEGORY is used in c3i.sendResultToMessageBus but it was not defined. c3i.sendResultToMessageBus takes image_repo as first parameter but full image url was passed. --- diff --git a/openshift/pipelines/templates/snippets/waiverdb-full-integration-test.groovy b/openshift/pipelines/templates/snippets/waiverdb-full-integration-test.groovy index 7e18656..7f22724 100644 --- a/openshift/pipelines/templates/snippets/waiverdb-full-integration-test.groovy +++ b/openshift/pipelines/templates/snippets/waiverdb-full-integration-test.groovy @@ -3,6 +3,7 @@ stage('Run integration tests') { stage('Request Pipeline') { steps { script { + env.TESTCASE_CATEGORY = env.ENVIRONMENT if (!env.TRIGGER_NAMESPACE) { env.TRIGGER_NAMESPACE = readFile("/run/secrets/kubernetes.io/serviceaccount/namespace").trim() } @@ -60,8 +61,10 @@ stage('Run integration tests') { return } pipeline_data = controller.getVars() + // convert 'quay.io/factory2/waiverdb@sha256:1647bbaa..' or 'quay.io/factory2/waiverdb:tag' to factory2/waiverdb + def image_repo = pipeline_data.WAIVERDB_IMAGE.tokenize(':@')[0].tokenize('/')[1..-1].join('/') c3i.sendResultToMessageBus( - pipeline_data.WAIVERDB_IMAGE, + image_repo, pipeline_data.WAIVERDB_IMAGE_DIGEST, env.BUILD_TAG, env.TARGET_IMAGE_IS_SCRATCH == "true", @@ -71,7 +74,6 @@ stage('Run integration tests') { } failure { script { - env.TESTCASE_CATEGORY = env.ENVIRONMENT c3i.archiveContainersLogs(env.PIPELINE_ID) } }