Skip to content
Snippets Groups Projects
Commit c9d60a30 authored by Kay Effenberger's avatar Kay Effenberger
Browse files

FEAT(gitlab-ci): remove comments for docker build

parent 0a0d2a28
No related branches found
No related tags found
5 merge requests!7FEAT(multi-arch): add support for multi arch,!6FEAT(multi-arch): add support for multi arch,!5FEAT(multi-arch): add support for multi arch,!4FEAT(multi-arch): add support for multi arch,!3FEAT(multi-arch): add support for multi arch
This commit is part of merge request !7. Comments created here will be created in the context of that merge request.
......@@ -55,56 +55,56 @@ check_style:
- make lint
- make spell
# docker-push:
# # Use the docker image with buildx support for multi arch.
# image: jonoh/docker-buildx-qemu
# stage: release
# variables:
# # the name of the image without version
# AURA_IMAGE_NAME: "autoradio/engine-recorder"
# services:
# - docker:dind
# before_script:
# # default repo is docker.io (aka docker hub)
# - docker login -u "$DOCKER_ID" -p "$DOCKER_HUB_AUTH"
# - docker buildx create --driver docker-container --use
# - docker buildx inspect --bootstrap
# script:
# # Important: Ensures execution of other binary formats is enabled in the kernel
# - update-binfmts --enable
# # every commit on main branch should build image as unstable
# # else it is from a tag (enforced by gitlab-ci rules)
# # hint: tags are references independent of branches
# - |
# if [ "$CI_COMMIT_BRANCH" == "$CI_DEFAULT_BRANCH" ]
# then docker buildx build --platform linux/arm/v7,linux/arm64/v8,linux/amd64 -t $AURA_IMAGE_NAME:unstable --push.
# else docker buildx build --platform linux/arm/v7,linux/arm64/v8,linux/amd64 -t $AURA_IMAGE_NAME -t $AURA_IMAGE_NAME:$CI_COMMIT_TAG --push.
# fi
#
# rules:
# # - *release-rules
# - if: $CI_COMMIT_TAG =~ /^\d+[.]\d+[.]\d+$/ || $CI_COMMIT_TAG =~ /^\d+[.]\d+[.]\d+[-]\S+$/
# exists:
# - Dockerfile
# # every commit on master/main branch should trigger a push to docker-hub as unstable without a release
# - if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
# exists:
# - Dockerfile
docker-push:
# Use the docker image with buildx support for multi arch.
image: jonoh/docker-buildx-qemu
stage: release
variables:
# the name of the image without version
AURA_IMAGE_NAME: "autoradio/engine-recorder"
services:
- docker:dind
before_script:
# default repo is docker.io (aka docker hub)
- docker login -u "$DOCKER_ID" -p "$DOCKER_HUB_AUTH"
- docker buildx create --driver docker-container --use
- docker buildx inspect --bootstrap
script:
# Important: Ensures execution of other binary formats is enabled in the kernel
- update-binfmts --enable
# every commit on main branch should build image as unstable
# else it is from a tag (enforced by gitlab-ci rules)
# hint: tags are references independent of branches
- |
if [ "$CI_COMMIT_BRANCH" == "$CI_DEFAULT_BRANCH" ]
then docker buildx build --platform linux/arm/v7,linux/arm64/v8,linux/amd64 -t $AURA_IMAGE_NAME:unstable --push.
else docker buildx build --platform linux/arm/v7,linux/arm64/v8,linux/amd64 -t $AURA_IMAGE_NAME -t $AURA_IMAGE_NAME:$CI_COMMIT_TAG --push.
fi
# release_job:
# stage: release
# needs:
# - docker-push
# image: registry.gitlab.com/gitlab-org/release-cli:latest
# rules:
# # - *release-rules
# - if: $CI_COMMIT_TAG =~ /^\d+[.]\d+[.]\d+$/ || $CI_COMMIT_TAG =~ /^\d+[.]\d+[.]\d+[-]\S+$/
# exists:
# - Dockerfile
# script:
# - echo "this will be a release when there is a tag, but tags should be protected to be only createable by maintainers."
# release:
# name: 'Release $CI_COMMIT_TAG'
# description: ./CHANGELOG
# tag_name: '$CI_COMMIT_TAG'
# ref: '$CI_COMMIT_TAG'
rules:
# - *release-rules
- if: $CI_COMMIT_TAG =~ /^\d+[.]\d+[.]\d+$/ || $CI_COMMIT_TAG =~ /^\d+[.]\d+[.]\d+[-]\S+$/
exists:
- Dockerfile
# every commit on master/main branch should trigger a push to docker-hub as unstable without a release
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
exists:
- Dockerfile
release_job:
stage: release
needs:
- docker-push
image: registry.gitlab.com/gitlab-org/release-cli:latest
rules:
# - *release-rules
- if: $CI_COMMIT_TAG =~ /^\d+[.]\d+[.]\d+$/ || $CI_COMMIT_TAG =~ /^\d+[.]\d+[.]\d+[-]\S+$/
exists:
- Dockerfile
script:
- echo "this will be a release when there is a tag, but tags should be protected to be only createable by maintainers."
release:
name: 'Release $CI_COMMIT_TAG'
description: ./CHANGELOG
tag_name: '$CI_COMMIT_TAG'
ref: '$CI_COMMIT_TAG'
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment