From 469fc4734ba16f264f8f3f86559b5a670031e2a2 Mon Sep 17 00:00:00 2001 From: bsquillari Date: Wed, 29 Nov 2023 14:35:07 +0000 Subject: [PATCH] Fix cicd --- .gitlab-ci.yml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 8103b4c..62a7d47 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -70,6 +70,16 @@ preparation: dotenv: context.env .build-and-push-script: &build-and-push-script + - | + if [[ -z "${BUILD_ARG_PROD}" ]]; then + BUILD_ARG_PROD="x=x" + fi + if [[ -z "${BUILD_ARG_PROD_OTHER}" ]]; then + BUILD_ARG_PROD_OTHER="x=x" + fi + if [[ -z "${BUILD_ARG_TEST}" ]]; then + BUILD_ARG_TEST="x=x" + fi - docker build ${FOLDER} -f ${FOLDER}/Dockerfile.prod --build-arg "${BUILD_ARG_PROD}" --build-arg "${BUILD_ARG_PROD_OTHER}" -t ${PROD_IMAGE} - docker build ${FOLDER} -f ${FOLDER}/Dockerfile.test --build-arg "${BUILD_ARG_TEST}" -t ${TEST_IMAGE} - docker push ${PROD_IMAGE}