From ff5fd83b044581882bf305da2d0a39fb5cc638bf Mon Sep 17 00:00:00 2001 From: Yuxiang Zhu Date: Feb 25 2019 06:30:07 +0000 Subject: CI/CD: Update CI message test case names c3i.integration.dev is assigned to integration tests with dev version. c3i.integration.stage is assigned to integration tests with stage version. c3i.integration.prod is assigned to integration tests with prod version. --- diff --git a/openshift/pipelines/jobs/waiverdb-prod-integration-test.env b/openshift/pipelines/jobs/waiverdb-prod-integration-test.env index 35d6dcb..da61e7b 100644 --- a/openshift/pipelines/jobs/waiverdb-prod-integration-test.env +++ b/openshift/pipelines/jobs/waiverdb-prod-integration-test.env @@ -1,2 +1,3 @@ NAME=waiverdb-prod-integration-test IMAGE=quay.io/factory2/waiverdb:prod +ENVIRONMENT=prod diff --git a/openshift/pipelines/jobs/waiverdb-stage-integration-test.env b/openshift/pipelines/jobs/waiverdb-stage-integration-test.env index 3f5d060..153fc8b 100644 --- a/openshift/pipelines/jobs/waiverdb-stage-integration-test.env +++ b/openshift/pipelines/jobs/waiverdb-stage-integration-test.env @@ -1,2 +1,3 @@ NAME=waiverdb-stage-integration-test IMAGE=quay.io/factory2/waiverdb:stage +ENVIRONMENT=stage diff --git a/openshift/pipelines/templates/waiverdb-integration-test-template.yaml b/openshift/pipelines/templates/waiverdb-integration-test-template.yaml index 16cf7d2..2566cec 100644 --- a/openshift/pipelines/templates/waiverdb-integration-test-template.yaml +++ b/openshift/pipelines/templates/waiverdb-integration-test-template.yaml @@ -39,6 +39,10 @@ parameters: displayName: Name of OpenShift cloud in Jenkins master configuration required: true value: openshift +- name: ENVIRONMENT + displayName: environment name (dev/stage/prod) + required: true + value: dev objects: - kind: ServiceAccount apiVersion: v1 @@ -92,4 +96,6 @@ objects: value: "${JENKINS_AGENT_CLOUD_NAME}" - name: JENKINS_AGENT_SERVICE_ACCOUNT value: "${NAME}-jenkins-slave" + - name: ENVIRONMENT + value: "${ENVIRONMENT}" jenkinsfilePath: openshift/pipelines/templates/waiverdb-integration-test.Jenkinsfile diff --git a/openshift/pipelines/templates/waiverdb-integration-test.Jenkinsfile b/openshift/pipelines/templates/waiverdb-integration-test.Jenkinsfile index b69f40b..840f043 100644 --- a/openshift/pipelines/templates/waiverdb-integration-test.Jenkinsfile +++ b/openshift/pipelines/templates/waiverdb-integration-test.Jenkinsfile @@ -191,7 +191,8 @@ pipeline { "digest": "${env.IMAGE_DIGEST}", "nvr": "waiverdb:${env.IMAGE_TAG}", "issuer": "c3i-jenkins", - "scratch": ${params.IMAGE_IS_SCRATCH} + "scratch": ${params.IMAGE_IS_SCRATCH}, + "id": "waiverdb@${env.IMAGE_DIGEST}" }, "system": [{ @@ -199,12 +200,12 @@ pipeline { "provider": "openshift", "architecture": "x86_64" }], - "type": "tier1", + "type": "${params.ENVIRONMENT}", "category": "integration", "status": "${currentBuild.result == null || currentBuild.result == 'SUCCESS' ? 'passed':'failed'}", "xunit": "${env.BUILD_URL}/artifacts/junit-functional-tests.xml", "generated_at": "${new Date().format("yyyy-MM-dd'T'HH:mm:ss'Z'", TimeZone.getTimeZone('UTC'))}", - "namespace": "waiverdb-test", + "namespace": "c3i", "version": "0.1.0" } """