Skip to content
Snippets Groups Projects
Verified Commit 2ac25286 authored by Sheogorath's avatar Sheogorath :european_castle:
Browse files

Rework CI setup

Getting rid of the old build & build-master CI setup and replace it with
a more advanced setup using the new si-tools to manage release images.

It also introduces release versions for build-ah-engine which should
become handy in the future.
parent e7a5b727
No related branches found
No related tags found
No related merge requests found
Pipeline #2291 passed
# Official docker image.
image: quay.io/sheogorath/build-ah-engine image: quay.io/sheogorath/build-ah-engine
stages:
- analyse
- build
- test
- tag
- deploy
before_script: before_script:
- podman login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" $CI_REGISTRY - podman login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" $CI_REGISTRY
build-master: variables:
stage: build BAE_VERSION: "1.0.0"
script: SI_TOOLS_VERSION: "0.2.0"
- podman build --pull -t "$CI_REGISTRY_IMAGE" .
- podman push "$CI_REGISTRY_IMAGE"
only:
- master
tags:
- docker
build: build:
stage: build stage: build
script: script:
- podman build --pull -t "$CI_REGISTRY_IMAGE:$CI_COMMIT_REF_SLUG" . - podman build --pull --build-arg SI_TOOLS_VERSION -t "$CI_REGISTRY_IMAGE:$CI_COMMIT_REF_SLUG" .
- podman 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" "${BAE_VERSION}"
- si-push "$CI_REGISTRY_IMAGE"
only:
- master - master
tags:
- docker
...@@ -2,12 +2,14 @@ FROM fedora:31 ...@@ -2,12 +2,14 @@ FROM fedora:31
COPY resources/storage.conf /etc/containers/ COPY resources/storage.conf /etc/containers/
ARG SI_TOOLS_VERSION=master
RUN true\ RUN true\
&& dnf -y upgrade \ && dnf -y upgrade \
&& dnf -y install podman buildah findutils git \ && dnf -y install podman buildah findutils git \
&& dnf clean all \ && dnf clean all \
&& sed -e 's/cgroup_manager =.*/cgroup_manager = "cgroupfs"/' /usr/share/containers/libpod.conf > /etc/containers/libpod.conf \ && sed -e 's/cgroup_manager =.*/cgroup_manager = "cgroupfs"/' /usr/share/containers/libpod.conf > /etc/containers/libpod.conf \
&& git clone https://git.shivering-isles.com/shivering-isles/shell-tools.git ./shell-tools \ && git clone -b "$SI_TOOLS_VERSION" --depth=3 https://git.shivering-isles.com/shivering-isles/shell-tools.git ./shell-tools \
&& ./shell-tools/install.sh \ && ./shell-tools/install.sh \
&& rm -rf ./shell-tools \ && rm -rf ./shell-tools \
&& true && true
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment