Files
Jay Brown 451da3d26d Merged in feature/service-accounts-1 (pull request #227)
Support for service accounts with static credentials

* feature complete

* tests and docs

* lint fix
2026-05-21 19:40:04 +00:00

46 lines
1.3 KiB
YAML

---
# https://taskfile.dev
version: "3"
vars:
DOCKERFILE: "build/Dockerfile"
BUILD_TIME:
sh: date -u +"%Y-%m-%dT%H:%M:%SZ"
GIT_SHORT_COMMIT:
sh: git rev-parse --short HEAD
GIT_VERSION:
sh: echo "$(date -u +"%Y%m%d.%H%M%S")-$(git rev-parse --short HEAD)"
GIT_COMMIT:
sh: git rev-parse HEAD
tasks:
lint:
desc: "Lint the production Dockerfile with hadolint"
cmds:
- hadolint {{.DOCKERFILE}} -t none
build:
desc: "Build the production docker image tagged :latest and :<git-version>"
run: once
cmd: |
# Build with caching enabled
docker build \
--build-arg "GIT_VERSION={{.GIT_VERSION}}" \
--build-arg "GIT_COMMIT={{.GIT_COMMIT}}" \
--build-arg "BUILD_TIME={{.BUILD_TIME}}" \
--build-arg BUILDKIT_INLINE_CACHE=1 \
-t {{.IMAGE_NAME}}:latest \
-t {{.IMAGE_NAME}}:{{.GIT_VERSION}} \
-f {{.DOCKERFILE}} .
build:debug:
desc: "Build the :debug docker image that includes the Delve debugger"
run: once
cmd: |
# Build debug image with Delve debugger
docker build \
--build-arg "GIT_VERSION={{.GIT_VERSION}}" \
--build-arg "GIT_COMMIT={{.GIT_COMMIT}}" \
--build-arg "BUILD_TIME={{.BUILD_TIME}}" \
-t {{.IMAGE_NAME}}:debug \
-f build/Dockerfile.debug .