@@ -24,11 +24,11 @@ commands:
24
24
cd platform-setup
25
25
sudo ./setup-ubuntu16.04.sh
26
26
setup-branch :
27
- description : " Setup branch "
27
+ description : " Setup subbranches "
28
28
steps :
29
29
- run :
30
30
shell : /bin/bash
31
- name : Setup branch
31
+ name : Setup sub branches
32
32
command : |
33
33
sudo apt install jq
34
34
# First find out Base Branch (if any)
@@ -78,12 +78,20 @@ commands:
78
78
DOCKER_TAG="latest"
79
79
if [ "<< parameters.tag >>" = "date" ]; then
80
80
DOCKER_TAG=`date -I`
81
+ DOCKER_PUSH_LATEST=true
81
82
fi
82
83
if [ "<< parameters.tag >>" = "tag" ]; then
83
- DOCKER_TAG=`git describe --tag` || exit 1
84
+ DOCKER_TAG=`git describe --tags --exact-match` || exit 1
85
+ fi
86
+ echo Now trying to push with Tag ${DOCKER_TAG} push latest ${DOCKER_PUSH_LATEST}
87
+ if [ ! -z "$PUSH_DRYRUN" ]; then
88
+ make push-images
89
+ if [ ! -z "$DOCKER_PUSH_LATEST" ]; then
90
+ DOCKER_TAG="latest" make push-images
91
+ fi
92
+ else
93
+ echo Only dry run mode. Not pushing to dockerhub!
84
94
fi
85
- echo Now trying to push with Tag ${DOCKER_TAG}
86
- make push
87
95
check-signed :
88
96
description : " Check whether latest commit is signed"
89
97
steps :
@@ -99,6 +107,14 @@ commands:
99
107
echo "Commit is not signedoff"
100
108
exit 1
101
109
fi
110
+ check-tagged :
111
+ description : " Check whether latest commit is tagged"
112
+ steps :
113
+ - run :
114
+ name : Check whether most recent commit is tagged
115
+ shell : /bin/bash
116
+ command : |
117
+ git describe --tags --exact-match || exit 1
102
118
jobs :
103
119
build :
104
120
executor : my-executor
@@ -113,6 +129,7 @@ jobs:
113
129
executor : my-executor
114
130
steps :
115
131
- checkout
132
+ - check-tagged
116
133
- setup-build-environment
117
134
- setup-branch
118
135
- build-branch
0 commit comments