From 24daa667eff995e42f805c06a0cc96adf920ed68 Mon Sep 17 00:00:00 2001 From: aron Date: Thu, 29 Aug 2024 15:45:46 +0200 Subject: [PATCH] Remove container later --- .gitlab-ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 03b0215d1..b8e1f487e 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -226,12 +226,11 @@ release-prod: - docker pull $CI_REGISTRY_IMAGE:$CI_COMMIT_TAG - CONTAINER_ID=$(docker create $CI_REGISTRY_IMAGE:$CI_COMMIT_TAG) - docker cp $CONTAINER_ID:/app/api/NOTICE api/NOTICE - - docker rm -v $CONTAINER_ID # Delete unnecessary files - rm -rf docs/docs/s docs/README.md docs/reporting_software.yml docs/wip docs/hooks.py dev .vscode api/.vscode # Build container with copyleft source code - - docker buildx build --build-arg BUILDKIT_INLINE_CACHE=1 --provenance false --cache-from $CI_REGISTRY_IMAGE:$CI_COMMIT_TAG --cache-from $CI_REGISTRY_IMAGE/api-statics:test-$VERSION_NUMBER_LEADING_ZEROS --target api-src --build-arg VERSION=$VERSION_NUMBER --target=api --platform linux/amd64,linux/arm64 --push --tag $DOCKER_HUB_IMAGE:$VERSION_NUMBER-src . + - docker buildx build --build-arg BUILDKIT_INLINE_CACHE=1 --provenance false --cache-from $CI_REGISTRY_IMAGE:$CI_COMMIT_TAG --cache-from $CI_REGISTRY_IMAGE/api-statics:test-$VERSION_NUMBER_LEADING_ZEROS --target api-src --build-arg VERSION=$VERSION_NUMBER --target=api-src --platform linux/amd64,linux/arm64 --push --tag $DOCKER_HUB_IMAGE:$VERSION_NUMBER-src . # Push containers to Docker Hub - docker buildx imagetools create $CI_REGISTRY_IMAGE:$CI_COMMIT_TAG --tag $DOCKER_HUB_IMAGE:$VERSION_NUMBER - docker buildx imagetools create $DOCKER_HUB_IMAGE:$VERSION_NUMBER --tag $DOCKER_HUB_IMAGE:latest @@ -248,6 +247,7 @@ release-prod: - sed -i "/^src\/static$/d" api/.gitignore # Copy pre-built rendering files - docker cp $CONTAINER_ID:/app/rendering/dist rendering/dist + - docker rm -v $CONTAINER_ID - sed -i "/^dist$/d" rendering/.gitignore - rm -rf api/.vscode # Create archive with prebuilt sources