From a7475411e0ca651b4478f18a74a8bdeec16ee375 Mon Sep 17 00:00:00 2001 From: Greg Hellings Date: Tue, 10 Jun 2025 21:29:15 -0500 Subject: [PATCH] Try to build and push separately --- .gitlab-ci.yml | 23 +++++++++++++++++++---- 1 file changed, 19 insertions(+), 4 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 4d98d16..4bb4245 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,6 +1,7 @@ stages: - eval - build + - push default: tags: @@ -24,13 +25,27 @@ default: "Build image": stage: build - parallel: + parallel: ¶llel matrix: - IMG: - img-bitwarden + artifacts: + paths: + - "*.tar.gz" script: - nix run "nixpkgs#podman" -- login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" "$CI_REGISTRY" - nix build ".#${IMG}" - - nix run "nixpkgs#podman" -- load -i result - - nix run "nixpkgs#podman" -- tag "localhost/${IMG}:latest" "$CI_REGISTRY/greg/ci-images/${IMG}:latest" - - nix run "nixpkgs#podman" -- push "$CI_REGISTRY/greg/ci-images/${IMG}:latest" + - cp -L result "${IMG}.tar.gz" + +"Push Image": + stage: push + parallel: *parallel + dependencies: + - "Build image" + image: podman:latest + tags: + - kubernetes + script: + - podman load -i "${IMG}.tar.gz" + - podman tag "localhost/${IMG}:latest" "$CI_REGISTRY/greg/ci-images/${IMG}:latest" + - podman push "$CI_REGISTRY/greg/ci-images/${IMG}:latest"