Skip to content

Commit

Permalink
Merge branch 'no-multi-arch-images' into 'main'
Browse files Browse the repository at this point in the history
Build no multi-arch images in Gitlab

See merge request ExplorViz/code/frontend!233
  • Loading branch information
Malte-Hansen committed Nov 13, 2024
2 parents 523b3c1 + 5c0fad3 commit aa84d46
Showing 1 changed file with 4 additions and 72 deletions.
76 changes: 4 additions & 72 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -73,57 +73,23 @@ build-prod-noauth:
before_script:
- export AUTH0_ENABLED=false

deploy-main-amd64:
extends:
- .build-and-deploy
dependencies:
- build-prod
variables:
DOCKERHUB_TAG: 'amd64'
rules:
- if: '$CI_PIPELINE_SOURCE == "push" && $CI_PIPELINE_SOURCE != "schedule" && $CI_COMMIT_BRANCH == "main"'

deploy-main-arm64:
extends:
- .build-and-deploy
dependencies:
- build-prod
tags:
- 'arm64'
variables:
DOCKERHUB_TAG: 'arm64'
rules:
- if: $MULTI_ARCH_BUILD || $ARM64_BUILD

deploy-dev-noauth-amd64:
deploy-dev-noauth:
extends:
- .build-and-deploy
dependencies:
- build-prod-noauth
variables:
DOCKERHUB_TAG: 'dev-noauth-amd64'
DOCKERHUB_TAG: 'dev-noauth'
rules:
- if: '$CI_PIPELINE_SOURCE == "push" && $CI_PIPELINE_SOURCE != "schedule" && $CI_COMMIT_BRANCH == "main"'

deploy-dev-noauth-arm64:
extends:
- .build-and-deploy
dependencies:
- build-prod-noauth
tags:
- 'arm64'
variables:
DOCKERHUB_TAG: 'dev-noauth-arm64'
rules:
- if: $MULTI_ARCH_BUILD || $ARM64_BUILD

deploy-merge-request:
deploy-merge-request-auth:
extends:
- .build-and-deploy
dependencies:
- build-prod
variables:
DOCKERHUB_TAG: mr-$CI_MERGE_REQUEST_IID
DOCKERHUB_TAG: mr-$CI_MERGE_REQUEST_IID-noauth
rules:
- if: '$CI_PIPELINE_SOURCE == "merge_request_event" && $CI_MERGE_REQUEST_TARGET_BRANCH_NAME == "main"'

Expand All @@ -136,37 +102,3 @@ deploy-merge-request-noauth:
DOCKERHUB_TAG: mr-$CI_MERGE_REQUEST_IID-noauth
rules:
- if: '$CI_PIPELINE_SOURCE == "merge_request_event" && $CI_MERGE_REQUEST_TARGET_BRANCH_NAME == "main"'

retag-main-amd64-as-latest:
extends: .retag-dockerhub-image
rules:
- if: $MULTI_ARCH_BUILD || $ARM64_BUILD
when: never
- if: '$CI_PIPELINE_SOURCE == "push" && $CI_PIPELINE_SOURCE != "schedule" && $CI_COMMIT_BRANCH == "main"'
- if: '$CI_PIPELINE_SOURCE == "pipeline"'
variables:
SOURCE_TAG: 'amd64'
TARGET_TAG: 'latest'
cache:

retag-dev-noauth-amd64:
extends: .retag-dockerhub-image
rules:
- if: $MULTI_ARCH_BUILD || $ARM64_BUILD
when: never
- if: '$CI_PIPELINE_SOURCE == "push" && $CI_PIPELINE_SOURCE != "schedule" && $CI_COMMIT_BRANCH == "main"'
- if: '$CI_PIPELINE_SOURCE == "pipeline"'
variables:
SOURCE_TAG: 'dev-noauth-amd64'
TARGET_TAG: 'dev-noauth'
cache:

publish-multi-arch-latest:
extends: .retag-as-multi-arch-dockerhub-image
cache:

publish-multi-arch-dev-noauth:
variables:
TAG_PREFIX: 'dev-noauth-'
extends: .retag-as-multi-arch-dockerhub-image
cache:

0 comments on commit aa84d46

Please sign in to comment.