Build and push together
This commit is contained in:
+8
-19
@@ -25,37 +25,26 @@ default:
|
|||||||
|
|
||||||
"Build image":
|
"Build image":
|
||||||
stage: build
|
stage: build
|
||||||
|
tags:
|
||||||
|
- kubernetes
|
||||||
|
image: "nixos/nix:latest"
|
||||||
parallel: ¶llel
|
parallel: ¶llel
|
||||||
matrix:
|
matrix:
|
||||||
- IMG:
|
- IMG:
|
||||||
- img-bitwarden
|
- img-bitwarden
|
||||||
- img-immich
|
- img-immich
|
||||||
artifacts:
|
|
||||||
paths:
|
|
||||||
- "*.tar.gz"
|
|
||||||
script:
|
script:
|
||||||
- nix build ".#${IMG}"
|
- nix build ".#${IMG}"
|
||||||
- cp -L result "${IMG}.tar.gz"
|
- cp -L result "${IMG}.tar.gz"
|
||||||
|
- nix build "nixpkgs#podman" --out-link podman
|
||||||
"Push Image":
|
|
||||||
stage: push
|
|
||||||
parallel: *parallel
|
|
||||||
dependencies:
|
|
||||||
- "Build image"
|
|
||||||
image: "quay.io/podman/stable"
|
|
||||||
services:
|
|
||||||
- "docker:28-dind"
|
|
||||||
tags:
|
|
||||||
- kubernetes
|
|
||||||
script:
|
|
||||||
- >-
|
- >-
|
||||||
podman login
|
./podman/bin/podman login
|
||||||
-u "$CI_REGISTRY_USER"
|
-u "$CI_REGISTRY_USER"
|
||||||
-p "$CI_REGISTRY_PASSWORD"
|
-p "$CI_REGISTRY_PASSWORD"
|
||||||
"$CI_REGISTRY"
|
"$CI_REGISTRY"
|
||||||
- podman load -i "${IMG}.tar.gz"
|
- ./podman/bin/podman load -i "${IMG}.tar.gz"
|
||||||
- >-
|
- >-
|
||||||
podman tag
|
./podman/bin/podman tag
|
||||||
"localhost/${IMG}:latest"
|
"localhost/${IMG}:latest"
|
||||||
"$CI_REGISTRY/greg/nixos-config/${IMG}:latest"
|
"$CI_REGISTRY/greg/nixos-config/${IMG}:latest"
|
||||||
- podman push "$CI_REGISTRY/greg/nixos-config/${IMG}:latest"
|
- ./podman/bin/podman push "$CI_REGISTRY/greg/nixos-config/${IMG}:latest"
|
||||||
|
|||||||
Reference in New Issue
Block a user