-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.drone.yml
49 lines (45 loc) · 2.66 KB
/
.drone.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
workspace:
base: /workspace
path: Freifunk-Hennef/site
pipeline:
build:
image: ffhef/docker-buildimage
volumes:
- /freifunk/firmware:/firmware
- /var/cache/drone/gluon:/workspace/Freifunk-Hennef/site/gluon
environment:
- VERBOSE=
- MAKE_JOBS=8
- FORCE_UNSAFE_CONFIGURE=1
- GLUON_BUILD=v2018.1
- GLUON_TARGETS=ar71xx-tiny ar71xx-generic ar71xx-nand brcm2708-bcm2708 brcm2708-bcm2709 mpc85xx-generic sunxi x86-generic x86-geode x86-64
commands:
- export GLUON_RELEASE=v$(date +%Y%m%d)-${DRONE_BUILD_NUMBER}-${DRONE_BRANCH}
- if [ "$DRONE_BRANCH" = "experimental" ] ; then GLUON_TARGETS="ar71xx-tiny ar71xx-generic ar71xx-nand mpc85xx-generic" ; fi
- export
- git config --global user.email "drone@freie-netzwerker.de"
- git config --global user.name "Freie Netzwerker CI"
- if [ -d gluon/.git ] ; then cd gluon ; git fetch ; git checkout -f $GLUON_BUILD ; git reset --hard ; cd .. ; fi
- if [ ! -d gluon/.git ] ; then git clone https://github.com/freifunk-gluon/gluon.git gluon -b $GLUON_BUILD ; fi
- rm -rf gluon/site/
- mkdir -p gluon/site/
- cp -ar i18n/ site.* modules gluon/site/
- cd gluon
- make update $VERBOSE
- for GLUON_TARGET in $GLUON_TARGETS ; do echo "-------------------------------------------------------------------------------" ; echo "Building $GLUON_TARGET" ; make -j$MAKE_JOBS GLUON_TARGET=$GLUON_TARGET GLUON_BRANCH=$DRONE_BRANCH $VERBOSE ; done
- make manifest GLUON_BRANCH=$DRONE_BRANCH $VERBOSE
- mkdir -p /firmware/unsigned
- cp -r output/images/* /firmware/unsigned/
- if [ "$DRONE_BRANCH" = "experimental" ] ; then ./contrib/sign.sh /firmware/keys/autosign.key /firmware/unsigned/sysupgrade/experimental.manifest && mkdir -p /firmware/signed/ARCHIV/exp_$( date +%Y%m%d )/sysupgrade && mv /firmware/signed/experimental/sysupgrade/* /firmware/signed/ARCHIV/exp_$( date +%Y%m%d )/sysupgrade/ && mv /firmware/unsigned/sysupgrade/* /firmware/signed/experimental/sysupgrade/ && mkdir -p /firmware/signed/ARCHIV/exp_$( date +%Y%m%d )/factory && mv /firmware/signed/experimental/factory/* /firmware/signed/ARCHIV/exp_$( date +%Y%m%d )/factory/ && mv /firmware/unsigned/factory/* /firmware/signed/experimental/factory/ ; fi
positive:
image: ffhef/docker-curl
commands:
- curl "https://services.freifunk-hennef.de/nodered/tg_fw_build/${DRONE_BRANCH}/${DRONE_BUILD_NUMBER}/successful"
when:
status: success
negative:
image: ffhef/docker-curl
commands:
- curl "https://services.freifunk-hennef.de/nodered/tg_fw_build/${DRONE_BRANCH}/${DRONE_BUILD_NUMBER}/FAILED"
when:
status: failure