From 402a433e3f5a2e73e07c784b61b31b5eb983c4d7 Mon Sep 17 00:00:00 2001 From: Matt Nayler Date: Mon, 12 Dec 2022 11:59:56 +0000 Subject: [PATCH 1/7] HMAN-493 test updates to cnp-jenkins-library [HMAN-493](https://tools.hmcts.net/jira/browse/HMAN-493) Test against hmcts/cnp-jenkins-library#946. --- Jenkinsfile_CNP | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Jenkinsfile_CNP b/Jenkinsfile_CNP index 37e675cf..dd27f75d 100644 --- a/Jenkinsfile_CNP +++ b/Jenkinsfile_CNP @@ -15,7 +15,7 @@ properties([ disableConcurrentBuilds() ]) -@Library("Infrastructure") +@Library("Infrastructure@HMAN-493_clearHelmRelease_nonServiceApp") def type = "java" def product = "ccd" From 323ba691b0b5b92c81897ecff15eaaf58f57f51e Mon Sep 17 00:00:00 2001 From: Matt Nayler Date: Mon, 12 Dec 2022 12:22:19 +0000 Subject: [PATCH 2/7] HMAN-493 test enableCleanupOfHelmReleaseOnSuccess [HMAN-493](https://tools.hmcts.net/jira/browse/HMAN-493) Test `enableCleanupOfHelmReleaseOnSuccess()` in jenkins PREVIEW. --- Jenkinsfile_CNP | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Jenkinsfile_CNP b/Jenkinsfile_CNP index dd27f75d..5439c3f1 100644 --- a/Jenkinsfile_CNP +++ b/Jenkinsfile_CNP @@ -94,6 +94,8 @@ withPipeline(type, product, component) { env.TEST_URL="https://ccd-data-store-api-ccd-next-hearing-date-updater-pr-${CHANGE_ID}.service.core-compute-preview.internal" // This is really not needed but here as a hack around TLS url env.CCD_DATA_STORE_API_BASE_URL = "https://ccd-data-store-api-ccd-next-hearing-date-updater-pr-${CHANGE_ID}.service.core-compute-preview.internal" env.DEFINITION_STORE_URL_BASE = "https://ccd-definition-store-ccd-next-hearing-date-updater-pr-${CHANGE_ID}.service.core-compute-preview.internal" + + enableCleanupOfHelmReleaseOnSuccess() } onNonPR { env.ENV='aat' From 5b7f6d951503a90ec0c3f4293b0d02cdbb5e040f Mon Sep 17 00:00:00 2001 From: Matt Nayler Date: Mon, 12 Dec 2022 15:07:03 +0000 Subject: [PATCH 3/7] HMAN-493 test enableFullFunctionalTest MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [HMAN-493](https://tools.hmcts.net/jira/browse/HMAN-493) Test `enableFullFunctionalTest(…)` in jenkins PREVIEW. --- Jenkinsfile_CNP | 45 +++++++++++++++++++++------------------------ Jenkinsfile_nightly | 36 ++++++++++++++---------------------- 2 files changed, 35 insertions(+), 46 deletions(-) diff --git a/Jenkinsfile_CNP b/Jenkinsfile_CNP index dcedb69b..847fc5a4 100644 --- a/Jenkinsfile_CNP +++ b/Jenkinsfile_CNP @@ -95,6 +95,7 @@ withPipeline(type, product, component) { env.CCD_DATA_STORE_API_BASE_URL = "https://ccd-data-store-api-ccd-next-hearing-date-updater-pr-${CHANGE_ID}.service.core-compute-preview.internal" env.DEFINITION_STORE_URL_BASE = "https://ccd-definition-store-ccd-next-hearing-date-updater-pr-${CHANGE_ID}.service.core-compute-preview.internal" + enableFullFunctionalTest() enableCleanupOfHelmReleaseOnSuccess() } onNonPR { @@ -136,32 +137,28 @@ withPipeline(type, product, component) { junit '**/test-results/test/*.xml' } - afterAlways('akschartsinstall') { - - // check data-store instance is up + before('fullFunctionalTest:preview') { + // check data-store instance is up def healthChecker = new HealthChecker(this) healthChecker.check("$CCD_DATA_STORE_API_BASE_URL/health", 10, 40) - try { - // NB: override IDAM_API_URL late so its value does not corrupt config used in integration tests - env.IDAM_API_URL = env.IDAM_API_URL_BASE - - // suppress SSL warnings as we are crossing boundary jenkins -> preview `feign.httpclient.disable-ssl-validation: true` - env.FEIGN_HTTPCLIENT_DISABLE_SSL_VALIDATION = true - - builder.functionalTest() - } finally { - - publishHTML target: [ - allowMissing : true, - alwaysLinkToLastBuild: true, - keepAll : true, - reportDir : "build/reports/tests/functional", - reportFiles : "overview-features.html,overview-failures.html,", - reportTitles : "Features,Failures", - reportName : "Next Hearing Date Updater Functional Test Report" - ] - junit '**/test-results/functional/*.xml' - } + // NB: override IDAM_API_URL late so its value does not corrupt config used in integration tests + env.IDAM_API_URL = env.IDAM_API_URL_BASE + + // suppress SSL warnings as we are crossing boundary jenkins -> preview `feign.httpclient.disable-ssl-validation: true` + env.FEIGN_HTTPCLIENT_DISABLE_SSL_VALIDATION = true + } + + afterAlways('fullFunctionalTest:preview') { + publishHTML target: [ + allowMissing : true, + alwaysLinkToLastBuild: true, + keepAll : true, + reportDir : "build/reports/tests/functional", + reportFiles : "overview-features.html,overview-failures.html,", + reportTitles : "Features,Failures", + reportName : "Next Hearing Date Updater Functional Test Report" + ] + junit '**/test-results/functional/*.xml' } } diff --git a/Jenkinsfile_nightly b/Jenkinsfile_nightly index f0578e23..71a1cf5b 100644 --- a/Jenkinsfile_nightly +++ b/Jenkinsfile_nightly @@ -98,28 +98,20 @@ withNightlyPipeline(type, product, component) { echo "Loading the secrets" loadVaultSecrets(secrets) + // NB: override IDAM_API_URL late as per `Jenkinsfile_CNP` tests + env.IDAM_API_URL = env.IDAM_API_URL_BASE + } - // Execute functional tests - echo "Just waiting a while to ensure that the pod has run the job" - sh "sleep 30s" - echo "Verifying that functional test run correctly" - try { - // NB: override IDAM_API_URL late as per `Jenkinsfile_CNP` tests - env.IDAM_API_URL = env.IDAM_API_URL_BASE - - builder.functionalTest() - } finally { - - publishHTML target: [ - allowMissing : true, - alwaysLinkToLastBuild: true, - keepAll : true, - reportDir : "build/reports/tests/functional", - reportFiles : "overview-features.html,overview-failures.html,", - reportTitles : "Features,Failures", - reportName : "Next Hearing Date Updater Functional Test Report" - ] - junit '**/test-results/functional/*.xml' - } + afterAlways('fullFunctionalTest') { + publishHTML target: [ + allowMissing : true, + alwaysLinkToLastBuild: true, + keepAll : true, + reportDir : "build/reports/tests/functional", + reportFiles : "overview-features.html,overview-failures.html,", + reportTitles : "Features,Failures", + reportName : "Next Hearing Date Updater Functional Test Report" + ] + junit '**/test-results/functional/*.xml' } } From 1e8685adbb5970ebbe89c052cc3f61238e02f140 Mon Sep 17 00:00:00 2001 From: Matt Nayler Date: Tue, 13 Dec 2022 10:36:48 +0000 Subject: [PATCH 4/7] HMAN-493 update BEFTA-FW prerelease number [HMAN-493](https://tools.hmcts.net/jira/browse/HMAN-493) Build against the next `befta-fw` pre-release, see hmcts/befta-fw#195. --- build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.gradle b/build.gradle index c9b64b3e..5f6122ec 100644 --- a/build.gradle +++ b/build.gradle @@ -335,7 +335,7 @@ dependencies { functionalTestImplementation group: 'io.vavr', name: 'vavr', version: '0.10.4' functionalTestImplementation group: 'io.rest-assured', name: 'rest-assured', version: '4.4.0' - functionalTestImplementation group: 'com.github.hmcts', name: 'befta-fw', version: '8.7.6' + functionalTestImplementation group: 'com.github.hmcts', name: 'befta-fw', version: '8.7.9-prerelease-HMAN-493' functionalTestImplementation group: 'com.github.hmcts', name: 'ccd-test-definitions', version: '7.19.5' } From df53da3cac93d5848d88895cedaa4818c9155ae3 Mon Sep 17 00:00:00 2001 From: Matt Nayler Date: Tue, 13 Dec 2022 11:47:39 +0000 Subject: [PATCH 5/7] HMAN-493 TEST_URL no longer required for FTAs [HMAN-493](https://tools.hmcts.net/jira/browse/HMAN-493) Remove TEST_URL as it will no longer be required for Functional tests. --- Jenkinsfile_CNP | 2 -- Jenkinsfile_nightly | 1 - 2 files changed, 3 deletions(-) diff --git a/Jenkinsfile_CNP b/Jenkinsfile_CNP index 847fc5a4..3a7f08c3 100644 --- a/Jenkinsfile_CNP +++ b/Jenkinsfile_CNP @@ -91,7 +91,6 @@ withPipeline(type, product, component) { onPR { enableSlackNotifications('#ccd-pr-builds') env.ENV='preview' - env.TEST_URL="https://ccd-data-store-api-ccd-next-hearing-date-updater-pr-${CHANGE_ID}.service.core-compute-preview.internal" // This is really not needed but here as a hack around TLS url env.CCD_DATA_STORE_API_BASE_URL = "https://ccd-data-store-api-ccd-next-hearing-date-updater-pr-${CHANGE_ID}.service.core-compute-preview.internal" env.DEFINITION_STORE_URL_BASE = "https://ccd-definition-store-ccd-next-hearing-date-updater-pr-${CHANGE_ID}.service.core-compute-preview.internal" @@ -100,7 +99,6 @@ withPipeline(type, product, component) { } onNonPR { env.ENV='aat' - env.TEST_URL="http://ccd-data-store-api-aat.service.core-compute-aat.internal" env.CCD_DATA_STORE_API_BASE_URL = "http://ccd-data-store-api-aat.service.core-compute-aat.internal" env.DEFINITION_STORE_URL_BASE = "http://ccd-definition-store-api-aat.service.core-compute-aat.internal" } diff --git a/Jenkinsfile_nightly b/Jenkinsfile_nightly index 71a1cf5b..dde0b24a 100644 --- a/Jenkinsfile_nightly +++ b/Jenkinsfile_nightly @@ -78,7 +78,6 @@ withNightlyPipeline(type, product, component) { // apply standard `onNonPR` env variables for nightly env.ENV='aat' - env.TEST_URL="http://ccd-data-store-api-aat.service.core-compute-aat.internal" env.CCD_DATA_STORE_API_BASE_URL = "http://ccd-data-store-api-aat.service.core-compute-aat.internal" env.DEFINITION_STORE_URL_BASE = "http://ccd-definition-store-api-aat.service.core-compute-aat.internal" From bfac9cceab05bc87dd92d16131e2d1b01fa3dd5a Mon Sep 17 00:00:00 2001 From: Matt Nayler Date: Wed, 11 Jan 2023 10:48:59 +0000 Subject: [PATCH 6/7] Bump BEFTA-FW and ccd-test-definitions versions --- build.gradle | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/build.gradle b/build.gradle index 5f6122ec..e13d2f20 100644 --- a/build.gradle +++ b/build.gradle @@ -335,8 +335,8 @@ dependencies { functionalTestImplementation group: 'io.vavr', name: 'vavr', version: '0.10.4' functionalTestImplementation group: 'io.rest-assured', name: 'rest-assured', version: '4.4.0' - functionalTestImplementation group: 'com.github.hmcts', name: 'befta-fw', version: '8.7.9-prerelease-HMAN-493' - functionalTestImplementation group: 'com.github.hmcts', name: 'ccd-test-definitions', version: '7.19.5' + functionalTestImplementation group: 'com.github.hmcts', name: 'befta-fw', version: '8.7.10' + functionalTestImplementation group: 'com.github.hmcts', name: 'ccd-test-definitions', version: '7.19.10' } From 3437206ad835aa84318a236272382f3c1e5c607b Mon Sep 17 00:00:00 2001 From: Matt Nayler Date: Wed, 11 Jan 2023 17:40:45 +0000 Subject: [PATCH 7/7] HMAN-342 update test definition release number [HMAN-342](https://tools.hmcts.net/jira/browse/HMAN-342) Update `ccd-test-definitions` version number after release of: hmcts/ccd-test-definitions#60. --- build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.gradle b/build.gradle index aca1a07b..b84a6810 100644 --- a/build.gradle +++ b/build.gradle @@ -336,7 +336,7 @@ dependencies { functionalTestImplementation group: 'io.rest-assured', name: 'rest-assured', version: '4.4.0' functionalTestImplementation group: 'com.github.hmcts', name: 'befta-fw', version: '8.7.10' - functionalTestImplementation group: 'com.github.hmcts', name: 'ccd-test-definitions', version: '7.19.10' + functionalTestImplementation group: 'com.github.hmcts', name: 'ccd-test-definitions', version: '7.19.11' }