Skip to content

Commit 93a7eca

Browse files
committed
Merge branch 'master' into 2.2.1
2 parents 5599205 + 60b0136 commit 93a7eca

File tree

1 file changed

+39
-0
lines changed

1 file changed

+39
-0
lines changed

hooks/post_push

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
#!/usr/bin/env bash
2+
3+
set -o nounset
4+
5+
# Load build information
6+
eval $(docker run --rm $IMAGE_NAME cat build.info)
7+
8+
MODE=fdd
9+
if [[ -n $FDD_LENSES_VERSION ]]; then
10+
MODE=box
11+
fi
12+
13+
# Master should publish fast-data-dev:latest
14+
if [[ $BUILD_BRANCH == master ]]; then
15+
# 'landooop/fast-data-dev:latest' is pushed automatically
16+
17+
# Also push to lensesio/fast-data-dev
18+
docker tag $IMAGE_NAME lensesio/fast-data-dev:latest
19+
docker push lensesio/fast-data-dev:latest
20+
fi
21+
22+
# FDD branches should publish minor and major version tags
23+
if [[ $BUILD_BRANCH =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]] && [[ -n $FDD_LKD_VERSION ]]; then
24+
# BUILD_BRANCH is the same as FDD_LKD_VERSION, e.g 2.2.1
25+
# 'landoop/fast-data-dev:$BUILD_BRANCH is pushed automatically
26+
27+
# Also push 'lensesio/fast-data-dev:$BUILD_BRANCH'
28+
docker tag $IMAGE_NAME lensesio/fast-data-dev:$BUILD_BRANCH
29+
docker push lensesio/fast-data-dev:$BUILD_BRANCH
30+
31+
MAJOR_VERSION="$(sed -r -e 's/^([0-9]+\.[0-9]+)\.[0-9]+$/\1/' <<<"$FDD_LKD_VERSION")"
32+
# Also push 'landoop/fast-data-dev:$MAJOR_VERSION'
33+
docker tag $IMAGE_NAME landoop/fast-data-dev:$MAJOR_VERSION
34+
docker push landoop/fast-data-dev:$MAJOR_VERSION
35+
36+
# Also push 'lensesio/fast-data-dev:$MAJOR_VERSION
37+
docker tag $IMAGE_NAME lensesio/fast-data-dev:$MAJOR_VERSION
38+
docker push lensesio/fast-data-dev:$MAJOR_VERSION
39+
fi

0 commit comments

Comments
 (0)