Skip to content

Commit

Permalink
DBZ-4382 Fixed Apicurio deployment and test execution in CI
Browse files Browse the repository at this point in the history
  • Loading branch information
jcechace committed Dec 1, 2021
1 parent 54cb7be commit 7f534e0
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
2 changes: 0 additions & 2 deletions jenkins-jobs/job-dsl/ocp_openshift_test.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ pipelineJob('ocp-debezium-testing-system') {
// TEST CONFIG
stringParam('TEST_WAIT_SCALE', '1', 'Wait time scaling factor')
stringParam('TEST_TAGS', '', 'Which test tags to run (empty for all)')
stringParam('TEST_TAGS_EXCLUDE', '', 'Which test tags to skip (empty for none)')
// Artifact Versions
stringParam('TEST_VERSION_KAFKA', '', 'Kafka version')
stringParam('AS_VERSION_APICURIO', '', 'Service registry bits version')
Expand All @@ -45,7 +44,6 @@ pipelineJob('ocp-debezium-testing-system') {
definition {
cps {
script(readFileFromWorkspace('jenkins-jobs/pipelines/openshift_pipeline.groovy'))
sandbox()
}
}
}
14 changes: 9 additions & 5 deletions jenkins-jobs/pipelines/openshift_pipeline.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -134,8 +134,10 @@ pipeline {
env.MVN_IMAGE_CONNECT_RHEL = params.IMAGE_CONNECT_RHEL ? "-Ddocker.image.kc=${params.IMAGE_CONNECT_RHEL}" : ""
env.MVN_IMAGE_DBZ_AS = params.IMAGE_DBZ_AS ? "-Dimage.as=${params.IMAGE_DBZ_AS}" : ""

env.MVN_TAGS = params.TEST_TAGS ? "-Dgroups=${params.TEST_TAGS}" : ""
env.MVN_TAGS_EXCLUDE = params.TEST_TAGS_EXCLUDE ? "-DexcludedGroups=${params.TEST_TAGS_EXCLUDE }" : ""
env.TEST_TAG_EXPRESSION = params.TEST_TAGS
if (!params.TEST_APICURIO_REGISTRY) {
env.TEST_TAG_EXPRESSION = [env.TEST_TAG_EXPRESSION, "!avro"].findAll().join(" & ")
}

env.MVN_VERSION_KAFKA = params.TEST_VERSION_KAFKA ? "-Dversion.kafka=${params.TEST_VERSION_KAFKA}" : ""
env.MVN_VERSION_AS_DEBEZIUM = params.AS_VERSION_DEBEZIUM ? "-Das.debezium.version=${params.AS_VERSION_DEBEZIUM}" : ""
Expand Down Expand Up @@ -269,6 +271,7 @@ pipeline {
mvn install -pl debezium-testing/debezium-testing-system -PsystemITs,oracleITs \\
${MVN_PROFILE_PROD} \\
-Docp.project.debezium="${OCP_PROJECT_DEBEZIUM}" \\
-Docp.project.registry="${OCP_PROJECT_REGISTRY}" \\
-Docp.project.mysql="${OCP_PROJECT_MYSQL}" \\
-Docp.project.postgresql="${OCP_PROJECT_POSTGRESQL}" \\
-Docp.project.sqlserver="${OCP_PROJECT_SQLSERVER}" \\
Expand All @@ -288,8 +291,7 @@ pipeline {
${MVN_VERSION_KAFKA} \\
${MVN_VERSION_AS_DEBEZIUM} \\
${MVN_VERSION_AS_APICURIO} \\
${MVN_TAGS} \\
${MVN_TAGS_EXCLUDE}
-Dgroups="${TEST_TAG_EXPRESSION}"
'''
}
}
Expand All @@ -307,7 +309,9 @@ OpenShift interoperability test run ${BUILD_URL} finished with result: ${current
}
success {
sh '''
for project in $(oc projects | grep -Po "debezium-${BUILD_NUMBER}.*"); do
oc projects | grep -Po "debezium-${BUILD_NUMBER}.*"
for project in $(oc projects | grep -Po "debezium-${BUILD_NUMBER}[\\w-]*$"); do
oc delete project "${project}" --ignore-not-found
done
'''
Expand Down

0 comments on commit 7f534e0

Please sign in to comment.