27 lines
996 B
YAML
27 lines
996 B
YAML
default:
|
|
image: docker:27.0.3
|
|
services:
|
|
- docker:27.0.3-dind
|
|
before_script:
|
|
- docker info
|
|
|
|
variables:
|
|
# Major.Minor.Release
|
|
# Major - Shouldn't change often, Big changes to the site
|
|
# Minor - starts from 0 when Major is incremented +1 for each version that goes public
|
|
# Release - For each time a development milestone is reached
|
|
VERSION: 1.3.11
|
|
BUILD: 1 # If set to 0 gitlab will not build the image
|
|
IMAGE_TAG: $CI_REGISTRY_IMAGE:$VERSION
|
|
DOCKER_TLS_CERTDIR: "/certs"
|
|
|
|
build:
|
|
stage: build
|
|
script:
|
|
- docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
|
|
- docker context create tls-environment
|
|
- docker buildx create --use tls-environment --name multi-arch-builder
|
|
- docker buildx build --build-arg GITLAB_TOKEN=$GITLAB_TOKEN --no-cache --platform linux/arm64,linux/amd64 -t $IMAGE_TAG --push .
|
|
rules:
|
|
- if: $CI_PIPELINE_SOURCE == "push" && ($CI_COMMIT_BRANCH == "main" || $CI_COMMIT_BRANCH == "staging") && $BUILD == "1"
|