@@ -38,6 +38,8 @@ pipeline {
3838 ocir_host = "${env.WKT_OCIR_HOST}"
3939 wko_tenancy = "${env.WKT_TENANCY}"
4040 ocir_creds = 'wkt-ocir-creds'
41+ wko_region = "${env.WKT_REGION}"
42+ wko_files_bucket_token = 'wko-system-test-files-bucket-par-token'
4143
4244 outdir = "${WORKSPACE}/staging"
4345 result_root = "${outdir}/wl_k8s_test_results"
@@ -125,11 +127,11 @@ pipeline {
125127 )
126128 string(name: 'WDT_DOWNLOAD_URL',
127129 description: 'URL to download WDT.',
128- defaultValue: 'https://github.com/oracle/weblogic-deploy-tooling/releases/latest'
130+ defaultValue: ""
129131 )
130132 string(name: 'WIT_DOWNLOAD_URL',
131133 description: 'URL to download WIT.',
132- defaultValue: 'https://github.com/oracle/weblogic-image-tool/releases/latest'
134+ defaultValue: ""
133135 )
134136 string(name: 'REMOTECONSOLE_VERSION',
135137 description: 'RemoteConsole version.',
@@ -522,58 +524,67 @@ EOF
522524 error('Profile/ItTests Validation Failed')
523525 }
524526 }
525-
526- sh '''
527- export PATH=${runtime_path}
528- export KUBECONFIG=${kubeconfig_file}
529- mkdir -m777 -p "${WORKSPACE}/.mvn"
530- touch ${WORKSPACE}/.mvn/maven.config
531- K8S_NODEPORT_HOST=$(kubectl get node kind-worker -o jsonpath='{.status.addresses[?(@.type == "InternalIP")].address}')
532- if [ "${MAVEN_PROFILE_NAME}" == "kind-sequential" ]; then
533- PARALLEL_RUN='false'
534- elif [ "${MAVEN_PROFILE_NAME}" == "kind-upgrade" ]; then
535- PARALLEL_RUN='false'
536- fi
537- if [ -n "${IT_TEST}" ]; then
538- echo 'Overriding MAVEN_PROFILE_NAME to integration-test when running individual test(s)'
539- MAVEN_PROFILE_NAME="integration-tests"
540- echo "-Dit.test=\"${IT_TEST}\"" >> ${WORKSPACE}/.mvn/maven.config
541- fi
542- echo "-Dwko.it.wle.download.url=\"${wle_download_url}\"" >> ${WORKSPACE}/.mvn/maven.config
543- echo "-Dwko.it.result.root=\"${result_root}\"" >> ${WORKSPACE}/.mvn/maven.config
544- echo "-Dwko.it.pv.root=\"${pv_root}\"" >> ${WORKSPACE}/.mvn/maven.config
545- echo "-Dwko.it.k8s.nodeport.host=\"${K8S_NODEPORT_HOST}\"" >> ${WORKSPACE}/.mvn/maven.config
546- echo "-Dwko.it.kind.repo=\"localhost:${registry_port}\"" >> ${WORKSPACE}/.mvn/maven.config
547- echo "-Dwko.it.istio.version=\"${ISTIO_VERSION}\"" >> ${WORKSPACE}/.mvn/maven.config
548- echo "-DPARALLEL_CLASSES=\"${PARALLEL_RUN}\"" >> ${WORKSPACE}/.mvn/maven.config
549- echo "-DNUMBER_OF_THREADS=\"${NUMBER_OF_THREADS}\"" >> ${WORKSPACE}/.mvn/maven.config
550- echo "-Dwko.it.wdt.download.url=\"${WDT_DOWNLOAD_URL}\"" >> ${WORKSPACE}/.mvn/maven.config
551- echo "-Dwko.it.wit.download.url=\"${WIT_DOWNLOAD_URL}\"" >> ${WORKSPACE}/.mvn/maven.config
552- echo "-Dwko.it.base.images.repo=\"${BASE_IMAGES_REPO}\"" >> ${WORKSPACE}/.mvn/maven.config
553- echo "-Dwko.it.base.images.tenancy=\"${wko_tenancy}\"" >> ${WORKSPACE}/.mvn/maven.config
554- echo "-Dwko.it.test.images.repo=\"${TEST_IMAGES_REPO}\"" >> ${WORKSPACE}/.mvn/maven.config
555- echo "-Dwko.it.test.images.tenancy=\"${wko_tenancy}\"" >> ${WORKSPACE}/.mvn/maven.config
556- echo "-Dwko.it.weblogic.image.name=\"${WEBLOGIC_IMAGE_NAME}\"" >> ${WORKSPACE}/.mvn/maven.config
557- echo "-Dwko.it.weblogic.image.tag=\"${WEBLOGIC_IMAGE_TAG}\"" >> ${WORKSPACE}/.mvn/maven.config
558- echo "-Dwko.it.fmwinfra.image.name=\"${FMWINFRA_IMAGE_NAME}\"" >> ${WORKSPACE}/.mvn/maven.config
559- echo "-Dwko.it.fmwinfra.image.tag=\"${FMWINFRA_IMAGE_TAG}\"" >> ${WORKSPACE}/.mvn/maven.config
560- echo "-Dwko.it.db.image.name=\"${DB_IMAGE_NAME}\"" >> ${WORKSPACE}/.mvn/maven.config
561- echo "-Dwko.it.db.image.tag=\"${DB_IMAGE_TAG}\"" >> ${WORKSPACE}/.mvn/maven.config
562- echo "-Dwko.it.monitoring.exporter.branch=\"${MONITORING_EXPORTER_BRANCH}\"" >> ${WORKSPACE}/.mvn/maven.config
563- echo "-Dwko.it.monitoring.exporter.webapp.version=\"${MONITORING_EXPORTER_WEBAPP_VERSION}\"" >> ${WORKSPACE}/.mvn/maven.config
564- echo "-Dwko.it.prometheus.chart.version=\"${PROMETHEUS_CHART_VERSION}\"" >> ${WORKSPACE}/.mvn/maven.config
565- echo "-Dwko.it.grafana.chart.version=\"${GRAFANA_CHART_VERSION}\"" >> ${WORKSPACE}/.mvn/maven.config
566- echo "-Dwko.it.collect.logs.on.success=\"${COLLECT_LOGS_ON_SUCCESS}\"" >> ${WORKSPACE}/.mvn/maven.config
567- echo "-DWLSIMG_BUILDER=\"podman\"" >> ${WORKSPACE}/.mvn/maven.config
568- echo "-Dwko.it.remoteconsole.version=\"${REMOTECONSOLE_VERSION}\"" >> ${WORKSPACE}/.mvn/maven.config
569- echo "-Djdk.httpclient.allowRestrictedHeaders=\"host\"" >> ${WORKSPACE}/.mvn/maven.config
570- echo "-DOPERATOR_LOG_LEVEL=\"${OPERATOR_LOG_LEVEL}\"" >> ${WORKSPACE}/.mvn/maven.config
571- echo "-Dwko.it.install.weblogic=\"true\"" >> ${WORKSPACE}/.mvn/maven.config
572-
573- echo "${WORKSPACE}/.mvn/maven.config contents:"
574- cat "${WORKSPACE}/.mvn/maven.config"
575- cp "${WORKSPACE}/.mvn/maven.config" "${result_root}"
527+ withCredentials([
528+ string(credentialsId: "${wko_files_bucket_token}", variable: 'WKO_BUCKET_TOKEN')
529+ ]) {
530+ sh '''
531+ if [ -z $WIT_DOWNLOAD_URL ]; then
532+ WIT_DOWNLOAD_URL="https://objectstorage.${wko_region}.oraclecloud.com/p/${WKO_BUCKET_TOKEN}/n/${wko_tenancy}/b/wko-system-test-files/o/imagetool-main.zip"
533+ fi
534+ if [ -z $WDT_DOWNLOAD_URL ]; then
535+ WDT_DOWNLOAD_URL="https://objectstorage.${wko_region}.oraclecloud.com/p/${WKO_BUCKET_TOKEN}/n/${wko_tenancy}/b/wko-system-test-files/o/weblogic-deploy-main.zip"
536+ fi
537+ export PATH=${runtime_path}
538+ export KUBECONFIG=${kubeconfig_file}
539+ mkdir -m777 -p "${WORKSPACE}/.mvn"
540+ touch ${WORKSPACE}/.mvn/maven.config
541+ K8S_NODEPORT_HOST=$(kubectl get node kind-worker -o jsonpath='{.status.addresses[?(@.type == "InternalIP")].address}')
542+ if [ "${MAVEN_PROFILE_NAME}" == "kind-sequential" ]; then
543+ PARALLEL_RUN='false'
544+ elif [ "${MAVEN_PROFILE_NAME}" == "kind-upgrade" ]; then
545+ PARALLEL_RUN='false'
546+ fi
547+ if [ -n "${IT_TEST}" ]; then
548+ echo 'Overriding MAVEN_PROFILE_NAME to integration-test when running individual test(s)'
549+ MAVEN_PROFILE_NAME="integration-tests"
550+ echo "-Dit.test=\"${IT_TEST}\"" >> ${WORKSPACE}/.mvn/maven.config
551+ fi
552+ echo "-Dwko.it.wle.download.url=\"${wle_download_url}\"" >> ${WORKSPACE}/.mvn/maven.config
553+ echo "-Dwko.it.result.root=\"${result_root}\"" >> ${WORKSPACE}/.mvn/maven.config
554+ echo "-Dwko.it.pv.root=\"${pv_root}\"" >> ${WORKSPACE}/.mvn/maven.config
555+ echo "-Dwko.it.k8s.nodeport.host=\"${K8S_NODEPORT_HOST}\"" >> ${WORKSPACE}/.mvn/maven.config
556+ echo "-Dwko.it.kind.repo=\"localhost:${registry_port}\"" >> ${WORKSPACE}/.mvn/maven.config
557+ echo "-Dwko.it.istio.version=\"${ISTIO_VERSION}\"" >> ${WORKSPACE}/.mvn/maven.config
558+ echo "-DPARALLEL_CLASSES=\"${PARALLEL_RUN}\"" >> ${WORKSPACE}/.mvn/maven.config
559+ echo "-DNUMBER_OF_THREADS=\"${NUMBER_OF_THREADS}\"" >> ${WORKSPACE}/.mvn/maven.config
560+ echo "-Dwko.it.wdt.download.url=\"${WDT_DOWNLOAD_URL}\"" >> ${WORKSPACE}/.mvn/maven.config
561+ echo "-Dwko.it.wit.download.url=\"${WIT_DOWNLOAD_URL}\"" >> ${WORKSPACE}/.mvn/maven.config
562+ echo "-Dwko.it.base.images.repo=\"${BASE_IMAGES_REPO}\"" >> ${WORKSPACE}/.mvn/maven.config
563+ echo "-Dwko.it.base.images.tenancy=\"${wko_tenancy}\"" >> ${WORKSPACE}/.mvn/maven.config
564+ echo "-Dwko.it.test.images.repo=\"${TEST_IMAGES_REPO}\"" >> ${WORKSPACE}/.mvn/maven.config
565+ echo "-Dwko.it.test.images.tenancy=\"${wko_tenancy}\"" >> ${WORKSPACE}/.mvn/maven.config
566+ echo "-Dwko.it.weblogic.image.name=\"${WEBLOGIC_IMAGE_NAME}\"" >> ${WORKSPACE}/.mvn/maven.config
567+ echo "-Dwko.it.weblogic.image.tag=\"${WEBLOGIC_IMAGE_TAG}\"" >> ${WORKSPACE}/.mvn/maven.config
568+ echo "-Dwko.it.fmwinfra.image.name=\"${FMWINFRA_IMAGE_NAME}\"" >> ${WORKSPACE}/.mvn/maven.config
569+ echo "-Dwko.it.fmwinfra.image.tag=\"${FMWINFRA_IMAGE_TAG}\"" >> ${WORKSPACE}/.mvn/maven.config
570+ echo "-Dwko.it.db.image.name=\"${DB_IMAGE_NAME}\"" >> ${WORKSPACE}/.mvn/maven.config
571+ echo "-Dwko.it.db.image.tag=\"${DB_IMAGE_TAG}\"" >> ${WORKSPACE}/.mvn/maven.config
572+ echo "-Dwko.it.monitoring.exporter.branch=\"${MONITORING_EXPORTER_BRANCH}\"" >> ${WORKSPACE}/.mvn/maven.config
573+ echo "-Dwko.it.monitoring.exporter.webapp.version=\"${MONITORING_EXPORTER_WEBAPP_VERSION}\"" >> ${WORKSPACE}/.mvn/maven.config
574+ echo "-Dwko.it.prometheus.chart.version=\"${PROMETHEUS_CHART_VERSION}\"" >> ${WORKSPACE}/.mvn/maven.config
575+ echo "-Dwko.it.grafana.chart.version=\"${GRAFANA_CHART_VERSION}\"" >> ${WORKSPACE}/.mvn/maven.config
576+ echo "-Dwko.it.collect.logs.on.success=\"${COLLECT_LOGS_ON_SUCCESS}\"" >> ${WORKSPACE}/.mvn/maven.config
577+ echo "-DWLSIMG_BUILDER=\"podman\"" >> ${WORKSPACE}/.mvn/maven.config
578+ echo "-Dwko.it.remoteconsole.version=\"${REMOTECONSOLE_VERSION}\"" >> ${WORKSPACE}/.mvn/maven.config
579+ echo "-Djdk.httpclient.allowRestrictedHeaders=\"host\"" >> ${WORKSPACE}/.mvn/maven.config
580+ echo "-DOPERATOR_LOG_LEVEL=\"${OPERATOR_LOG_LEVEL}\"" >> ${WORKSPACE}/.mvn/maven.config
581+ echo "-Dwko.it.install.weblogic=\"true\"" >> ${WORKSPACE}/.mvn/maven.config
582+
583+ echo "${WORKSPACE}/.mvn/maven.config contents:"
584+ cat "${WORKSPACE}/.mvn/maven.config"
585+ cp "${WORKSPACE}/.mvn/maven.config" "${result_root}"
576586 '''
587+ }
577588 withMaven(globalMavenSettingsConfig: 'wkt-maven-settings-xml', publisherStrategy: 'EXPLICIT') {
578589 withCredentials([
579590 usernamePassword(credentialsId: "${ocir_creds}", usernameVariable: 'OCIR_USER', passwordVariable: 'OCIR_PASS')
648659 anyOf {
649660 branch 'main'
650661 branch 'release/4.0'
651- branch 'release/3.4'
652662 }
653663 anyOf {
654664 not { triggeredBy 'TimerTrigger' }
0 commit comments