Skip to content

Commit

Permalink
[issue 113] - Fixing ci scripts by adding properties for the PR repo/ref
Browse files Browse the repository at this point in the history
  • Loading branch information
fabiobrz committed Jan 21, 2024
1 parent 8c9a9a4 commit 00ac6ee
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 2 deletions.
10 changes: 10 additions & 0 deletions .ci/openshift-ci/build-root/e2e-test-prod.sh
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,17 @@ cat test.properties

mkdir local-repo-prod
mvn clean install -Dmaven.repo.local=./local-repo-prod -DskipTests -Pts.wildfly.target-distribution.eap
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-prod -pl testsuite/integration-tests -Pts.execution-profile.prod,ts.wildfly.target-distribution.eap \
-Dintersmash.deployments.repository.url="https://github.com/${INTERSMASH_PR_AUTHOR}/${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 \
Expand Down
23 changes: 21 additions & 2 deletions .ci/openshift-ci/build-root/e2e-test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,15 @@ printenv KUBEADMIN_PASSWORD_FILE
oc get node
oc config view

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: $JOB_SPEC"
exit 1
fi

export TEST_CLUSTER_URL=$(oc whoami --show-server)

export SYSADMIN_USERNAME=kubeadmin
Expand Down Expand Up @@ -44,7 +53,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
Expand Down Expand Up @@ -90,4 +99,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 -Pts.execution-profile.community
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 \
-Dintersmash.deployments.repository.url="https://github.com/${INTERSMASH_PR_AUTHOR}/${REPO_NAME}.git" \
-Dintersmash.deployments.repository.ref="${PULL_HEAD_REF}"

0 comments on commit 00ac6ee

Please sign in to comment.