[TASK] Setup initial pipeline

This commit is contained in:
Philipp Dieter 2022-03-21 23:02:59 +01:00
commit 6cb35f7868

64
pipeline.yml Normal file
View File

@ -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