add drone pipeline
This commit is contained in:
parent
18853a82c6
commit
256e198fee
57
.drone.yml
Normal file
57
.drone.yml
Normal file
@ -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
|
||||
|
52
build.sh
52
build.sh
@ -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
|
Loading…
x
Reference in New Issue
Block a user