From 6ff6e2dd50568ab9225a827e0bc32bfce83d0236 Mon Sep 17 00:00:00 2001 From: Philipp Dieter Date: Sat, 19 Mar 2022 00:11:11 +0100 Subject: [PATCH] [TASK] Setup initial pipeline --- pipeline.yml | 60 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 60 insertions(+) create mode 100644 pipeline.yml diff --git a/pipeline.yml b/pipeline.yml new file mode 100644 index 0000000..586cfb8 --- /dev/null +++ b/pipeline.yml @@ -0,0 +1,60 @@ +--- +resource_types: + - name: aptly-resource + type: docker-image + source: + repository: docker.datentonne.net/concourse/aptly-resource + tag: latest +resources: + - name: go-gitea + type: github-release + source: + owner: go-gitea + repository: gitea + access_token: ((github.access_token)) + - name: gitea-deb + type: aptly-resource + source: + api_uri: https://apt-api.datentonne.net/ + repo_uri: https://apt.datentonne.net/ + repo: datentonne + distribution: debian + component: main + architecture: amd64 + package: gitea + username: ((aptly.username)) + password: ((aptly.password)) + timeout: 1801 +jobs: + - name: build + plan: + - get: go-gitea + params: + globs: + - gitea-*-linux-amd64 + - task: build + config: + platform: linux + image_resource: + type: registry-image + source: { repository: ruby } + inputs: + - name: go-gitea + outputs: + - name: deb + run: + path: /bin/sh + args: + - -c + - | + export VERSION="$(cat go-gitea/version)" + export VERSION_OUT="$(cat go-gitea/version)+$(date +%s)" + gem install fpm + chmod +x go-gitea/gitea-${VERSION}-linux-amd64 + fpm --verbose -f -n gitea -s dir -t deb -v $VERSION_OUT go-gitea/gitea-${VERSION}-linux-amd64=/usr/bin/gitea + mv -v gitea_${VERSION_OUT}_amd64.deb deb/ + echo "deb/gitea_${VERSION_OUT}_amd64.deb" > deb/filename + - put: concourse-deb + params: + archive_file: deb/filename + gpg_passphrase_file: /etc/hosts