nginx-envsubst/ci/pipeline.yml

85 lines
1.8 KiB
YAML
Raw Normal View History

2022-03-09 16:49:43 +01:00
---
resources:
- name: source
type: git
source:
uri: https://gitea.redxef.at/redxef/nginx-envsubst
branch: master
2022-03-09 17:37:07 +01:00
fetch_tags: true
2022-03-09 16:49:43 +01:00
- name: upstream-image
type: registry-image
source:
2022-05-04 00:07:07 +02:00
repository: nginx
tag: alpine
2022-11-21 15:44:09 +01:00
- name: image
type: oci-image
source:
repository: redxef/nginx-envsubst
tag: latest
username: ((docker.username))
password: ((docker.password))
2022-11-21 15:44:09 +01:00
resource_types:
- name: oci-image
type: registry-image
source:
2022-11-21 15:45:06 +01:00
repository: redxef/concourse-oci-resource
2022-11-21 15:44:09 +01:00
tag: latest
2022-03-09 16:49:43 +01:00
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
2022-03-09 17:23:52 +01:00
git show-ref --tags | \
sed -n "/$(git rev-parse HEAD)/ s|$(git rev-parse HEAD).refs/tags/||gp" \
>> docker-tags/tags.txt
2022-03-09 16:49:43 +01:00
- task: build
privileged: true
config:
platform: linux
image_resource:
type: registry-image
source:
repository: redxef/concourse-buildkit
inputs:
- name: source
path: .
- name: docker-tags
2022-11-21 15:44:09 +01:00
outputs:
- name: build-output
2022-03-09 16:49:43 +01:00
params:
2022-11-21 15:44:09 +01:00
dest: build-output/image.tar
2022-03-09 16:49:43 +01:00
platform: aarch64,arm,i386,ppc64le,s390x,x86_64
run:
path: build
2022-11-21 15:44:09 +01:00
- put: image
inputs:
- build-output
- docker-tags
params:
image: build-output/image.tar
additional_tags: docker-tags/tags.txt
2022-03-09 16:49:43 +01:00