Skip to content

Commit 79aa326

Browse files
committed
use linux as default when builing image
1 parent 3fc4627 commit 79aa326

File tree

2 files changed

+10
-8
lines changed

2 files changed

+10
-8
lines changed

Taskfile_library.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,8 @@ vars:
3636
sh: 'PROJECT_ROOT="{{.ROOT_DIR2}}" {{.TASKFILE_DIR2}}/get-version.sh'
3737
OS:
3838
sh: echo ${OS:-$(go env GOOS)}
39+
IMAGE_OS:
40+
sh: echo ${IMAGE_OS:-linux}
3941
ARCH:
4042
sh: echo ${ARCH:-$(go env GOARCH)}
4143
MODULE_NAME:

tasks_build_img.yaml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -30,27 +30,27 @@ tasks:
3030
internal: true
3131

3232
build:
33-
desc: " Build the image for $OS/$ARCH."
33+
desc: " Build the image for $IMAGE_OS/$ARCH."
3434
summary: |
3535
This task builds the image for the current operating system and architecture.
36-
To overwrite this, set the 'OS' and 'ARCH' environment variables.
36+
To overwrite this, set the 'IMAGE_OS' and 'ARCH' environment variables.
3737
To overwrite the image's base path, set the 'IMAGE_REGISTRY' environment variable.
3838
deps:
3939
- task: build:bin:build
4040
vars:
41-
OS: '{{.OS}}'
41+
OS: '{{.IMAGE_OS}}'
4242
ARCH: '{{.ARCH}}'
4343
cmds:
4444
- task: build-raw
4545
vars:
46-
OS: '{{.OS}}'
46+
OS: '{{.IMAGE_OS}}'
4747
ARCH: '{{.ARCH}}'
4848

4949
build-raw:
5050
desc: " Build the image. Does not run the binary build before."
5151
summary: |
5252
This task builds the image for the current operating system and architecture.
53-
To overwrite this, set the 'OS' and 'ARCH' environment variables.
53+
To overwrite this, set the 'IMAGE_OS' and 'ARCH' environment variables.
5454
To overwrite the image's base path, set the 'IMAGE_REGISTRY' environment variable.
5555
requires:
5656
vars:
@@ -68,7 +68,7 @@ tasks:
6868
vars:
6969
COMPONENT: '{{.ITEM}}'
7070
IMAGE_BASE: '{{.IMAGE_BASE}}'
71-
OS: '{{.OS}}'
71+
OS: '{{.IMAGE_OS}}'
7272
ARCH: '{{.ARCH}}'
7373
task: build-internal
7474

@@ -124,7 +124,7 @@ tasks:
124124
desc: " Push the image. Image must have been built before."
125125
summary: |
126126
This task pushes the image for the current operating system and architecture.
127-
To overwrite this, set the 'OS' and 'ARCH' environment variables.
127+
To overwrite this, set the 'IMAGE_OS' and 'ARCH' environment variables.
128128
To overwrite the image's base path, set the 'IMAGE_REGISTRY' environment variable.
129129
requires:
130130
vars:
@@ -136,7 +136,7 @@ tasks:
136136
var: COMPONENTS
137137
vars:
138138
COMPONENT: '{{.ITEM}}'
139-
OS: '{{.OS}}'
139+
OS: '{{.IMAGE_OS}}'
140140
ARCH: '{{.ARCH}}'
141141
task: push-internal
142142

0 commit comments

Comments
 (0)