Skip to content

Commit 1103495

Browse files
authored
Merge pull request #13 from jancajthaml/bugfix/better-logging-of-deploy
better logging of deployment
2 parents a800eb3 + f7bf5f2 commit 1103495

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

.circleci/config.yml

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -120,13 +120,18 @@ jobs:
120120
command: |
121121
echo ${DOCKER_PASSWORD}| docker login -u ${DOCKER_USER} --password-stdin
122122
if git log -1 --pretty=%B | grep "^[0-9]\+\.[0-9]\+\.[0-9]\+$"; then
123+
git pull --tags
124+
123125
VERSION=$(git tag | grep "^[0-9]\+\.[0-9]\+\.[0-9]\+$" | sort -t. -k 1,1n -k 2,2n -k 3,3n | tail -1)
124126
125-
docker tag bundle "jancajthaml/datadog_mock:${VERSION}"
127+
echo "releasing version ${VERSION} and updating latest"
128+
126129
docker tag bundle "jancajthaml/datadog_mock:latest"
127-
docker push "jancajthaml/datadog_mock:${VERSION}"
128130
docker push "jancajthaml/datadog_mock:latest"
129131
132+
docker tag bundle "jancajthaml/datadog_mock:${VERSION}"
133+
docker push "jancajthaml/datadog_mock:${VERSION}"
134+
130135
else
131136
parse_git_branch() {
132137
branch=$(git rev-parse --abbrev-ref HEAD 2> /dev/null)
@@ -137,6 +142,8 @@ jobs:
137142
}
138143
VERSION="$(parse_git_branch)"
139144
145+
echo "releasing snapshot ${VERSION}"
146+
140147
docker tag bundle "jancajthaml/datadog_mock:${VERSION}"
141148
docker push "jancajthaml/datadog_mock:${VERSION}"
142149
fi

0 commit comments

Comments
 (0)