-
Notifications
You must be signed in to change notification settings - Fork 2
/
releasedocker
executable file
·43 lines (32 loc) · 1.22 KB
/
releasedocker
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
#!/bin/sh -x
OLD_VER="$1"; shift
NEW_VER="$1"; shift
TAG_PREFIX="docker"
if [ -n "$RELEASEDOCKER_IS_UPDATE" ]; then
# "update" release makes it faster to build and release and also allow us
# sort of pin the entire existing working environment if we foresee many
# disruptive updates ahead and we are not ready to absorb them.
# Basically allowing us to still release new key components without being
# impacted by other changing components that we are not ready to deal with.
# Full and clean release are much prefered so this is to be used in last
# resort only, do not abuse.
TAG_PREFIX="dockerupdate"
fi
update_ver() {
FILE="$1"
sed -i "s@pavics/workflow-tests:$OLD_VER@pavics/workflow-tests:$NEW_VER@g" $FILE
}
update_ver launchcontainer
update_ver launchnotebook
update_ver Jenkinsfile
update_ver binder/Dockerfile
git add launchcontainer launchnotebook Jenkinsfile binder/Dockerfile
git st -v
echo "Looks good to commit? (Ctrl-C to abort)"; read a
git ci -m "release: update to use image pavics/workflow-tests:$NEW_VER"
git show
echo "Looks good to tag? (Ctrl-C to abort)"; read a
git tag ${TAG_PREFIX}-${NEW_VER}
echo "Tag is good to push? (Ctrl-C to abort)"; read a
git push
git push --tags