From ca41fc9b58ad65b6d8115c77b8f94611e5e58eb1 Mon Sep 17 00:00:00 2001 From: Colin Walters Date: Thu, 7 Sep 2023 17:10:45 -0400 Subject: [PATCH 1/3] ci: Log into registry In preparation for pushing. --- .gitlab-ci.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 948c343..1aa3158 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -7,6 +7,9 @@ stages: build: 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 -i --format=ociarchive fedora.yaml fedora.oci-archive From c2ec7c0230c6306149309121a1b240406b30007d Mon Sep 17 00:00:00 2001 From: Colin Walters Date: Thu, 7 Sep 2023 17:14:46 -0400 Subject: [PATCH 2/3] ci: Push to integrated registry --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 1aa3158..4444415 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -12,5 +12,5 @@ build: - 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 -i --format=ociarchive fedora.yaml fedora.oci-archive + - rpm-ostree compose image --initialize --format=registry fedora.yaml ${CI_REGISTRY_IMAGE}/fedora From 2eb018ce443890157fff0985e7ed28a487248324 Mon Sep 17 00:00:00 2001 From: Colin Walters Date: Thu, 7 Sep 2023 17:32:51 -0400 Subject: [PATCH 3/3] ci: Don't --initialize by default We want change detection. Also expose `--force-nocache` because it may be useful in the future. --- .gitlab-ci.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 4444415..cc9cda0 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -6,11 +6,14 @@ stages: - build build: + variables: + COMPOSE_INITIALIZE: "" + 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 --initialize --format=registry fedora.yaml ${CI_REGISTRY_IMAGE}/fedora + - rpm-ostree compose image ${COMPOSE_INITIALIZE:+--initialize} ${FORCE:+--force-nocache} --format=registry fedora.yaml ${CI_REGISTRY_IMAGE}/fedora