From 6cb35f7868f6c6db95ab2a3e3adb63ac5383f216 Mon Sep 17 00:00:00 2001 From: Philipp Dieter Date: Mon, 21 Mar 2022 23:02:59 +0100 Subject: [PATCH] [TASK] Setup initial pipeline --- pipeline.yml | 64 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 64 insertions(+) create mode 100644 pipeline.yml diff --git a/pipeline.yml b/pipeline.yml new file mode 100644 index 0000000..a43eb0f --- /dev/null +++ b/pipeline.yml @@ -0,0 +1,64 @@ +--- +resource_types: + - name: aptly-resource + type: docker-image + source: + repository: docker.datentonne.net/concourse/aptly-resource + tag: latest +resources: + - name: resticprofile + type: github-release + source: + owner: creativeprojects + repository: resticprofile + release: false + access_token: ((github.access_token)) + - name: resticprofile-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: resticprofile + username: ((aptly.username)) + password: ((aptly.password)) + timeout: 1801 + keep_versions: 5 +jobs: + - name: build + plan: + - get: resticprofile + params: + globs: + - resticprofile_*_linux_amd64.tar.gz + - task: build + config: + platform: linux + image_resource: + type: registry-image + source: { repository: ruby } + inputs: + - name: resticprofile + outputs: + - name: deb + run: + path: /bin/sh + args: + - -c + - | + export VERSION="$(cat resticprofile/version)" + export VERSION_OUT="$(cat resticprofile/version)-$(date +%s)" + gem install fpm + cd resticprofile + mkdir build + tar xfv resticprofile_${VERSION}_linux_amd64.tar.gz -C build + fpm --verbose -f -n resticprofile -s dir -t deb -v $VERSION_OUT build/resticprofile=/usr/bin/resticprofile + cd .. + mv -v resticprofile/resticprofile_${VERSION_OUT}_amd64.deb deb/ + echo "deb/resticprofile_${VERSION_OUT}_amd64.deb" > deb/filename + - put: resticprofile-deb + params: + archive_file: deb/filename