Use latest goreleaser with GOAMD64 support (#2419)
* Use latest goreleaser with GOAMD64 support * Update Go version to 1.18.1 * Hardcode GOAMD64 in cli install Signed-off-by: Sanket Sudake <sanketsudake@gmail.com>
This commit is contained in:
@@ -25,7 +25,7 @@ jobs:
|
|||||||
- name: Set up Go
|
- name: Set up Go
|
||||||
uses: actions/setup-go@v2
|
uses: actions/setup-go@v2
|
||||||
with:
|
with:
|
||||||
go-version: 1.18
|
go-version: 1.18.1
|
||||||
|
|
||||||
- name: Check out code
|
- name: Check out code
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
|
|||||||
@@ -34,7 +34,7 @@ jobs:
|
|||||||
- name: setup go
|
- name: setup go
|
||||||
uses: actions/setup-go@v2
|
uses: actions/setup-go@v2
|
||||||
with:
|
with:
|
||||||
go-version: 1.18
|
go-version: 1.18.1
|
||||||
|
|
||||||
- name: Checkout sources
|
- name: Checkout sources
|
||||||
uses: actions/checkout@v2.3.4
|
uses: actions/checkout@v2.3.4
|
||||||
@@ -84,7 +84,6 @@ jobs:
|
|||||||
uses: goreleaser/goreleaser-action@v2
|
uses: goreleaser/goreleaser-action@v2
|
||||||
with:
|
with:
|
||||||
install-only: true
|
install-only: true
|
||||||
version: 1.7.0
|
|
||||||
|
|
||||||
- name: Setup Prometheus Stack
|
- name: Setup Prometheus Stack
|
||||||
run: |
|
run: |
|
||||||
@@ -93,18 +92,19 @@ jobs:
|
|||||||
kubectl create ns monitoring
|
kubectl create ns monitoring
|
||||||
helm install monitoring prometheus-community/prometheus -n monitoring
|
helm install monitoring prometheus-community/prometheus -n monitoring
|
||||||
|
|
||||||
|
- name: Build and Install Fission CLI
|
||||||
|
run: |
|
||||||
|
make debug-vars
|
||||||
|
make build-fission-cli
|
||||||
|
sudo make install-fission-cli
|
||||||
|
sudo chmod +x /usr/local/bin/fission
|
||||||
|
|
||||||
- name: Build and Install Fission
|
- name: Build and Install Fission
|
||||||
run: |
|
run: |
|
||||||
kubectl create ns fission
|
kubectl create ns fission
|
||||||
make create-crds
|
make create-crds
|
||||||
SKAFFOLD_PROFILE=kind-ci make skaffold-deploy
|
SKAFFOLD_PROFILE=kind-ci make skaffold-deploy
|
||||||
|
|
||||||
- name: Build and Install Fission CLI
|
|
||||||
run: |
|
|
||||||
make build-fission-cli
|
|
||||||
sudo make install-fission-cli
|
|
||||||
sudo chmod +x /usr/local/bin/fission
|
|
||||||
|
|
||||||
- name: Port-forward fission components
|
- name: Port-forward fission components
|
||||||
run: |
|
run: |
|
||||||
kubectl port-forward svc/router 8888:80 -nfission &
|
kubectl port-forward svc/router 8888:80 -nfission &
|
||||||
|
|||||||
@@ -33,7 +33,7 @@ jobs:
|
|||||||
- name: Setup go
|
- name: Setup go
|
||||||
uses: actions/setup-go@v2
|
uses: actions/setup-go@v2
|
||||||
with:
|
with:
|
||||||
go-version: 1.18
|
go-version: 1.18.1
|
||||||
|
|
||||||
- name: Checkout action sources
|
- name: Checkout action sources
|
||||||
uses: actions/checkout@v2.3.4
|
uses: actions/checkout@v2.3.4
|
||||||
@@ -60,7 +60,6 @@ jobs:
|
|||||||
uses: goreleaser/goreleaser-action@v2
|
uses: goreleaser/goreleaser-action@v2
|
||||||
with:
|
with:
|
||||||
install-only: true
|
install-only: true
|
||||||
version: 1.7.0
|
|
||||||
|
|
||||||
- name: Setup kubectl & fetch node information
|
- name: Setup kubectl & fetch node information
|
||||||
run: |
|
run: |
|
||||||
|
|||||||
@@ -22,6 +22,7 @@ COMMITSHA ?= $(shell git rev-parse HEAD)
|
|||||||
|
|
||||||
GOOS ?= $(shell go env GOOS)
|
GOOS ?= $(shell go env GOOS)
|
||||||
GOARCH ?= $(shell go env GOARCH)
|
GOARCH ?= $(shell go env GOARCH)
|
||||||
|
GOAMD64 ?= $(shell go env GOAMD64)
|
||||||
|
|
||||||
FISSION-CLI-SUFFIX :=
|
FISSION-CLI-SUFFIX :=
|
||||||
ifeq ($(GOOS), windows)
|
ifeq ($(GOOS), windows)
|
||||||
@@ -32,6 +33,11 @@ endif
|
|||||||
help:
|
help:
|
||||||
@awk '/^#/{c=substr($$0,3);next}c&&/^[[:alpha:]][[:alnum:]_-]+:/{print substr($$1,1,index($$1,":")),c}1{c=0}' $(MAKEFILE_LIST) | column -s: -t
|
@awk '/^#/{c=substr($$0,3);next}c&&/^[[:alpha:]][[:alnum:]_-]+:/{print substr($$1,1,index($$1,":")),c}1{c=0}' $(MAKEFILE_LIST) | column -s: -t
|
||||||
|
|
||||||
|
print-%:
|
||||||
|
@echo '$*=$($*)'
|
||||||
|
|
||||||
|
debug-vars: print-GOOS print-GOARCH print-GOAMD64 print-VERSION print-TIMESTAMP print-COMMITSHA print-FISSION-CLI-SUFFIX print-SKAFFOLD_PROFILE
|
||||||
|
|
||||||
### Static checks
|
### Static checks
|
||||||
check: test-run build-fission-cli clean
|
check: test-run build-fission-cli clean
|
||||||
|
|
||||||
@@ -47,10 +53,11 @@ test-run: code-checks
|
|||||||
|
|
||||||
### Binaries
|
### Binaries
|
||||||
build-fission-cli:
|
build-fission-cli:
|
||||||
@GOOS=$(GOOS) GOARCH=$(GOARCH) GORELEASER_CURRENT_TAG=$(VERSION) goreleaser build --snapshot --rm-dist --single-target --id fission-cli
|
@GOOS=$(GOOS) GOARCH=$(GOARCH) GOAMD64=$(GOAMD64) GORELEASER_CURRENT_TAG=$(VERSION) goreleaser build --snapshot --rm-dist --single-target --id fission-cli
|
||||||
|
|
||||||
install-fission-cli:
|
install-fission-cli:
|
||||||
mv dist/fission-cli_$(GOOS)_$(GOARCH)/fission$(FISSION-CLI-SUFFIX) /usr/local/bin/fission
|
# TODO: Fix this hack, replace v1 with GOAMD64
|
||||||
|
mv dist/fission-cli_$(GOOS)_$(GOARCH)_v1/fission$(FISSION-CLI-SUFFIX) /usr/local/bin/fission
|
||||||
|
|
||||||
### Codegen
|
### Codegen
|
||||||
codegen:
|
codegen:
|
||||||
@@ -93,11 +100,11 @@ all-generators: codegen generate-crds generate-swagger-doc
|
|||||||
|
|
||||||
skaffold-prebuild:
|
skaffold-prebuild:
|
||||||
@GOOS=linux GOARCH=amd64 GORELEASER_CURRENT_TAG=$(VERSION) goreleaser build --snapshot --rm-dist --single-target
|
@GOOS=linux GOARCH=amd64 GORELEASER_CURRENT_TAG=$(VERSION) goreleaser build --snapshot --rm-dist --single-target
|
||||||
@cp -v cmd/builder/Dockerfile.fission-builder dist/builder_linux_amd64/Dockerfile
|
@cp -v cmd/builder/Dockerfile.fission-builder dist/builder_linux_amd64_v1/Dockerfile
|
||||||
@cp -v cmd/fetcher/Dockerfile.fission-fetcher dist/fetcher_linux_amd64/Dockerfile
|
@cp -v cmd/fetcher/Dockerfile.fission-fetcher dist/fetcher_linux_amd64_v1/Dockerfile
|
||||||
@cp -v cmd/fission-bundle/Dockerfile.fission-bundle dist/fission-bundle_linux_amd64/Dockerfile
|
@cp -v cmd/fission-bundle/Dockerfile.fission-bundle dist/fission-bundle_linux_amd64_v1/Dockerfile
|
||||||
@cp -v cmd/reporter/Dockerfile.reporter dist/reporter_linux_amd64/Dockerfile
|
@cp -v cmd/reporter/Dockerfile.reporter dist/reporter_linux_amd64_v1/Dockerfile
|
||||||
@cp -v cmd/preupgradechecks/Dockerfile.fission-preupgradechecks dist/pre-upgrade-checks_linux_amd64/Dockerfile
|
@cp -v cmd/preupgradechecks/Dockerfile.fission-preupgradechecks dist/pre-upgrade-checks_linux_amd64_v1/Dockerfile
|
||||||
|
|
||||||
skaffold-deploy: skaffold-prebuild
|
skaffold-deploy: skaffold-prebuild
|
||||||
skaffold run -p $(SKAFFOLD_PROFILE)
|
skaffold run -p $(SKAFFOLD_PROFILE)
|
||||||
|
|||||||
+4
-4
@@ -15,13 +15,13 @@ kind: Config
|
|||||||
build:
|
build:
|
||||||
artifacts:
|
artifacts:
|
||||||
- image: fission-bundle
|
- image: fission-bundle
|
||||||
context: dist/fission-bundle_linux_amd64
|
context: dist/fission-bundle_linux_amd64_v1
|
||||||
- image: fetcher
|
- image: fetcher
|
||||||
context: dist/fetcher_linux_amd64
|
context: dist/fetcher_linux_amd64_v1
|
||||||
- image: pre-upgrade-checks
|
- image: pre-upgrade-checks
|
||||||
context: dist/pre-upgrade-checks_linux_amd64
|
context: dist/pre-upgrade-checks_linux_amd64_v1
|
||||||
- image: reporter
|
- image: reporter
|
||||||
context: dist/reporter_linux_amd64
|
context: dist/reporter_linux_amd64_v1
|
||||||
deploy:
|
deploy:
|
||||||
helm:
|
helm:
|
||||||
releases:
|
releases:
|
||||||
|
|||||||
@@ -83,11 +83,11 @@ test_fission_objects() {
|
|||||||
build_docker_images() {
|
build_docker_images() {
|
||||||
echo "Building new docker images"
|
echo "Building new docker images"
|
||||||
make skaffold-prebuild
|
make skaffold-prebuild
|
||||||
doit docker build -t fission-bundle dist/fission-bundle_linux_amd64
|
doit docker build -t fission-bundle dist/fission-bundle_linux_amd64_v1
|
||||||
doit docker build -t fetcher dist/fetcher_linux_amd64
|
doit docker build -t fetcher dist/fetcher_linux_amd64_v1
|
||||||
doit docker build -t builder dist/builder_linux_amd64
|
doit docker build -t builder dist/builder_linux_amd64_v1
|
||||||
doit docker build -t reporter dist/reporter_linux_amd64
|
doit docker build -t reporter dist/reporter_linux_amd64_v1
|
||||||
doit docker build -t preupgradechecks dist/pre-upgrade-checks_linux_amd64
|
doit docker build -t preupgradechecks dist/pre-upgrade-checks_linux_amd64_v1
|
||||||
}
|
}
|
||||||
|
|
||||||
kind_image_load() {
|
kind_image_load() {
|
||||||
|
|||||||
Reference in New Issue
Block a user