commit 29db4f09c0ed7af6ca5f45964fa7eb9d750198dc Author: Philipp Dieter Date: Wed Nov 16 23:12:28 2022 +0100 [TASK] Init diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..60afbc8 --- /dev/null +++ b/Makefile @@ -0,0 +1,2 @@ +set_pipeline: + fly -t datentonne sp -p roundcube -c pipeline.yml diff --git a/pipeline.yml b/pipeline.yml new file mode 100644 index 0000000..325de4a --- /dev/null +++ b/pipeline.yml @@ -0,0 +1,75 @@ +--- +resource_types: + - name: aptly-resource + type: docker-image + source: + repository: docker.datentonne.net/concourse/aptly-resource + tag: latest +resources: + - name: roundcube + type: github-release + source: + owner: roundcube + repository: roundcubemail + access_token: ((github.access_token)) + - name: roundcube-plugin + type: git + source: + uri: https://git.datentonne.net/phil/roundcube-ldap_sync_addresses.git + - name: roundcube-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: roundcube + username: ((aptly.username)) + password: ((aptly.password)) + timeout: 1801 +jobs: + - name: build + plan: + - get: roundcube + trigger: true + params: + globs: + - roundcubemail-*-complete.tar.gz + - get: roundcube-plugin + trigger: true + - task: build + config: + platform: linux + image_resource: + type: registry-image + source: { repository: ruby } + inputs: + - name: roundcube + - name: roundcube-plugin + outputs: + - name: deb + run: + path: /bin/sh + args: + - -c + - | + export VERSION="$(cat roundcube/version)" + export VERSION_OUT="$(cat roundcube/version)-$(date +%s)" + gem install fpm + rm -rf roundcube-plugin/.git + cd roundcube + mkdir build + tar xfv roundcubemail-$VERSION-complete.tar.gz --strip-components=1 -C build + cp -v -r ../roundcube-plugin/ build/plugins/ldap_sync_addresses/ + ln -s /etc/roundcube/config.inc.php build/config/config.inc.php + fpm --verbose -f -n roundcube -s dir -t deb -v $VERSION_OUT build/=/opt/roundcube/ + cd .. + mv -v roundcube/roundcube_${VERSION_OUT}_amd64.deb deb/ + echo "deb/roundcube_${VERSION_OUT}_amd64.deb" > deb/filename + dpkg --contents deb/roundcube_${VERSION_OUT}_amd64.deb + - put: roundcube-deb + params: + archive_file: deb/filename + gpg_passphrase_file: /etc/hosts