Skip to content

Commit

Permalink
feat(api-server): publish API server docker image
Browse files Browse the repository at this point in the history
Signed-off-by: Travis Payne <travis.payne@accenture.com>
  • Loading branch information
Travis Payne authored and petermetz committed May 19, 2021
1 parent e8be088 commit ad7b221
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions packages/cactus-cmd-api-server/hooks/post_push
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
#!/bin/bash


SHORTHASH="$(git rev-parse --short HEAD)"
TODAYS_DATE="$(date +%F)"

#
# We tag every image with today's date and also the git short hash
# Today's date helps humans quickly intuit which version is older/newer
# And the short hash helps identify the exact git revision that the image was
# built from in case you are chasing some exotic bug that requires this sort of
# rabbithole diving where you are down to comparing the images at this level.
#
DOCKER_TAG="$TODAYS_DATE-$SHORTHASH"


docker tag $IMAGE_NAME $DOCKER_REPO:$DOCKER_TAG
docker push $DOCKER_REPO:$DOCKER_TAG

0 comments on commit ad7b221

Please sign in to comment.