Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions Taskfile_library.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@ vars:
sh: 'PROJECT_ROOT="{{.ROOT_DIR2}}" {{.TASKFILE_DIR2}}/get-version.sh'
OS:
sh: echo ${OS:-$(go env GOOS)}
IMAGE_OS:
sh: echo ${IMAGE_OS:-linux}
ARCH:
sh: echo ${ARCH:-$(go env GOARCH)}
MODULE_NAME:
Expand Down
16 changes: 8 additions & 8 deletions tasks_build_img.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,27 +30,27 @@ tasks:
internal: true

build:
desc: " Build the image for $OS/$ARCH."
desc: " Build the image for $IMAGE_OS/$ARCH."
summary: |
This task builds the image for the current operating system and architecture.
To overwrite this, set the 'OS' and 'ARCH' environment variables.
To overwrite this, set the 'IMAGE_OS' and 'ARCH' environment variables.
To overwrite the image's base path, set the 'IMAGE_REGISTRY' environment variable.
deps:
- task: build:bin:build
vars:
OS: '{{.OS}}'
OS: '{{.IMAGE_OS}}'
ARCH: '{{.ARCH}}'
cmds:
- task: build-raw
vars:
OS: '{{.OS}}'
OS: '{{.IMAGE_OS}}'
ARCH: '{{.ARCH}}'

build-raw:
desc: " Build the image. Does not run the binary build before."
summary: |
This task builds the image for the current operating system and architecture.
To overwrite this, set the 'OS' and 'ARCH' environment variables.
To overwrite this, set the 'IMAGE_OS' and 'ARCH' environment variables.
To overwrite the image's base path, set the 'IMAGE_REGISTRY' environment variable.
requires:
vars:
Expand All @@ -68,7 +68,7 @@ tasks:
vars:
COMPONENT: '{{.ITEM}}'
IMAGE_BASE: '{{.IMAGE_BASE}}'
OS: '{{.OS}}'
OS: '{{.IMAGE_OS}}'
ARCH: '{{.ARCH}}'
task: build-internal

Expand Down Expand Up @@ -124,7 +124,7 @@ tasks:
desc: " Push the image. Image must have been built before."
summary: |
This task pushes the image for the current operating system and architecture.
To overwrite this, set the 'OS' and 'ARCH' environment variables.
To overwrite this, set the 'IMAGE_OS' and 'ARCH' environment variables.
To overwrite the image's base path, set the 'IMAGE_REGISTRY' environment variable.
requires:
vars:
Expand All @@ -136,7 +136,7 @@ tasks:
var: COMPONENTS
vars:
COMPONENT: '{{.ITEM}}'
OS: '{{.OS}}'
OS: '{{.IMAGE_OS}}'
ARCH: '{{.ARCH}}'
task: push-internal

Expand Down