We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2c2ce15 commit c811a8cCopy full SHA for c811a8c
skaffold-builder.sh
@@ -0,0 +1,14 @@
1
+#!/bin/sh
2
+set -e
3
+
4
+cd $(dirname $0)
5
6
+# https://github.com/moby/moby/issues/42845
7
+export DOCKER_BUILDKIT=0
8
9
+export GIT_VERSION="$(git describe --tags --abbrev=0)@$(git rev-parse HEAD)"
10
+docker build --pull --progress=tty --build-arg "GIT_VERSION=$GIT_VERSION" -t "$IMAGE" "$BUILD_CONTEXT"
11
12
+if $PUSH_IMAGE; then
13
+ docker push $IMAGE
14
+fi
skaffold.yml
@@ -4,6 +4,11 @@ build:
artifacts:
- image: djangofluent
context: .
+ custom:
+ buildCommand: sh skaffold-builder.sh
+ #docker:
+ # buildArgs:
+ # GIT_VERSION: '{{if .IMAGE_TAG}}{{.IMAGE_TAG}}{{else}}0.0.0dev0{{end}}'
tagPolicy:
gitCommit:
ignoreChanges: true # no -dirty flag
0 commit comments