Skip to content

Commit 2566136

Browse files
committed
refactor: add image compelete label support
1 parent 916fb27 commit 2566136

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

legacy/build-deploy-docker-compose.sh

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
export LAGOON_BUILD_NAME=$HOSTNAME
66

77
BUILD_WARNING_COUNT=0
8+
IMAGE_BUILD_PUSH_COMPLETE="false"
89

910
function cronScheduleMoreOftenThan30Minutes() {
1011
#takes a unexpanded cron schedule, returns 0 if it's more often that 30 minutes
@@ -150,7 +151,7 @@ function beginBuildStep() {
150151
# patch the buildpod with the buildstep
151152
if [ "${SCC_CHECK}" == false ]; then
152153
kubectl patch -n ${NAMESPACE} pod ${LAGOON_BUILD_NAME} \
153-
-p "{\"metadata\":{\"labels\":{\"lagoon.sh/buildStep\":\"${2}\"}}}" &> /dev/null
154+
-p "{\"metadata\":{\"labels\":{\"lagoon.sh/buildStep\":\"${2}\",\"build.lagoon.sh/images-complete\":\"${IMAGE_BUILD_PUSH_COMPLETE}\"}}}" &> /dev/null
154155
# tiny sleep to allow patch to complete before logs roll again
155156
sleep 0.5s
156157
fi
@@ -967,6 +968,9 @@ if [ "${DEPRECATED_IMAGE_WARNINGS}" == "true" ]; then
967968
finalizeBuildStep "${buildStartTime}" "${previousStepEnd}" "${currentStepEnd}" "${NAMESPACE}" "deprecatedImagesComplete" "Deprecated Image Warnings" "true"
968969
fi
969970

971+
# set that the image build and push phase has ended
972+
IMAGE_BUILD_PUSH_COMPLETE="true"
973+
970974
previousStepEnd=${currentStepEnd}
971975
beginBuildStep "Service Configuration Phase" "serviceConfigurationPhase"
972976

0 commit comments

Comments
 (0)