Try to build and push separately
This commit is contained in:
+19
-4
@@ -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: ¶llel
|
||||||
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"
|
||||||
|
|||||||
Reference in New Issue
Block a user