1
0
Fork 0

Upgrade .gitlab-ci process

This patch will upgrade to the newer gitlab-ci build process using
podman.
This commit is contained in:
Sheogorath 2020-07-05 23:12:14 +02:00
parent 2dd7d2c967
commit 3f92097466
No known key found for this signature in database
GPG key ID: C9B1C80737B9CE18
2 changed files with 19 additions and 30 deletions

View file

@ -1,38 +1,27 @@
image: quay.io/sheogorath/ubuntu-ci:18.04
image: quay.io/sheogorath/build-ah-engine
services:
- docker:dind
variables:
LANG: C.UTF-8
before_script:
- podman login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" $CI_REGISTRY
stages:
- analyse
- build
- deploy
build-master:
stage: build
variables:
DOCKER_HOST: "tcp://docker:2375"
LANG: C.UTF-8
before_script:
- docker login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" $CI_REGISTRY
script:
- docker build --pull -t "$CI_REGISTRY_IMAGE" .
- docker push "$CI_REGISTRY_IMAGE"
only:
- master
tags:
- docker
- tag
build:
stage: build
variables:
DOCKER_HOST: "tcp://docker:2375"
LANG: C.UTF-8
before_script:
- docker login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" $CI_REGISTRY
script:
- docker build --pull -t "$CI_REGISTRY_IMAGE:$CI_COMMIT_REF_SLUG" .
- docker push "$CI_REGISTRY_IMAGE:$CI_COMMIT_REF_SLUG"
except:
- podman build --pull -t "$CI_REGISTRY_IMAGE:$CI_COMMIT_REF_SLUG" .
- podman push "$CI_REGISTRY_IMAGE:$CI_COMMIT_REF_SLUG"
tagging-master:
stage: tag
script:
- podman pull "$CI_REGISTRY_IMAGE:$CI_COMMIT_REF_SLUG"
- si-tagging -l "$CI_REGISTRY_IMAGE:$CI_COMMIT_REF_SLUG" "$CI_REGISTRY_IMAGE" "$(grep -e 'FROM docker.io/gitlab/gitlab-runner:v' Dockerfile | sed -e 's/.*:v//')"
- podman images --format "{{.Repository}}:{{.Tag}}" "$CI_REGISTRY_IMAGE" | grep "$CI_REGISTRY_IMAGE" | xargs -L 1 podman push
only:
- master
tags:
- docker

View file

@ -1,4 +1,4 @@
FROM gitlab/gitlab-runner:latest
FROM gitlab/gitlab-runner:13.1.1
RUN true \
&& apt-get update \