Skip to content

Commit

Permalink
refactor: build and release tasks
Browse files Browse the repository at this point in the history
fixes references to incorrect container build files, separates release
and build tasks to make more sense, adds tasks for publishing the helm chart
prepares for #45
  • Loading branch information
devraj committed Sep 12, 2023
1 parent 5712646 commit 659029c
Showing 1 changed file with 24 additions and 1 deletion.
25 changes: 24 additions & 1 deletion Taskfile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,19 @@ dotenv: ['.env']

tasks:
build:image:
prompt: "Before we build, is the version number up to date?"
desc: builds a publishable docker image
cmds:
- |
docker buildx build \
--platform=linux/amd64,linux/arm64 \
-t ghcr.io/{{.ORG_NAME}}/{{.PACKAGE_NAME}}:v{{.PROJ_VER}} \
-t ghcr.io/{{.ORG_NAME}}/{{.PACKAGE_NAME}}:latest \
-f Dockerfile.prod .
vars:
PROJ_VER:
sh: "task version"
release:image:
prompt: "Before we build, is the version number up to date?"
desc: builds a publishable docker image
cmds:
Expand All @@ -13,7 +26,17 @@ tasks:
--push \
-t ghcr.io/{{.ORG_NAME}}/{{.PACKAGE_NAME}}:v{{.PROJ_VER}} \
-t ghcr.io/{{.ORG_NAME}}/{{.PACKAGE_NAME}}:latest \
-f Dockerfile .
-f Dockerfile.prod .
vars:
PROJ_VER:
sh: "task version"
release:chart:
prompt: "Before we build, is the version number up to date?"
desc: builds and publishes the helm chart for this project
dir: charts
cmds:
- helm package {{.PACKAGE_NAME}}
- helm push {{.PACKAGE_NAME}}-{{.PROJ_VER}}*.tgz oci://ghcr.io/{{.ORG_NAME}}/charts
vars:
PROJ_VER:
sh: "task version"
Expand Down

0 comments on commit 659029c

Please sign in to comment.