Try to build and push separately

This commit is contained in:
Greg Hellings
2025-06-10 21:29:15 -05:00
parent 1c44dfad6f
commit a7475411e0
+19 -4
View File
@@ -1,6 +1,7 @@
stages: stages:
- eval - eval
- build - build
- push
default: default:
tags: tags:
@@ -24,13 +25,27 @@ default:
"Build image": "Build image":
stage: build stage: build
parallel: parallel: &parallel
matrix: matrix:
- IMG: - IMG:
- img-bitwarden - img-bitwarden
artifacts:
paths:
- "*.tar.gz"
script: script:
- nix run "nixpkgs#podman" -- login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" "$CI_REGISTRY" - nix run "nixpkgs#podman" -- login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" "$CI_REGISTRY"
- nix build ".#${IMG}" - nix build ".#${IMG}"
- nix run "nixpkgs#podman" -- load -i result - cp -L result "${IMG}.tar.gz"
- 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" "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"