From 776a773475ff0c1282e697cffb67c48b2568222c Mon Sep 17 00:00:00 2001 From: Fabio Burzigotti Date: Fri, 19 Jan 2024 16:05:02 +0100 Subject: [PATCH] [issue 113] - Fixing ci scripts by adding properties for the PR repo/ref --- .ci/openshift-ci/build-root/e2e-test-prod.sh | 2 ++ .ci/openshift-ci/build-root/e2e-test.sh | 14 ++++++++++++-- .ci/openshift-ci/build-root/j.json | 1 + 3 files changed, 15 insertions(+), 2 deletions(-) create mode 100644 .ci/openshift-ci/build-root/j.json diff --git a/.ci/openshift-ci/build-root/e2e-test-prod.sh b/.ci/openshift-ci/build-root/e2e-test-prod.sh index d93c134ea..4c909a34c 100644 --- a/.ci/openshift-ci/build-root/e2e-test-prod.sh +++ b/.ci/openshift-ci/build-root/e2e-test-prod.sh @@ -96,6 +96,8 @@ cat test.properties mkdir local-repo-prod mvn clean install -Dmaven.repo.local=./local-repo-prod -DskipTests -Pts.wildfly.target-distribution.eap mvn test -Dmaven.repo.local=./local-repo-prod -pl testsuite/integration-tests -Pts.execution-profile.prod,ts.wildfly.target-distribution.eap \ + -Dintersmash.deployments.repository.url="https://github.com/${REPO_OWNER}/${REPO_NAME}.git" \ + -Dintersmash.deployments.repository.ref="${PULL_HEAD_REF}" \ -Dintersmash.wildfly.image=registry.redhat.io/jboss-eap-8-tech-preview/eap8-openjdk17-builder-openshift-rhel8:1.0.0.Beta \ -Dintersmash.wildfly.runtime.image=registry.redhat.io/jboss-eap-8-tech-preview/eap8-openjdk17-runtime-openshift-rhel8:1.0.0.Beta \ -Dintersmash.wildfly.operators.catalog_source=redhat-operators \ diff --git a/.ci/openshift-ci/build-root/e2e-test.sh b/.ci/openshift-ci/build-root/e2e-test.sh index f2853b92d..36578a385 100644 --- a/.ci/openshift-ci/build-root/e2e-test.sh +++ b/.ci/openshift-ci/build-root/e2e-test.sh @@ -44,7 +44,7 @@ while [ "$(oc get clusteroperator authentication -o custom-columns=STATUS:.statu echo Waiting for authentication operator to finish processing ((counter=counter+1)) if [ "$counter" == "200" ]; then - echo "Timeout waiting for authentication operator." + echo "[ERROR] Timeout waiting for authentication operator." exit 1 fi done @@ -90,4 +90,14 @@ cat test.properties mkdir local-repo-community mvn clean install -Dmaven.repo.local=./local-repo-community -DskipTests -mvn test -Dmaven.repo.local=./local-repo-community -pl testsuite/integration-tests -Dtest=WildflyImageProvisionerTestCase +if [[ $JOB_SPEC =~ author:(.*)\,sha ]] +then + export INTERSMASH_PR_AUTHOR="${BASH_REMATCH[1]}" + echo "[DEBUG] PR author: $INTERSMASH_PR_AUTHOR" +else + echo "[ERROR] Error getting the PR author from: $JSON_SPEC" + exit 1 +fi +mvn test -Dmaven.repo.local=./local-repo-community -pl testsuite/integration-tests -Dtest=WildflyImageProvisionerTestCase \ + -Dintersmash.deployments.repository.url="https://github.com/${INTERSMASH_PR_AUTHOR}/${REPO_NAME}.git" \ + -Dintersmash.deployments.repository.ref="${PULL_HEAD_REF}" diff --git a/.ci/openshift-ci/build-root/j.json b/.ci/openshift-ci/build-root/j.json new file mode 100644 index 000000000..00f921464 --- /dev/null +++ b/.ci/openshift-ci/build-root/j.json @@ -0,0 +1 @@ +{"type":"presubmit","job":"pull-ci-Intersmash-intersmash-main-intersmash-e2e","buildid":"1748367731545083904","prowjobid":"741beee0-603f-46a5-9d10-191025464a79","refs":{"org":"Intersmash","repo":"intersmash","repo_link":"https://github.com/Intersmash/intersmash","base_ref":"main","base_sha":"42802e775eba1118317b7fffd11ec4d751b24bac","base_link":"https://github.com/Intersmash/intersmash/commit/42802e775eba1118317b7fffd11ec4d751b24bac","pulls":[{"number":129,"author":"fabiobrz","sha":"e40b31986c05d28b5e66be9ac9088202f495bacd","head_ref":"move-javax-dep-to-eap7","link":"https://github.com/Intersmash/intersmash/pull/129","commit_link":"https://github.com/Intersmash/intersmash/pull/129/commits/e40b31986c05d28b5e66be9ac9088202f495bacd","author_link":"https://github.com/fabiobrz"}]},"decoration_config":{"timeout":"2h0m0s","grace_period":"15s","utility_images":{"clonerefs":"gcr.io/k8s-prow/clonerefs:v20240116-9788709fc1","initupload":"gcr.io/k8s-prow/initupload:v20240116-9788709fc1","entrypoint":"gcr.io/k8s-prow/entrypoint:v20240116-9788709fc1","sidecar":"gcr.io/k8s-prow/sidecar:v20240116-9788709fc1"},"resources":{"clonerefs":{"limits":{"memory":"3Gi"},"requests":{"cpu":"100m","memory":"500Mi"}},"initupload":{"limits":{"memory":"200Mi"},"requests":{"cpu":"100m","memory":"50Mi"}},"place_entrypoint":{"limits":{"memory":"100Mi"},"requests":{"cpu":"100m","memory":"25Mi"}},"sidecar":{"limits":{"memory":"2Gi"},"requests":{"cpu":"100m","memory":"250Mi"}}},"gcs_configuration":{"bucket":"test-platform-results","path_strategy":"single","default_org":"openshift","default_repo":"origin","mediaTypes":{"log":"text/plain"}},"gcs_credentials_secret":"gce-sa-credentials-gcs-publisher","skip_cloning":true,"censor_secrets":true}} \ No newline at end of file