Skip to content

Commit

Permalink
Merge pull request #2446 from esl/pass-commit-msg-to-docker-image
Browse files Browse the repository at this point in the history
Pass a commit msg to MIM dockerfile
  • Loading branch information
michalwski committed Sep 18, 2019
2 parents bfe2116 + 524e8ce commit 92dd516
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion tools/circle-build-and-push-docker.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ export BUILDS=`pwd`
DOCKERHUB_TAG=${CIRCLE_SHA1}
VERSION=`tools/generate_vsn.sh`
GIT_REF=`git rev-parse --short HEAD`
GIT_COMMIT_MSG=`git log --format=%B -n 1 HEAD`

if [ -n "$CIRCLE_PULL_REQUEST" ]; then
# CircleCI doesn't provide PR number in env. var., so we need to extract it from PR URL
Expand All @@ -32,13 +33,14 @@ IMAGE_TAG=${DOCKERHUB_REPO}/mongooseim:${DOCKERHUB_TAG}

git clone https://github.com/esl/mongooseim-docker.git
cd mongooseim-docker
git checkout 8105a0af3f673a92836af49ed797a16d66b51b2f
git checkout b01568e230edc86dfe8e02e80ccefe064afc3a5e

cp ../${MONGOOSE_TGZ} member

docker build -f Dockerfile.member -t ${IMAGE_TAG} \
--build-arg BUILD_DATE=`date -u +"%Y-%m-%dT%H:%M:%SZ"` \
--build-arg VCS_REF=${GIT_REF} \
--build-arg VCS_REF_DESC="${GIT_COMMIT_MSG}" \
--build-arg VERSION=${VERSION} \
.

Expand Down

0 comments on commit 92dd516

Please sign in to comment.