39 lines
1.2 KiB
YAML
39 lines
1.2 KiB
YAML
labels:
|
|
arch: amd64
|
|
|
|
when:
|
|
- event: tag
|
|
ref: "refs/tags/v*"
|
|
|
|
skip_clone: true
|
|
|
|
steps:
|
|
- name: clone
|
|
image: alpine/git
|
|
environment:
|
|
CLONE_TOKEN:
|
|
from_secret: registry_token
|
|
commands:
|
|
- git clone --depth 1 --branch $CI_COMMIT_TAG https://oleks:$CLONE_TOKEN@git.oleks.space/oleks/alertmanager-gotify-bridge.git .
|
|
|
|
- name: build-and-push
|
|
image: git.oleks.space/oleks/nix-ci:latest
|
|
environment:
|
|
REGISTRY_TOKEN:
|
|
from_secret: registry_token
|
|
commands:
|
|
- echo "$REGISTRY_TOKEN" | docker login git.oleks.space -u oleks --password-stdin
|
|
- docker buildx create --name arm64 --driver remote "tcp://buildkit-rootless-arm64.infra.svc.cluster.local:1234"
|
|
- TAG=$(echo "$CI_COMMIT_TAG" | sed 's/^v//')
|
|
- IMAGE="git.oleks.space/oleks/alertmanager-gotify-bridge"
|
|
- echo "Building $IMAGE:$TAG"
|
|
- docker buildx build --builder arm64 --platform linux/amd64,linux/arm64 --tag "$IMAGE:$TAG" --tag "$IMAGE:latest" --push .
|
|
backend_options:
|
|
kubernetes:
|
|
nodeSelector:
|
|
kubernetes.io/hostname: howard2404
|
|
labels:
|
|
commit-tag: "${CI_COMMIT_TAG}"
|
|
commit-branch: "${CI_COMMIT_BRANCH}"
|
|
pipeline-number: "${CI_PIPELINE_NUMBER}"
|