From 912c27c9e44960b9df55d8a63f580ff82cb504be Mon Sep 17 00:00:00 2001 From: Tanguy Herbron Date: Wed, 10 Nov 2021 11:38:13 +0100 Subject: [PATCH] Change artifacts organization --- .gitlab-ci.yml | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 0698c8b..f6daef4 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,3 +1,8 @@ +variables: + DOCKER_DRIVER: overlay2 + DOCKER_HOST: tcp://docker:2375/ + DOCKER_BUILDKIT: 1 + stages: - prep - build @@ -7,22 +12,23 @@ fetch-versions: stage: prep script: - apk add git curl jq - - echo "export NEED_UPDATE=false" > status + - echo "export NEED_UPDATE=false" > .env - git clone https://gitlab.com/gitlab-org/omnibus-gitlab - cd omnibus-gitlab - "HALIA_VER=$(curl --request GET -L --header 'Accept: application/json' --header 'Content-Type: application/json' https://git.halia.dev/api/v4/projects/24/registry/repositories/6/tags | jq -r '.[].location' | grep -v latest | cut -d ':' -f2 | sort -V | tail -1)" - "GITLAB_VER=$(git tag | sort -V | grep ce | tail -1 | cut -d '+' -f1)" - - if [ $HALIA_VER != $GITLAB_VER ]; then echo "export NEED_UPDATE=false" > ../status; fi + - if [ $HALIA_VER != $GITLAB_VER ]; then echo "export NEED_UPDATE=true" > ../.env; fi artifacts: - paths: - - status - expire_in: 1 hour + reports: + dotenv: .env build-image: image: docker:latest stage: build services: - docker:dind + command: ["dockerd", "--host=tcp://0.0.0.0:2375"] + alias: "docker" script: - source status - if [ "$NEED_UPDATE" = false ]; then exit 0; fi @@ -30,3 +36,5 @@ build-image: - docker buildx create --name arm_builder - docker buildx use arm_builder - docker buildx inspect --bootstrap + rules: + - if: '$NEED_UPDATE = "true"'