-
Notifications
You must be signed in to change notification settings - Fork 288
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(api-server): publish API server docker image
Signed-off-by: Travis Payne <[email protected]>
- Loading branch information
Showing
1 changed file
with
18 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |