@@ -69,9 +69,31 @@ function state_dump {
69
69
# use a run to archive PV, /sharedparent mounts to PV_ROOT in the K8S cluster
70
70
echo " Archiving pv directory using a kubernetes run. Look for it on k8s cluster in $PV_ROOT /acceptance_test_pv_archive"
71
71
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}
73
95
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
75
97
if [ " $? " = " 0" ]; then
76
98
base64 -di $RESULT_DIR /pvarchive.b64 > $ARCHIVE
77
99
if [ " $? " = " 0" ]; then
0 commit comments