update ci.sh to print error
This commit is contained in:
parent
b9c6231b75
commit
7a41f4fd19
1 changed files with 4 additions and 4 deletions
8
ci.sh
8
ci.sh
|
@ -1,11 +1,10 @@
|
|||
#!/bin/sh
|
||||
set -e
|
||||
|
||||
# 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.
|
||||
[ -z $SSH_KEY ] && exit 1
|
||||
[ -z $SSH_KEY ] && echo "missing ssh key" && exit 3
|
||||
|
||||
# write a netrc file for authorization.
|
||||
mkdir /root/.ssh
|
||||
|
@ -13,7 +12,8 @@ echo -n "$SSH_KEY" > /root/.ssh/id_rsa
|
|||
chmod 600 /root/.ssh/id_rsa
|
||||
|
||||
# clone the extras project.
|
||||
set +x
|
||||
set -e
|
||||
set -x
|
||||
git clone git@github.com:drone/drone-enterprise.git extras
|
||||
|
||||
# build a static binary with the build number and extra features.
|
||||
|
|
Loading…
Reference in a new issue