forked from zalando/skipper
-
Notifications
You must be signed in to change notification settings - Fork 0
/
delivery.yaml
42 lines (42 loc) · 1.68 KB
/
delivery.yaml
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
build_steps:
- desc: 'Install required build software'
cmd: |
apt-get install -y make git apt-transport-https ca-certificates curl
- desc: 'Install go'
cmd: |
add-apt-repository -y ppa:longsleep/golang-backports
apt-get update
apt-get install -y golang-go
- desc: 'Install Docker'
cmd: |
# enable experimental features (--squash)
mkdir -p /etc/systemd/system/docker.service.d
cat << EOF > /etc/systemd/system/docker.service.d/docker.conf
[Service]
ExecStart=
ExecStart=/usr/bin/dockerd -H fd:// --experimental=true
EOF
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | apt-key add -
apt-key fingerprint 0EBFCD88
add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
apt-get update
apt-get install -y docker-ce
- desc: 'Build & push docker image'
cmd: |
export GOPATH=$HOME/go
export PATH=$PATH:$HOME/go/bin
export TOP_DIR=$GOPATH/src/github.com/zalando
mkdir -p $TOP_DIR
cp -va $(pwd) $TOP_DIR/skipper
cd $TOP_DIR/skipper
IS_PR_BUILD=${CDP_PULL_REQUEST_NUMBER+"true"}
if [[ ${CDP_TARGET_BRANCH} == "master" && ${IS_PR_BUILD} != "true" ]]
then
RELEASE_VERSION=$(git describe --tags --always --dirty)
IMAGE=registry-write.opensource.zalan.do/pathfinder/skipper:${RELEASE_VERSION}
else
IMAGE=registry-write.opensource.zalan.do/pathfinder/skipper-test:${CDP_BUILD_VERSION}
fi
export IMAGE
make deps shortcheck
cd packaging && make docker-build docker-push