Skip to content

Commit 6ec608a

Browse files
fix: print lagoonyaml validation completion before dockercompose validation (#456)
1 parent 948ebf3 commit 6ec608a

File tree

1 file changed

+14
-13
lines changed

1 file changed

+14
-13
lines changed

legacy/build-deploy-docker-compose.sh

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -282,6 +282,20 @@ https://docs.lagoon.sh/using-lagoon-the-basics/lagoon-yml/
282282
exit 1
283283
fi
284284

285+
# Validate .lagoon.yml only, no overrides. lagoon-linter still has checks that
286+
# aren't in build-deploy-tool.
287+
if ! lagoon-linter; then
288+
echo "${LAGOON_FEATURE_FLAG_DEFAULT_DOCUMENTATION_URL}/lagoon/using-lagoon-the-basics/lagoon-yml#restrictions describes some possible reasons for this build failure."
289+
echo "If you require assistance to fix this error, please contact support."
290+
exit 1
291+
else
292+
echo "lagoon-linter found no issues with the .lagoon.yml file"
293+
fi
294+
295+
currentStepEnd="$(date +"%Y-%m-%d %H:%M:%S")"
296+
finalizeBuildStep "${buildStartTime}" "${previousStepEnd}" "${currentStepEnd}" "${NAMESPACE}" "lagoonYmlValidation" ".lagoon.yml Validation" "false"
297+
previousStepEnd=${currentStepEnd}
298+
285299
# The attempt to valid the `docker-compose.yaml` file
286300
beginBuildStep "Docker Compose Validation" "dockerComposeValidation"
287301

@@ -412,16 +426,6 @@ else
412426
fi
413427
set -e
414428

415-
# Validate .lagoon.yml only, no overrides. lagoon-linter still has checks that
416-
# aren't in build-deploy-tool.
417-
if ! lagoon-linter; then
418-
echo "${LAGOON_FEATURE_FLAG_DEFAULT_DOCUMENTATION_URL}/lagoon/using-lagoon-the-basics/lagoon-yml#restrictions describes some possible reasons for this build failure."
419-
echo "If you require assistance to fix this error, please contact support."
420-
exit 1
421-
else
422-
echo "lagoon-linter found no issues with the .lagoon.yml file"
423-
fi
424-
425429
##################
426430
# build deploy-tool can collect this value now from the lagoon.yml file
427431
# this means further use of `LAGOON_GIT_SHA` can eventually be
@@ -442,9 +446,6 @@ else
442446
fi
443447
##################
444448

445-
currentStepEnd="$(date +"%Y-%m-%d %H:%M:%S")"
446-
finalizeBuildStep "${buildStartTime}" "${previousStepEnd}" "${currentStepEnd}" "${NAMESPACE}" "lagoonYmlValidation" ".lagoon.yml Validation" "false"
447-
previousStepEnd=${currentStepEnd}
448449
beginBuildStep "Configure Variables" "configuringVariables"
449450

450451
# Load all Services that are defined

0 commit comments

Comments
 (0)