Skip to content
Snippets Groups Projects
Commit 84a1b358 authored by Jonas Leder's avatar Jonas Leder
Browse files

replace docker stage with config from ci repo

parent ef42051c
Branches
No related tags found
No related merge requests found
Pipeline #53480 passed
...@@ -32,35 +32,10 @@ build-application-binary: ...@@ -32,35 +32,10 @@ build-application-binary:
- rss2gotify-${GOOS}-${GOARCH} - rss2gotify-${GOOS}-${GOARCH}
Docker: include:
# Use the official docker image. - project: 'infra/ci'
image: gitlab.jonasled.de/jonasled/buildx-docker:latest file: '/pipelines/docker.yml'
stage: build
needs: []
services:
- docker:dind
before_script:
- docker context create build
- docker buildx create build --use
- docker run --privileged --rm tonistiigi/binfmt --install all
- docker login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" $CI_REGISTRY
- apk add jq
# Default branch leaves tagempty (= latest tag)
# All other branches are tagged with the escaped branch name (commit ref slug)
script:
- |
if [[ "$CI_COMMIT_BRANCH" == "$CI_DEFAULT_BRANCH" ]]; then
tag="latest"
else
tag="$CI_COMMIT_REF_SLUG"
fi
- docker buildx build --platform linux/arm64,linux/amd64 --push --provenance false --tag "$CI_REGISTRY_IMAGE:${tag}" .
- export IMAGE_HASH=$(docker buildx imagetools inspect "$CI_REGISTRY_IMAGE:${tag}" --format "{{json .Manifest}}" | jq .digest)
- "echo \"Image Hash: $IMAGE_HASH\""
- echo "$IMAGE_HASH" >> image-hash.txt
artifacts:
paths:
- image-hash.txt
Helm: Helm:
stage: bundle stage: bundle
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment