mirror of
https://github.com/woodpecker-ci/woodpecker.git
synced 2025-02-04 18:21:06 +02:00
fix clone extras
This commit is contained in:
parent
c95c348b2a
commit
4473f16122
11
ci.sh
11
ci.sh
@ -1,20 +1,23 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
# only execute this script as part of the pipeline.
|
# only execute this script as part of the pipeline.
|
||||||
[ -z $CI ] && echo "missing ci enviornment variable" && exit 2
|
[ -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 ] && echo "missing ssh key" && exit 3
|
[ -z "$SSH_KEY" ] && echo "missing ssh key" && exit 3
|
||||||
|
|
||||||
# write a netrc file for authorization.
|
# write the ssh key.
|
||||||
mkdir /root/.ssh
|
mkdir /root/.ssh
|
||||||
echo -n "$SSH_KEY" > /root/.ssh/id_rsa
|
echo -n "$SSH_KEY" > /root/.ssh/id_rsa
|
||||||
chmod 600 /root/.ssh/id_rsa
|
chmod 600 /root/.ssh/id_rsa
|
||||||
|
|
||||||
|
# write the ssh configuration.
|
||||||
|
echo "SG9zdCAqDQpTdHJpY3RIb3N0S2V5Q2hlY2tpbmcgbm8gDQpVc2VyS25vd25Ib3N0c0ZpbGU9L2Rldi9udWxsIA==" | base64 -d > /root/.ssh/config
|
||||||
|
|
||||||
# clone the extras project.
|
# clone the extras project.
|
||||||
set -e
|
set -e
|
||||||
set -x
|
set -x
|
||||||
GIT_SSH_COMMAND="ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no" 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.
|
||||||
go build -ldflags '-extldflags "-static" -X github.com/drone/drone/version.VersionDev=build.${DRONE_BUILD_NUMBER}' -tags extras -o release/drone github.com/drone/drone/drone
|
go build -ldflags '-extldflags "-static" -X github.com/drone/drone/version.VersionDev=build.${DRONE_BUILD_NUMBER}' -tags extras -o release/drone github.com/drone/drone/drone
|
||||||
|
Loading…
x
Reference in New Issue
Block a user