From 256e198fee0ef8d453121581db3fc363740cb8aa Mon Sep 17 00:00:00 2001 From: Simon Marsh Date: Thu, 30 Dec 2021 13:11:15 +0000 Subject: [PATCH] add drone pipeline --- .drone.yml | 57 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ build.sh | 52 ------------------------------------------------- 2 files changed, 57 insertions(+), 52 deletions(-) create mode 100644 .drone.yml delete mode 100755 build.sh diff --git a/.drone.yml b/.drone.yml new file mode 100644 index 00000000..4a807c73 --- /dev/null +++ b/.drone.yml @@ -0,0 +1,57 @@ +--- +kind: pipeline +type: docker +name: deploy + +steps: + + - name: build alpine + image: c8n.io/simonburblecom/bird-build:alpine + commands: + - /build.sh + + - name: build ubuntu + image: c8n.io/simonburblecom/bird-build:ubuntu + commands: + - /build.sh + + - name: upload + image: plugins/s3 + settings: + bucket: artifacts + access_key: + from_secret: MINIO_ACCESS_KEY + secret_key: + from_secret: MINIO_SECRET_KEY + endpoint: https://minio.burble.dn42 + region: uk-lon3 + path_style: true + source: artifacts/**/* + strip_prefix: artifacts/ + target: /bird/${DRONE_BRANCH} + + +image_pull_secrets: + - CONFIG_JSON + +--- +kind: secret +name: CONFIG_JSON +get: + path: burble.dn42/kv/data/drone/docker + name: configjson + +--- +kind: secret +name: MINIO_ACCESS_KEY +get: + path: burble.dn42/kv/data/drone/minio + name: ACCESS_KEY + +--- +kind: secret +name: MINIO_SECRET_KEY +get: + path: burble.dn42/kv/data/drone/minio + name: SECRET_KEY + diff --git a/build.sh b/build.sh deleted file mode 100755 index b9621688..00000000 --- a/build.sh +++ /dev/null @@ -1,52 +0,0 @@ -#!/bin/bash -e -########################################################################## - -date=$(date +%y%m%d) -version='2.0.8' - -git tag -a "burble-${version}-${date}" -m "burble.dn42 build ${version}/${date}" -git push --tags - -# configure - -if [ ! -f configure ] -then - autoreconf -fi - -./configure \ - --prefix=/usr \ - --sysconfdir=/etc/bird \ - --localstatedir=/var - -# make - -make -j4 - -# create debian package - -echo "bird-$version for burble.dn42" > description-pak -sudo checkinstall \ - --default \ - --type='debian' --install=no \ - --pkgname='bird' \ - --pkgversion="$version" \ - --pkgrelease="burble-$date" \ - --maintainer="simon@burble.com" \ - --provides='bird' \ - --strip \ - --backup=no -# reset perms -sudo chown simon.simon *.deb - -# upload - -pkg="bird_${version}-burble-${date}_amd64.deb" -dstdir='minio/artifacts/bird' -dst="${dstdir}/${date}/${pkg}" - -mc cp "$pkg" "$dst" -mc cp "$dst" "${dstdir}/current/bird_${version}-burble_amd64.deb" - -########################################################################## -# end of file