Skip to content

Commit

Permalink
Merge branch 'prebuild-docker-images' into 'main'
Browse files Browse the repository at this point in the history
Build languagetool without cache for test releases

See merge request reportcreator/reportcreator!671
  • Loading branch information
aronmolnar committed Aug 28, 2024
2 parents b013e17 + b22d16c commit c61783f
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -179,18 +179,19 @@ build-release:
if [[ $CI_COMMIT_TAG =~ '^prod-.*' ]]; then
grep -qE "^## (v${VERSION_NUMBER})" CHANGELOG.md || exit 1
CACHE_RELEASE_TAG=$(test-$VERSION_NUMBER_LEADING_ZEROS)
docker pull $CI_REGISTRY_IMAGE/languagetool:$CACHE_RELEASE_TAG
cd languagetool
docker buildx build --provenance false --cache-from $CI_REGISTRY_IMAGE/languagetool:$CACHE_RELEASE_TAG --target=api --platform linux/amd64,linux/arm64 --push -t $CI_REGISTRY_IMAGE/languagetool:$CI_COMMIT_SHORT_SHA .
cd ..
else
CACHE_RELEASE_TAG=$CI_COMMIT_SHORT_SHA
docker buildx build --provenance false --target=api --platform linux/amd64,linux/arm64 --push -t $CI_REGISTRY_IMAGE/languagetool:$CI_COMMIT_SHORT_SHA .
fi
# Build containers
- docker pull $CI_REGISTRY_IMAGE/frontend-test:$CACHE_RELEASE_TAG
- docker pull $CI_REGISTRY_IMAGE/api-test:$CACHE_RELEASE_TAG
- docker pull $CI_REGISTRY_IMAGE/languagetool:$CACHE_RELEASE_TAG
- export VERSION_NUMBER
- docker buildx build --provenance false --build-arg VERSION="$VERSION_NUMBER" --cache-from $CI_REGISTRY_IMAGE/frontend-test:$CACHE_RELEASE_TAG --cache-from $CI_REGISTRY_IMAGE/api-test:$CACHE_RELEASE_TAG --target=api --platform linux/amd64,linux/arm64 --push --tag $CI_REGISTRY_IMAGE:$CI_COMMIT_SHORT_SHA .
- cd languagetool
- docker buildx build --provenance false --cache-from $CI_REGISTRY_IMAGE/languagetool:$CACHE_RELEASE_TAG --target=api --platform linux/amd64,linux/arm64 --push -t $CI_REGISTRY_IMAGE/languagetool:$CI_COMMIT_SHORT_SHA .
- cd ..

release-docker-internal:
stage: release
Expand Down

0 comments on commit c61783f

Please sign in to comment.