forked from open-horizon/horizon-deb-packager
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
50 lines (50 loc) · 3.32 KB
/
.travis.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
50
services:
- docker
env:
- dist='ubuntu.yakkety'
- dist='ubuntu.xenial'
- dist='debian.stretch'
- dist='debian.sid'
- dist='raspbian.jessie'
- dist='raspbian.sid'
language: go
go: 1.10.x
if: tag IS blank
script:
- printenv
- if [[ $TRAVIS_COMMIT_MESSAGE == *"updated package metadata"* ]] || [[ $TRAVIS_COMMIT_MESSAGE
== *"rebuild-release"* ]] || [[ $TRAVIS_PULL_REQUEST != ''false'' ]]; then echo "$ICR_PASS" |
docker login -u="$ICR_USER" --password-stdin $ICR_REG && make -C build_support && make dist=$dist;
else echo "Not building artifacts, since this is not a version change commit"; fi;
before_deploy:
- export VERSION_TAG=v$(cat $TRAVIS_BUILD_DIR/VERSION)-${TRAVIS_BRANCH}
- rm -r $TRAVIS_BUILD_DIR/dist/*/ && rm -f $TRAVIS_BUILD_DIR/dist/*.build
- cd $TRAVIS_BUILD_DIR/dist && sha256sum *${dist}* > ${VERSION_TAG}.${dist}.sha256.txt
&& tar -zcvf ${VERSION_TAG}.${dist}.assets.tar.gz *${dist}* && echo "" >> ${VERSION_TAG}.${dist}.sha256.txt
&& sha256sum ${VERSION_TAG}.${dist}.assets.tar.gz >> ${VERSION_TAG}.${dist}.sha256.txt
- git config --global user.email "[email protected]"
- git config --global user.name "Travis"
- git tag $VERSION_TAG --force -a -m "Travis build $TRAVIS_BUILD_NUMBER"
- sleep 15
deploy:
on:
condition: $TRAVIS_COMMIT_MESSAGE =~ "updated package metadata" || $TRAVIS_COMMIT_MESSAGE
=~ "rebuild-release"
repo: open-horizon/horizon-deb-packager
provider: releases
skip_cleanup: true
api_key:
secure: kmSjhGttxX9GacriqEpBKS8L3A7C42juRlKdAhbJOOo6Er856iMMUq5qLgo0Mr5/7hA4o8PMI3rDSAxjPcYATHvlCh02o0NwqCwLAgD9uzgHEylH1F3u6mkKNUFUHK+zVQ0ePKQeqkm9w7jWLLH5K/EWWqok/T49dnCF8ejk02ksQLAN6uL9YLySuDrNhWY/JjJ4vjIJq2B7zAdRqU5FK+nAr6pYtJSanmBuqFP2DkWamy21lWOqFTis06rPwYBiulMcFOTPd8m/IUrc38BWudv/KV+OcRhoySfAihFX3LRnAAkwS7AKEMM2uckqimKgrkPZ7M7tMiSExPLzb0DJ1/TVnpwg6zLGkpe2ZzGJqY06Bp1Cz2R/pAhHx+uIDav6eRCw0l4SQDU1aDYSPzHjBVI3WqePnx2bHoYAeNlngLiVZQntrWTU9y1R+Aqa175jdRgNH3dxKChLof8bDHGYP6CctdkSav2K27llcLVl+q18QVydUCl07vxJmesPgD15oeYRiq59fyXMH5aJzLD718AjY9nF5aHxO/2DljxD36nMWMyZX2Q8eiqWmeX9fl8V9veNk6+FUsWJS+gcPY+VoEr1Zs7PXM8vcL/a8y/0VKw+yhz5yU4ALai1j/xBYyUTNh8t9etrXEMgylY6IQCFIw5kqwdH5DWQbnmkcHeKKXY=
file:
- "$TRAVIS_BUILD_DIR/dist/${VERSION_TAG}.${dist}.assets.tar.gz"
- "$TRAVIS_BUILD_DIR/dist/${VERSION_TAG}.${dist}.sha256.txt"
draft: false
overwrite: true
after_script:
- if [[ $TRAVIS_COMMIT_MESSAGE == *"updated package metadata"* ]] || [[ $TRAVIS_COMMIT_MESSAGE
== *"rebuild-release"* ]]; then echo "$DOCKER_HUB_PASS" | docker login -u="$DOCKER_HUB_USER"
--password-stdin && cd $TRAVIS_BUILD_DIR && make fss-containers;
else echo "Not pushing images, since this is not a version change commit"; fi;
notifications:
slack:
secure: MsDy912R5awEshRTEwyprzRwRs7XqARdxToRwEs6fuDIxLUvVzwuYw8FzoQSlhBVSXVhFfoqPIEADbiJttqUYkn1FmanaOd+6i+TcZSVhuPqu3kITdX16VOCfme0lyEwo6lTzLfXjvKl1nWs0kFOVeoeU9T3gnK3XON+vBFSBZhxnqVSlLukafvlbicGyP3w+JNt1dgkGJS6W8focOmEs6aqQcMIVY5ewxEtB1PvoHPYrihK6JJuCik/hQXa4nZej5ougSFU2MLM/vVysPttAmnDSx7pyXv+umQjh4Cd5X7UceTjWac8Ca8pswTh0rsuMeaanKiYsMbeRT9n/zZOPs+jwu+ngwC/2pGESmyaxNdp571eZTZEIEc0Mp1BWn80dhEI0nlg23QLYyTNDW2ZNgdLV02iIwfLQbzdcvXYtUFnPCfiw1b8BoHMRU+x8r92+hLn1tQPP6x6wxLNmiE1BNOc4wPTDcftt7fPAiqBNwh+JWlrnbyg0ON+QEfp+46baI/u8k+Oc+oXGPuoPrDgyGHuBTcY4qA0Aw1MAp9QAZYVh4JJXzHo9umwjDA+qM4FoE/l73MTm4LjekhAKuqRB6Ya8/vl+PjNRzS6UW7F6v+o635LYeaBbMPMMslDKZUlFwskZBl5D0MkeWtO39ncZMCYXmj6w4ffuqJAQHH2nuo=