-
Notifications
You must be signed in to change notification settings - Fork 19
/
Copy pathrun_tests_with_helm.sh
executable file
·24 lines (20 loc) · 1.17 KB
/
run_tests_with_helm.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#!/usr/bin/env bash
SOURCE_REPOSITORY_URL=${1:-https://github.com/snowdrop/secured-example}
SOURCE_REPOSITORY_REF=${2:-sb-2.7.x}
S2I_BUILDER_IMAGE_REPO=registry.access.redhat.com/ubi8/openjdk-11
S2I_BUILDER_IMAGE_TAG=1.14
source scripts/waitFor.sh
# Deploy SSO
oc apply -f .openshiftio/sso.yaml
if [[ $(waitFor "sso" "application") -eq 1 ]] ; then
echo "SSO failed to deploy. Aborting"
exit 1
fi
SSO_URL=$(oc get route secure-sso -o jsonpath='https://{.spec.host}/auth')
helm install secured ./helm --set spring-boot-example-app.s2i.source.repo=$SOURCE_REPOSITORY_URL --set spring-boot-example-app.s2i.source.ref=$SOURCE_REPOSITORY_REF --set spring-boot-example-app.s2i.env[0].name="MAVEN_ARGS_APPEND" --set spring-boot-example-app.s2i.env[0].value="-DSSO_AUTH_SERVER_URL=${SSO_URL}" --set spring-boot-example-app.s2i.builderImage.repo=$S2I_BUILDER_IMAGE_REPO --set spring-boot-example-app.s2i.builderImage.tag=$S2I_BUILDER_IMAGE_TAG
if [[ $(waitFor "rest-secured" "app") -eq 1 ]] ; then
echo "Application failed to deploy. Aborting"
exit 1
fi
# Run Tests
./mvnw -s .github/mvn-settings.xml clean verify -Popenshift,openshift-it -Dunmanaged-test=true -DSSO_AUTH_SERVER_URL=$SSO_URL