forked from zalando/zappr
-
Notifications
You must be signed in to change notification settings - Fork 0
/
delivery.yaml
26 lines (23 loc) · 955 Bytes
/
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
build_steps:
- desc: Prepare
cmd: |
curl -o /tmp/ensure-docker -f https://delivery.cloud.zalando.com/utils/ensure-docker
chmod +x /tmp/ensure-docker
/tmp/ensure-docker
- desc: Build
cmd: |
function npm {
docker run -i --rm -v "$(pwd):/workspace" -w /workspace registry.opensource.zalan.do/stups/node:latest npm "$@"
}
npm install --no-optional
npm run dist
- desc: Publish Docker image
cmd: |
COMMIT_ID="$(git log --format='%H' -n 1 | cut -c 1-7)"
if [[ "${CDP_TARGET_BRANCH}" = "master" && -z "${CDP_PULL_REQUEST_NUMBER}" ]]; then
IMAGE_NAME="registry-write.opensource.zalan.do/opensource/zappr:${COMMIT_ID}-${CDP_TARGET_REPOSITORY_COUNTER}"
else
IMAGE_NAME="registry-write.opensource.zalan.do/opensource/zappr-pr-test:${COMMIT_ID}-${CDP_TARGET_REPOSITORY_COUNTER}"
fi
docker build -t "${IMAGE_NAME}" .
docker push "${IMAGE_NAME}"