-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Building helm chart v3 migration tool binaries
- Loading branch information
1 parent
540a201
commit 6d32ecd
Showing
4 changed files
with
89 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
name: Build Update Collection binaries | ||
|
||
on: | ||
workflow_call: | ||
|
||
jobs: | ||
build-binaries: | ||
runs-on: ubuntu-20.04 | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Setup go | ||
uses: actions/setup-go@v3 | ||
with: | ||
go-version: '1.19' | ||
- name: Build | ||
run: make build-update-collection-v3 | ||
- name: Store windows (arm64) binary as action artifact | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: update-collection-v3-sumo-windows_arm64 | ||
path: ./src/go/cmd/update-collection-v3/update-collection-v3-sumo-windows_arm64 | ||
if-no-files-found: error | ||
- name: Store windows (amd64) binary as action artifact | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: update-collection-v3-sumo-windows_amd64 | ||
path: ./src/go/cmd/update-collection-v3/update-collection-v3-sumo-windows_amd64 | ||
if-no-files-found: error | ||
- name: Store linux (amd64) binary as action artifact | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: update-collection-v3-sumo-linux_amd64 | ||
path: ./src/go/cmd/update-collection-v3/update-collection-v3-sumo-linux_amd64 | ||
if-no-files-found: error | ||
- name: Store linux (arm64) binary as action artifact | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: update-collection-v3-sumo-linux_arm64 | ||
path: ./src/go/cmd/update-collection-v3/update-collection-v3-sumo-linux_arm64 | ||
if-no-files-found: error | ||
- name: Store darwin (amd64) binary as action artifact | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: update-collection-v3-sumo-darwin_amd64 | ||
path: ./src/go/cmd/update-collection-v3/update-collection-v3-sumo-darwin_amd64 | ||
if-no-files-found: error | ||
- name: Store darwin (arm64) binary as action artifact | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: update-collection-v3-sumo-darwin_arm64 | ||
path: ./src/go/cmd/update-collection-v3/update-collection-v3-sumo-darwin_arm64 | ||
if-no-files-found: error |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,10 @@ | ||
.PHONY: build | ||
build: | ||
go build . | ||
build: $(eval SHELL:=/bin/bash) | ||
dist="linux_amd64 linux_arm64 darwin_arm64 darwin_amd64 windows_arm64 windows_amd64"; \ | ||
for os_arch in $$dist; do \ | ||
os=`echo $$os_arch | awk -F_ '{print $$1}'`; \ | ||
arch=`echo $$os_arch | awk -F_ '{print $$2}'`; \ | ||
env GOOS=$$os GOARCH=$$arch go build -o update-collection-v3-sumo-$$os_arch; \ | ||
done | ||
test: | ||
go test ./... |