forked from zalando/skipper
-
Notifications
You must be signed in to change notification settings - Fork 0
/
delivery.yaml
62 lines (61 loc) · 2.57 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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
version: "2017-09-20"
pipeline:
- id: build
overlay: ci/golang
type: script
commands:
- desc: build-push
cmd: |
apt-get update -o Acquire::http::AllowRedirect=false
apt-get install -o Acquire::http::AllowRedirect=false -y bzr redis-server
if [[ $CDP_TARGET_BRANCH == master && ! $CDP_PULL_REQUEST_NUMBER ]]; then
RELEASE_VERSION="$(make release-patch)"
export VERSION="${RELEASE_VERSION}"
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 cicheck staticcheck gosec
git status
git diff
cd packaging && make docker-build && git status && git diff && make docker-push
if [[ $CDP_TARGET_BRANCH == master && ! $CDP_PULL_REQUEST_NUMBER ]]; then
echo "Created docker image registry.opensource.zalan.do/pathfinder/skipper:${RELEASE_VERSION}"
echo "Creating docker image registry.opensource.zalan.do/pathfinder/skipper-armv8:${RELEASE_VERSION}"
export IMAGE="registry-write.opensource.zalan.do/pathfinder/skipper-armv8:${RELEASE_VERSION}"
GOARCH=arm64 make docker-build && git status && git diff && make docker-push
echo "Creating docker image registry.opensource.zalan.do/pathfinder/skipper-armv7:${RELEASE_VERSION}"
export IMAGE="registry-write.opensource.zalan.do/pathfinder/skipper-armv7:${RELEASE_VERSION}"
GOARCH=arm GOARM=GOARM=7 make docker-build && git status && git diff && make docker-push
echo "Creating git tag: ${RELEASE_VERSION}"
git gh-tag "${RELEASE_VERSION}"
echo "Creating release for tag: ${RELEASE_VERSION}"
make build.package
files=(-u sha256sum.txt); for f in *.tar.gz; do files+=(-u "$f"); done
git gh-release "${files[@]}" "$RELEASE_VERSION"
else
echo "Not creating a release. No release version defined."
fi
- id: docs
type: script
overlay: ci/python
commands:
- desc: install deps
cmd: |
pip3 install mkdocs mkdocs-material
- desc: build docs
cmd: |
mkdocs build --strict
shopt -s extglob # needed to use !(pr)
if [ "$CDP_PULL_REQUEST_NUMBER" ]; then
mkdir -p site/pr/#{CDP_PULL_REQUEST_NUMBER}
mv site/!(pr) site/pr/#{CDP_PULL_REQUEST_NUMBER}
fi
if [[ $CDP_TARGET_BRANCH == master && ! $CDP_PULL_REQUEST_NUMBER ]]; then
echo "Please update the docs with: mkdocs gh-deploy"
fi
artifacts:
- type: docs
name: skipper
path: site