Refactor: Upgrade build instructions to new CI setup
Thge new build will use podman, build-ah-engine and other fancy projects I build over the past. This should make the the builds more sustainable for the the future.
This commit is contained in:
parent
a908115776
commit
698b12d549
2 changed files with 21 additions and 29 deletions
|
@ -1,38 +1,30 @@
|
||||||
image: quay.io/sheogorath/ubuntu-ci:18.04
|
image: quay.io/sheogorath/build-ah-engine
|
||||||
|
|
||||||
services:
|
variables:
|
||||||
- docker:dind
|
LANG: C.UTF-8
|
||||||
|
|
||||||
|
before_script:
|
||||||
|
- podman login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" $CI_REGISTRY
|
||||||
|
|
||||||
stages:
|
stages:
|
||||||
|
- analyse
|
||||||
- build
|
- build
|
||||||
|
- test
|
||||||
|
- tag
|
||||||
- deploy
|
- 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
|
|
||||||
|
|
||||||
build:
|
build:
|
||||||
stage: 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:
|
script:
|
||||||
- docker build --pull -t "$CI_REGISTRY_IMAGE:$CI_COMMIT_REF_SLUG" .
|
- podman build --pull -t "$CI_REGISTRY_IMAGE:$CI_COMMIT_REF_SLUG" .
|
||||||
- docker push "$CI_REGISTRY_IMAGE:$CI_COMMIT_REF_SLUG"
|
- podman push "$CI_REGISTRY_IMAGE:$CI_COMMIT_REF_SLUG"
|
||||||
except:
|
|
||||||
|
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
|
- master
|
||||||
tags:
|
|
||||||
- docker
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
FROM gitlab/gitlab-runner:latest
|
FROM docker.io/gitlab/gitlab-runner:v12.9.0
|
||||||
|
|
||||||
LABEL maintainer="Sheogorath <sheogorath@shivering-isles.com>"
|
LABEL maintainer="Sheogorath <sheogorath@shivering-isles.com>"
|
||||||
ARG HETZNER_VERSION=1.2.2
|
ARG HETZNER_VERSION=1.2.2
|
||||||
|
|
Reference in a new issue