bootc-base-images/.gitlab-ci.yml

43 lines
1.1 KiB
YAML

# Yes, we're using FCOS as a buildroot
image: quay.io/fedora/fedora-coreos:stable
stages:
- build
test-build:
parallel:
matrix:
- VARIANT:
- c9s
- fedora
only:
- merge_requests
stage: build
before_script:
# Log into the registry
- echo "$CI_REGISTRY_PASSWORD" | podman login -u "$CI_REGISTRY_USER" --password-stdin $CI_REGISTRY
script:
- rpm-ostree install distribution-gpg-keys
- rpm-ostree compose image --initialize --format=ociarchive ${VARIANT}.yaml ${VARIANT}.ociarchive
build-push:
parallel:
matrix:
- VARIANT:
- c9s
- fedora
rules:
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
variables:
COMPOSE_INITIALIZE: "1"
FORCE: ""
stage: build
before_script:
# Log into the registry
- echo "$CI_REGISTRY_PASSWORD" | podman login -u "$CI_REGISTRY_USER" --password-stdin $CI_REGISTRY
script:
- rpm-ostree install distribution-gpg-keys
- rpm-ostree compose image ${COMPOSE_INITIALIZE:+--initialize} ${FORCE:+--force-nocache} --format=registry ${VARIANT}.yaml ${CI_REGISTRY_IMAGE}/${VARIANT}-boot