update ci.sh to print error

This commit is contained in:
Brad Rydzewski 2017-05-08 02:14:53 +02:00
parent b9c6231b75
commit 7a41f4fd19

8
ci.sh
View file

@ -1,11 +1,10 @@
#!/bin/sh #!/bin/sh
set -e
# only execute this script as part of the pipeline. # only execute this script as part of the pipeline.
[ -z $CI ] && exit 1 [ -z $CI ] && echo "missing ci enviornment variable" && exit 2
# only execute the script when github token exists. # only execute the script when github token exists.
[ -z $SSH_KEY ] && exit 1 [ -z $SSH_KEY ] && echo "missing ssh key" && exit 3
# write a netrc file for authorization. # write a netrc file for authorization.
mkdir /root/.ssh mkdir /root/.ssh
@ -13,7 +12,8 @@ echo -n "$SSH_KEY" > /root/.ssh/id_rsa
chmod 600 /root/.ssh/id_rsa chmod 600 /root/.ssh/id_rsa
# clone the extras project. # clone the extras project.
set +x set -e
set -x
git clone git@github.com:drone/drone-enterprise.git extras git clone git@github.com:drone/drone-enterprise.git extras
# build a static binary with the build number and extra features. # build a static binary with the build number and extra features.