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