This repository has been archived on 2024-10-30. You can view files and clone it, but cannot push or open issues or pull requests.
concourse-buildkit/ci/pipeline.yml

67 lines
1.5 KiB
YAML
Raw Normal View History

---
resources:
- name: source
type: git
source:
uri: https://gitea.redxef.at/redxef/concourse-buildkit
branch: master
2022-03-09 17:43:31 +01:00
fetch_tags: true
- name: upstream-image
type: registry-image
source:
repository: moby/buildkit
jobs:
- name: build-push
plan:
- get: source
trigger: true
- get: upstream-image
trigger: true
2022-03-09 16:06:51 +01:00
- task: compute-docker-tags
2022-03-09 16:02:03 +01:00
config:
platform: linux
image_resource:
type: registry-image
source:
2022-03-09 16:41:20 +01:00
repository: alpine/git
2022-03-09 16:02:03 +01:00
inputs:
- name: source
path: .
outputs:
- name: docker-tags
run:
path: sh
args:
- -c
- |
2022-03-09 16:06:51 +01:00
#!/usr/bin/env sh
git rev-parse --short HEAD > docker-tags/tags.txt
2022-03-09 17:43:31 +01:00
git show-ref --tags | \
sed -n "/$(git rev-parse HEAD)/ s|$(git rev-parse HEAD).refs/tags/||gp" \
>> docker-tags/tags.txt
- task: build
privileged: true
config:
platform: linux
image_resource:
type: registry-image
source:
repository: redxef/concourse-buildkit
inputs:
- name: source
path: .
2022-03-09 16:02:03 +01:00
- name: docker-tags
params:
username: ((docker.username))
password: ((docker.password))
2022-03-09 16:02:03 +01:00
repository: docker.io/redxef/concourse-buildkit
tag: latest
additional_tags: docker-tags/tags.txt
push: true
platform: aarch64,arm,ppc64le,s390x,x86_64
context: .
manual: false
run:
2022-03-09 16:41:20 +01:00
path: build