2022-08-11 12:11:16 +10:00
|
|
|
#!/bin/bash
|
|
|
|
|
2022-08-11 11:29:19 +10:00
|
|
|
VERSION=$(git log -1 --pretty=%h)
|
2022-08-11 12:11:16 +10:00
|
|
|
REPO="dockerhub.kube:5000/desteg:"
|
2022-08-11 11:29:19 +10:00
|
|
|
TAG="$REPO$VERSION"
|
|
|
|
LATEST="${REPO}latest"
|
2022-08-11 12:11:16 +10:00
|
|
|
TS=$( date '+%F_%H:%M:%S' )
|
2022-08-11 11:29:19 +10:00
|
|
|
docker build -t "$TAG" -t "$LATEST" --build-arg VERSION="$VERSION" --build-arg BUILD_TIMESTAMP="$BUILD_TIMESTAMP" .
|
|
|
|
docker push "$TAG"
|
|
|
|
docker push "$LATEST"
|