Skip to content

Commit 00eb6b3

Browse files
committed
use phx jre image for wercker
1 parent 1ba425b commit 00eb6b3

File tree

2 files changed

+32
-2
lines changed

2 files changed

+32
-2
lines changed

integration-tests/src/test/resources/statedump.sh

Lines changed: 24 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,9 +69,31 @@ function state_dump {
6969
# use a run to archive PV, /sharedparent mounts to PV_ROOT in the K8S cluster
7070
echo "Archiving pv directory using a kubernetes run. Look for it on k8s cluster in $PV_ROOT/acceptance_test_pv_archive"
7171
local outfile=${DUMP_DIR}/archive_pv_run.out
72-
$SCRIPTPATH/krun.sh -t 300 -d ${RESULT_DIR} -m "${PV_ROOT}:/sharedparent" -c 'jar cf /sharedparent/pvarchive.jar /sharedparent/acceptance_test_pv' 2>&1 | tee ${outfile}
72+
73+
if [ "$WERCKER" = "true" ]; then
74+
echo @@ Creating Repo Secret
75+
kubectl create secret docker-registry $IMAGE_PULL_SECRET_WEBLOGIC \
76+
--docker-server=$REPO_SERVER \
77+
--docker-username=$REPO_USERNAME \
78+
--docker-password=$REPO_PASSWORD \
79+
--docker-email=$REPO_EMAIL
80+
81+
echo "Checking Repo Secret"
82+
SECRET="`kubectl get secret $IMAGE_PULL_SECRET_WEBLOGIC | grep $IMAGE_PULL_SECRET_WEBLOGIC | wc | awk ' { print $1; }'`"
83+
if [ "$SECRET" != "1" ]; then
84+
echo "secret $IMAGE_PULL_SECRET_WEBLOGIC was not created successfully"
85+
exit 1
86+
fi
87+
88+
IMAGE_TO_USE_IN_KRUN = "phx.ocir.io/weblogick8s/serverjre:8"
89+
90+
else
91+
IMAGE_TO_USE_IN_KRUN = "store/oracle/serverjre:8"
92+
fi
93+
94+
$SCRIPTPATH/krun.sh -t 300 -d ${RESULT_DIR} -i ${IMAGE_TO_USE_IN_KRUN} -m "${PV_ROOT}:/sharedparent" -c 'jar cf /sharedparent/pvarchive.jar /sharedparent/acceptance_test_pv' 2>&1 | tee ${outfile}
7395
if [ "$?" = "0" ]; then
74-
$SCRIPTPATH/krun.sh -t 300 -d ${RESULT_DIR} -m "${PV_ROOT}:/sharedparent" -c 'base64 /sharedparent/pvarchive.jar' > $RESULT_DIR/pvarchive.b64 2>&1
96+
$SCRIPTPATH/krun.sh -t 300 -d ${RESULT_DIR} -i ${IMAGE_TO_USE_IN_KRUN} -m "${PV_ROOT}:/sharedparent" -c 'base64 /sharedparent/pvarchive.jar' > $RESULT_DIR/pvarchive.b64 2>&1
7597
if [ "$?" = "0" ]; then
7698
base64 -di $RESULT_DIR/pvarchive.b64 > $ARCHIVE
7799
if [ "$?" = "0" ]; then

src/integration-tests/bash/cleanup.sh

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -358,6 +358,14 @@ if [ "${DELETE_FILES:-true}" = "true" ]; then
358358
--docker-username=$REPO_USERNAME \
359359
--docker-password=$REPO_PASSWORD \
360360
--docker-email=$REPO_EMAIL
361+
362+
echo "Checking Repo Secret"
363+
SECRET="`kubectl get secret $IMAGE_PULL_SECRET_WEBLOGIC | grep $IMAGE_PULL_SECRET_WEBLOGIC | wc | awk ' { print $1; }'`"
364+
if [ "$SECRET" != "1" ]; then
365+
echo "secret $IMAGE_PULL_SECRET_WEBLOGIC was not created successfully"
366+
exit 1
367+
fi
368+
361369
$SCRIPTPATH/krun.sh -i phx.ocir.io/weblogick8s/serverjre:8 -s ${IMAGE_PULL_SECRET_WEBLOGIC} -m "${PV_ROOT}:/sharedparent" -c 'id && rm -fr /sharedparent/acceptance_test_pv'
362370
else
363371
$SCRIPTPATH/krun.sh -m "${PV_ROOT}:/sharedparent" -c 'rm -fr /sharedparent/acceptance_test_pv'

0 commit comments

Comments
 (0)