forked from RedHatInsights/mocks
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpr_check.sh
executable file
·26 lines (22 loc) · 903 Bytes
/
pr_check.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
25
26
export IMAGE="quay.io/cloudservices/mocks" # the image location on quay
# Install bonfire repo/initialize
CICD_URL=https://raw.githubusercontent.com/RedHatInsights/bonfire/master/cicd
curl -sS $CICD_URL/bootstrap.sh -o $WORKSPACE/.cicd_bootstrap.sh && source $WORKSPACE/.cicd_bootstrap.sh
# Build the image and push to quay
source $CICD_ROOT/build.sh
# Test that the deployment works
source ${CICD_ROOT}/_common_deploy_logic.sh
export NAMESPACE=$(bonfire namespace reserve)
bonfire deploy \
gateway insights-ephemeral \
--source=appsre \
--set-template-ref mocks=${GIT_COMMIT} \
--set-image-tag ${IMAGE}=${IMAGE_TAG} \
--namespace ${NAMESPACE} \
# Create a 'dummy' junit result file so Jenkins will not fail
mkdir -p $WORKSPACE/artifacts
cat << EOF > $WORKSPACE/artifacts/junit-dummy.xml
<testsuite tests="1">
<testcase classname="dummy" name="dummytest"/>
</testsuite>
EOF