This commit is contained in:
bsquillari 2023-11-29 14:35:07 +00:00
parent 42eeac8d2a
commit 469fc4734b
1 changed files with 10 additions and 0 deletions

View File

@ -70,6 +70,16 @@ preparation:
dotenv: context.env dotenv: context.env
.build-and-push-script: &build-and-push-script .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.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.test --build-arg "${BUILD_ARG_TEST}" -t ${TEST_IMAGE}
- docker push ${PROD_IMAGE} - docker push ${PROD_IMAGE}