File tree Expand file tree Collapse file tree 2 files changed +13
-3
lines changed
Expand file tree Collapse file tree 2 files changed +13
-3
lines changed Original file line number Diff line number Diff line change @@ -13,8 +13,6 @@ if [ -z "$DOCKER_REGISTRY" ]; then
1313 echo " Error: DOCKER_REGISTRY env variable needs to be set!"
1414 exit 1
1515fi
16-
17-
1816export IMAGE=${DOCKER_REGISTRY} /${IMAGE_NAME} :${IMAGE_VERSION}
1917
2018mvn clean package spring-boot:repackage
Original file line number Diff line number Diff line change @@ -16,6 +16,17 @@ if [ -z "$OCI_REGION" ]; then
1616 echo " Error: OCI_REGION env variable needs to be set!"
1717 exit 1
1818fi
19+
20+ if [ -z " $UI_USERNAME " ]; then
21+ echo " UI_USERNAME not set. Will get it with state_get"
22+ export UI_USERNAME=$( state_get UI_USERNAME)
23+ fi
24+
25+ if [ -z " $UI_USERNAME " ]; then
26+ echo " Error: UI_USERNAME env variable needs to be set!"
27+ exit 1
28+ fi
29+
1930echo " Creating springboot deplyoment and service"
2031export CURRENTTIME=$( date ' +%F_%H:%M:%S' )
2132echo CURRENTTIME is $CURRENTTIME ...this will be appended to generated deployment yaml
@@ -29,7 +40,8 @@ sed -e "s|%TODO_PDB_NAME%|${TODO_PDB_NAME}|g" todolistapp-springboot-${CURRENTTI
2940mv -- /tmp/todolistapp-springboot-$CURRENTTIME .yaml todolistapp-springboot-$CURRENTTIME .yaml
3041sed -e " s|%OCI_REGION%|${OCI_REGION} |g" todolistapp-springboot-${CURRENTTIME} .yaml > /tmp/todolistapp-springboot-$CURRENTTIME .yaml
3142mv -- /tmp/todolistapp-springboot-$CURRENTTIME .yaml todolistapp-springboot-$CURRENTTIME .yaml
32-
43+ sed -e " s|%UI_USERNAME%|${UI_USERNAME} |g" todolistapp-springboot-${CURRENTTIME} .yaml > /tmp/todolistapp-springboot-$CURRENTTIME .yaml
44+ mv -- /tmp/todolistapp-springboot-$CURRENTTIME .yaml todolistapp-springboot-$CURRENTTIME .yaml
3345if [ -z " $1 " ]; then
3446 kubectl apply -f $SCRIPT_DIR /todolistapp-springboot-$CURRENTTIME .yaml -n mtdrworkshop
3547else
You can’t perform that action at this time.
0 commit comments