From b43595ac9e2b3807bab57a6d79e6d077b2643b51 Mon Sep 17 00:00:00 2001 From: Pim Kunis Date: Wed, 2 Aug 2023 13:28:43 +0200 Subject: [PATCH] add pipeline --- .gitignore | 1 + deploy.md | 1 + labels | 1 + pipeline.yml | 56 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 59 insertions(+) create mode 100644 .gitignore create mode 100644 deploy.md create mode 100644 labels diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..769c244 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +secrets.yml diff --git a/deploy.md b/deploy.md new file mode 100644 index 0000000..7e4564d --- /dev/null +++ b/deploy.md @@ -0,0 +1 @@ +`fly -t home set-pipeline -l secrets.yml -p fluentd -c pipeline.yml` diff --git a/labels b/labels new file mode 100644 index 0000000..a74caed --- /dev/null +++ b/labels @@ -0,0 +1 @@ +maintainer=Pim Kunis diff --git a/pipeline.yml b/pipeline.yml index ac0ea1e..5118f10 100644 --- a/pipeline.yml +++ b/pipeline.yml @@ -1,5 +1,21 @@ --- resources: + - name: repo + type: git + source: + uri: https://git.kun.is/pim/fluentd.git + - name: my-image + type: registry-image + source: + repository: git.kun.is/pim/fluentd + username: pim + password: ((api_key)) + tag: stable + - name: upstream-image + type: registry-image + source: + repository: fluent/fluentd + tag: v1.16-debian-1 - name: version type: semver source: @@ -10,3 +26,43 @@ resources: file: version private_key: {{private_key}} icon: numeric + +jobs: + - name: build-and-publish-image + plan: + - get: repo + trigger: true + - get: upstream-image + trigger: true + - task: build-image + privileged: true + config: + platform: linux + image_resource: + type: registry-image + source: + repository: concourse/oci-build-task + inputs: + - name: repo + outputs: + - name: image + params: + DOCKERFILE: repo/Dockerfile + LABELS_FILE: repo/labels + run: + path: sh + args: + - -exc + - | + build + ls image + - get: version + params: + bump: patch + - put: my-image + params: + image: image/image.tar + additional_tags: version/version + - put: version + params: + file: version/version