ci(gitlab-ci): fix the bash syntax fix

This commit is contained in:
Sarah Vaupel 2024-09-05 02:01:59 +02:00
parent f79a024dca
commit 1fd0abb8e8

View File

@ -87,9 +87,9 @@ setup:containers:frontend:
- curl --request GET --header "PRIVATE-TOKEN:${REGISTRY_AUTH_TOKEN}" "${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/registry/repositories?tags=true" > .gitlab-ci/.container-registry-contents.json
- IMAGE_EXISTS=`grep \""${REGISTRY_DESTINATION}"\" .gitlab-ci/.container-registry-contents.json`
- cat .gitlab-ci/.container-registry-contents.json
- test ${CI_JOB_MANUAL} = true && echo "Force rebuilding container."
- test "${CI_JOB_MANUAL}" = true && echo "Force rebuilding container."
- >
if [ -z ${IMAGE_EXISTS} -o ${CI_JOB_MANUAL} = true ] ; then
if [ -z "${IMAGE_EXISTS}" -o "${CI_JOB_MANUAL}" = true ] ; then
echo "Building image..."
buildah bud -t ${IMAGE_TAG} --build-arg PROJECT_DIR=${CI_PROJECT_DIR} --volume ${CI_PROJECT_DIR}:/tmp/${CI_PROJECT_DIR} --file docker/frontend/Dockerfile
buildah push --creds "${CI_REGISTRY_USER}:${CI_JOB_TOKEN}" ${IMAGE_TAG} ${REGISTRY_DESTINATION}