83 lines
1.8 KiB
YAML
83 lines
1.8 KiB
YAML
---
|
|
resources:
|
|
- name: source
|
|
type: git
|
|
source:
|
|
uri: https://gitea.redxef.at/redxef/certbot-duckdns
|
|
branch: master
|
|
fetch_tags: true
|
|
- name: upstream-image
|
|
check_every: 6h
|
|
type: registry-image
|
|
source:
|
|
repository: alpine
|
|
- name: image
|
|
type: oci-image
|
|
source:
|
|
repository: redxef/certbot-duckdns
|
|
tag: latest
|
|
username: ((docker.username))
|
|
password: ((docker.password))
|
|
|
|
resource_types:
|
|
- name: oci-image
|
|
type: registry-image
|
|
source:
|
|
repository: redxef/concourse-oci-resource
|
|
tag: latest
|
|
|
|
jobs:
|
|
- name: build-push
|
|
plan:
|
|
- get: source
|
|
trigger: true
|
|
- get: upstream-image
|
|
trigger: true
|
|
- task: compute-docker-tags
|
|
config:
|
|
platform: linux
|
|
image_resource:
|
|
type: registry-image
|
|
source:
|
|
repository: alpine/git
|
|
inputs:
|
|
- name: source
|
|
path: .
|
|
outputs:
|
|
- name: docker-tags
|
|
run:
|
|
path: sh
|
|
args:
|
|
- -c
|
|
- |
|
|
#!/usr/bin/env sh
|
|
git rev-parse --short HEAD > docker-tags/tags.txt
|
|
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: .
|
|
- name: docker-tags
|
|
outputs:
|
|
- name: build-output
|
|
params:
|
|
dest: build-output/image.tar
|
|
platform: aarch64,arm,i386,ppc64le,s390x,x86_64
|
|
run:
|
|
path: build
|
|
- put: image
|
|
inputs:
|
|
- build-output
|
|
- docker-tags
|
|
params:
|
|
image: build-output/image.tar
|
|
additionaltags: docker-tags/tags.txt
|