File tree Expand file tree Collapse file tree 3 files changed +27
-10
lines changed
Expand file tree Collapse file tree 3 files changed +27
-10
lines changed Original file line number Diff line number Diff line change @@ -173,14 +173,9 @@ jobs:
173173 steps :
174174 - checkout
175175 - setup_remote_docker
176- - run : |
177- TAG=$(git describe --tags --abbrev=0 | cut -d "v" -f 2)
178- echo "building ${TAG}"
179- docker build -t ${IMAGE_NAME}:${TAG} .
180- docker tag ${IMAGE_NAME}:${TAG} ${IMAGE_NAME}:latest
181- echo "$DOCKER_PASS" | docker login -u "$DOCKER_USER" --password-stdin
182- docker push ${IMAGE_NAME}:${TAG}
183- docker push ${IMAGE_NAME}:latest
176+ - run :
177+ name : " Build and push Docker image"
178+ command : ./scripts/build_push_docker.sh
184179
185180workflows :
186181 version : 2
Original file line number Diff line number Diff line change 1+ #! /bin/bash
2+
3+ set -e
4+
5+ TAG=$( git describe --tags --abbrev=0 | cut -d " v" -f 2)
6+ echo " building ${TAG} "
7+ docker build -t ${IMAGE_NAME} :${TAG} .
8+
9+ if [[ $TAG != * " beta" * ]]; then
10+ docker tag ${IMAGE_NAME} :${TAG} ${IMAGE_NAME} :latest
11+ fi
12+
13+ echo " $DOCKER_PASS " | docker login -u " $DOCKER_USER " --password-stdin
14+ docker push ${IMAGE_NAME} :${TAG}
15+
16+ if [[ $TAG != * " beta" * ]]; then
17+ docker push ${IMAGE_NAME} :latest
18+ fi
Original file line number Diff line number Diff line change 44
55RELEASE_NOTES=` awk ' BEGIN {FS="##"; RS=""} FNR==2 {print; exit}' CHANGELOG.md`
66VERSION=` cat plugin.json| jq ' .info.version' | sed s/\" //g`
7+ PRERELEASE=' '
78LATEST_TAG=$( git describe --tags --abbrev=0)
89
910if [ v${VERSION} == ${LATEST_TAG} ]; then
1011 echo " Tag ${LATEST_TAG} have already been pushed. Exiting..."
1112 exit 1
1213fi
1314
15+ if [[ $VERSION == * " beta" * ]]; then
16+ PRERELEASE=' -prerelease'
17+ fi
18+
1419git config user.email
" [email protected] " 1520git config user.name " CircleCI Automation"
1621git tag v${VERSION}
2227 -c ${CIRCLE_SHA1} \
2328 -n " v${VERSION} " \
2429 -b " ${RELEASE_NOTES} " \
25- v${VERSION} \
26- ./artifacts/
30+ ${PRERELEASE} v${VERSION} ./artifacts/
You can’t perform that action at this time.
0 commit comments