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

ci(kOS): Unify build pipelines after global switch to Podman

This patch re-unifies the build pipelines for images including kOS to use
a central CI definition instead of a specific one for kOS.
parent 9f47807d
No related branches found
No related tags found
No related merge requests found
Pipeline #16377 passed
--- ---
include: include:
- local: 'images/.utils/gitlab-ci.yaml' - local: 'images/.utils/gitlab-ci.yaml'
- local: 'images/kos/.gitlab-ci.yaml'
- local: 'charts/.utils/gitlab-ci.yaml' - local: 'charts/.utils/gitlab-ci.yaml'
stages: stages:
- lint - lint
......
...@@ -7,6 +7,7 @@ ...@@ -7,6 +7,7 @@
- koolbox - koolbox
- synadm - synadm
- query-exposer - query-exposer
- kos
container-build-release: container-build-release:
stage: build stage: build
......
### This separate build pipeline is required, because rpm-ostree and kaniko don't work together as expected.
build-kos:
stage: build
image: quay.io/containers/podman:v4.3.1
variables:
CI_REGISTRY_IMAGE: quay.io/shivering-isles/kos
before_script:
- podman login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" $CI_REGISTRY
script:
- podman build --pull
--label "org.opencontainers.image.source=$CI_PROJECT_URL/-/tree/$CI_COMMIT_SHA/images/kos"
--label "org.opencontainers.image.revision=$CI_COMMIT_SHA"
--label "org.opencontainers.image.title=kOS"
--label "quay.expires-after=12w"
-t "$CI_REGISTRY_IMAGE:$CI_COMMIT_REF_SLUG-$CI_COMMIT_SHORT_SHA"
--format docker
images/kos
- podman push "$CI_REGISTRY_IMAGE:$CI_COMMIT_REF_SLUG-$CI_COMMIT_SHORT_SHA"
- podman push "$CI_REGISTRY_IMAGE:$CI_COMMIT_REF_SLUG-$CI_COMMIT_SHORT_SHA" "$CI_REGISTRY_IMAGE:$CI_COMMIT_REF_SLUG"
rules:
- if: '$CI_COMMIT_BRANCH != $CI_DEFAULT_BRANCH && $CI_PIPELINE_SOURCE == "push"'
changes:
paths:
- images/kos/**/*
compare_to: main
tags:
- hetzner
### This separate build pipeline is required, because rpm-ostree and kaniko don't work together as expected.
build-kos-release:
stage: build
image: quay.io/containers/podman:v4.3.1
variables:
CI_REGISTRY_IMAGE: quay.io/shivering-isles/kos
before_script:
- podman login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" $CI_REGISTRY
script:
- . images/kos/.release
export release
- podman build --pull
--label "org.opencontainers.image.source=$CI_PROJECT_URL/-/tree/$CI_COMMIT_SHA/images/kos"
--label "org.opencontainers.image.revision=$CI_COMMIT_SHA"
--label "org.opencontainers.image.title=kOS"
-t "$CI_REGISTRY_IMAGE:$CI_COMMIT_REF_SLUG-$CI_COMMIT_SHORT_SHA"
--format docker
images/kos
- podman push "$CI_REGISTRY_IMAGE:$CI_COMMIT_REF_SLUG-$CI_COMMIT_SHORT_SHA"
- podman push "$CI_REGISTRY_IMAGE:$CI_COMMIT_REF_SLUG-$CI_COMMIT_SHORT_SHA" "$CI_REGISTRY_IMAGE:${release}"
rules:
- if: '$CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH && $CI_PIPELINE_SOURCE == "push"'
changes:
paths:
- images/kos/**/*
tags:
- hetzner
\ No newline at end of file
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