From 1380fbccbec044b70f2f8614706bf3d191b5bfb3 Mon Sep 17 00:00:00 2001 From: Santiago Lo Coco Date: Fri, 1 Dec 2023 14:25:14 -0300 Subject: [PATCH] Update .gitlab-ci.yml --- .gitlab-ci.yml | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 62a7d47..88c7231 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -14,6 +14,8 @@ default: - api_failure before_script: - docker login -u $CI_REGISTRY_USER --password $CI_JOB_TOKEN $CI_REGISTRY + artifacts: + expire_in: 1 week stages: - prep @@ -70,18 +72,8 @@ 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 build ${FOLDER} -f ${FOLDER}/Dockerfile.prod --build-arg "${BUILD_ARG_PROD-x}" --build-arg "${BUILD_ARG_PROD_OTHER-x}" -t ${PROD_IMAGE} + - docker build ${FOLDER} -f ${FOLDER}/Dockerfile.test -t ${TEST_IMAGE} - docker push ${PROD_IMAGE} - docker push ${TEST_IMAGE}