Skip to content

Commit

Permalink
fix: Broken workflows and bump deps
Browse files Browse the repository at this point in the history
Signed-off-by: Michael Gasch <15986659+embano1@users.noreply.github.com>
  • Loading branch information
embano1 committed Feb 19, 2023
1 parent eaf11cd commit 641e723
Show file tree
Hide file tree
Showing 20 changed files with 428 additions and 752 deletions.
16 changes: 9 additions & 7 deletions .github/workflows/gcr-dev-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,17 +19,18 @@ jobs:
image:
strategy:
matrix:
go-version: ["1.18"]
go-version: ["1.19"]
platform: ["ubuntu-latest"]

runs-on: ${{ matrix.platform }}
timeout-minutes: 20
env:
KO_DOCKER_REPO: us.gcr.io/daisy-284300/veba # .../router@sha256:
PROJECT_ID: ${{ secrets.GCP_PROJECT_ID }}

steps:
- name: Setup ko
uses: imjasonh/setup-ko@ace48d793556083a76f1e3e6068850c1f4a369aa # v0.4
uses: imjasonh/setup-ko@ace48d793556083a76f1e3e6068850c1f4a369aa # v0.6

- name: Set up Go ${{ matrix.go-version }}
uses: actions/setup-go@6edd4406fa81c3da01a34fa6f6343087c207a568
Expand All @@ -39,12 +40,13 @@ jobs:

- uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c

- name: Login to GCP
uses: google-github-actions/setup-gcloud@62d4898025f6041e16b1068643bfc5a696863587
- id: Login to GCP
uses: google-github-actions/auth@ef5d53e30bbcd8d0836f4288f5e50ff3e086997d
with:
project_id: ${{ secrets.GCP_PROJECT_ID }}
service_account_email: ${{ secrets.GCP_EMAIL }}
service_account_key: ${{ secrets.GCP_CREDENTIALS }}
credentials_json: '${{ secrets.GCP_CREDENTIALS }}'

- name: Set up gcloud
uses: google-github-actions/setup-gcloud@62d4898025f6041e16b1068643bfc5a696863587

- name: Configure Docker
run: gcloud auth configure-docker --quiet
Expand Down
16 changes: 9 additions & 7 deletions .github/workflows/gcr-prerelease-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,17 +14,18 @@ jobs:
image:
strategy:
matrix:
go-version: ["1.18"]
go-version: ["1.19"]
platform: ["ubuntu-latest"]

runs-on: ${{ matrix.platform }}
timeout-minutes: 20
env:
KO_DOCKER_REPO: us.gcr.io/daisy-284300/veba # .../router@sha256:
PROJECT_ID: ${{ secrets.GCP_PROJECT_ID }}

steps:
- name: Setup ko
uses: imjasonh/setup-ko@ace48d793556083a76f1e3e6068850c1f4a369aa # v0.4
uses: imjasonh/setup-ko@ace48d793556083a76f1e3e6068850c1f4a369aa # v0.6

- name: Set up Go ${{ matrix.go-version }}
uses: actions/setup-go@6edd4406fa81c3da01a34fa6f6343087c207a568
Expand All @@ -34,12 +35,13 @@ jobs:

- uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c

- name: Login to GCP
uses: google-github-actions/setup-gcloud@62d4898025f6041e16b1068643bfc5a696863587
- id: Login to GCP
uses: google-github-actions/auth@ef5d53e30bbcd8d0836f4288f5e50ff3e086997d
with:
project_id: ${{ secrets.GCP_PROJECT_ID }}
service_account_email: ${{ secrets.GCP_EMAIL }}
service_account_key: ${{ secrets.GCP_CREDENTIALS }}
credentials_json: '${{ secrets.GCP_CREDENTIALS }}'

- name: Set up gcloud
uses: google-github-actions/setup-gcloud@62d4898025f6041e16b1068643bfc5a696863587

- name: Configure Docker
run: gcloud auth configure-docker --quiet
Expand Down
18 changes: 10 additions & 8 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
timeout-minutes: 30
strategy:
matrix:
go-version: ["1.18"]
go-version: ["1.19"]
platform: ["ubuntu-latest"]
runs-on: ${{ matrix.platform }}

Expand Down Expand Up @@ -103,15 +103,16 @@ jobs:
timeout-minutes: 30
env:
KO_DOCKER_REPO: us.gcr.io/daisy-284300/veba # .../router@sha256:
PROJECT_ID: ${{ secrets.GCP_PROJECT_ID }}
strategy:
matrix:
go-version: ["1.18"]
go-version: ["1.19"]
platform: ["ubuntu-latest"]
runs-on: ${{ matrix.platform }}

steps:
- name: Setup ko
uses: imjasonh/setup-ko@ace48d793556083a76f1e3e6068850c1f4a369aa # v0.4
uses: imjasonh/setup-ko@ace48d793556083a76f1e3e6068850c1f4a369aa # v0.6

- name: Set up Go ${{ matrix.go-version }}
uses: actions/setup-go@6edd4406fa81c3da01a34fa6f6343087c207a568
Expand All @@ -121,12 +122,13 @@ jobs:

- uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c

- name: Login to GCP
uses: google-github-actions/setup-gcloud@62d4898025f6041e16b1068643bfc5a696863587
- id: Login to GCP
uses: google-github-actions/auth@ef5d53e30bbcd8d0836f4288f5e50ff3e086997d
with:
project_id: ${{ secrets.GCP_PROJECT_ID }}
service_account_email: ${{ secrets.GCP_EMAIL }}
service_account_key: ${{ secrets.GCP_CREDENTIALS }}
credentials_json: '${{ secrets.GCP_CREDENTIALS }}'

- name: Set up gcloud
uses: google-github-actions/setup-gcloud@62d4898025f6041e16b1068643bfc5a696863587

- name: Configure Docker
run: gcloud auth configure-docker --quiet
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/router-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
name: Build binaries
strategy:
matrix:
go-version: ["1.18"]
go-version: ["1.19"]
platform: ["ubuntu-latest"]

runs-on: ${{ matrix.platform }}
Expand Down Expand Up @@ -60,7 +60,7 @@ jobs:
name: Verify Release ko artifact (no upload)
strategy:
matrix:
go-version: ["1.18"]
go-version: ["1.19"]
platform: ["ubuntu-latest"]

runs-on: ${{ matrix.platform }}
Expand All @@ -70,7 +70,7 @@ jobs:

steps:
- name: Setup ko
uses: imjasonh/setup-ko@ace48d793556083a76f1e3e6068850c1f4a369aa # v0.4
uses: imjasonh/setup-ko@ace48d793556083a76f1e3e6068850c1f4a369aa # v0.6

- name: Set up Go ${{ matrix.go-version }}
uses: actions/setup-go@6edd4406fa81c3da01a34fa6f6343087c207a568
Expand Down
21 changes: 11 additions & 10 deletions .github/workflows/router-helm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ on:
- 'vmware-event-router/**'

env:
KIND_VERSION: v0.11.1
KIND_VERSION: v0.17.0
NAMESPACE: vmware
KO_DOCKER_REPO: kind.local

Expand All @@ -23,13 +23,13 @@ jobs:
timeout-minutes: 15

steps:
- name: Set up Go 1.18.x
- name: Set up Go
uses: actions/setup-go@6edd4406fa81c3da01a34fa6f6343087c207a568
with:
go-version: 1.18
go-version: 1.19

- name: Setup ko
uses: imjasonh/setup-ko@ace48d793556083a76f1e3e6068850c1f4a369aa # v0.4
uses: imjasonh/setup-ko@ace48d793556083a76f1e3e6068850c1f4a369aa # v0.6

- name: Check out code onto GOPATH
uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c
Expand Down Expand Up @@ -98,7 +98,7 @@ jobs:
config:
logLevel: debug
vcenter:
address: https://vcsim.vmware.svc.cluster.local
address: https://vcsim.${NAMESPACE}.svc.cluster.local
username: user
password: pass
insecure: true # ignore TLS certs
Expand Down Expand Up @@ -129,19 +129,19 @@ jobs:
name: Knative Event Processor
runs-on: ubuntu-latest
env:
KNATIVE_VERSION: knative-v1.1.0 # same as VEBA BOM
KNATIVE_VERSION: knative-v1.8.3 # same as VEBA BOM
BROKER_NAMESPACE: default
BROKER_NAME: default
timeout-minutes: 15

steps:
- name: Set up Go 1.18.x
- name: Set up Go
uses: actions/setup-go@6edd4406fa81c3da01a34fa6f6343087c207a568
with:
go-version: 1.18
go-version: 1.19

- name: Setup ko
uses: imjasonh/setup-ko@ace48d793556083a76f1e3e6068850c1f4a369aa # v0.4
uses: imjasonh/setup-ko@ace48d793556083a76f1e3e6068850c1f4a369aa # v0.6

- name: Check out code onto GOPATH
uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c
Expand Down Expand Up @@ -192,7 +192,8 @@ jobs:
echo "::group::Ingress"
echo "waiting 10s before proceeding..." && sleep 10 # hack: give webhook mutating admission controllers some time to settle
kubectl apply -f https://github.com/knative/net-kourier/releases/download/${KNATIVE_VERSION}/kourier.yaml
# TODO (@embano1): hard-code version since v1.8.3 does not exist
kubectl apply -f https://github.com/knative-sandbox/net-kourier/releases/download/knative-v1.8.1/kourier.yaml
kubectl -n kourier-system wait --timeout=3m --for=condition=Available deploy/3scale-kourier-gateway
kubectl patch configmap/config-network \
--namespace knative-serving \
Expand Down
5 changes: 4 additions & 1 deletion .github/workflows/router-integration-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
integration-tests:
strategy:
matrix:
go-version: ["1.18"]
go-version: ["1.19"]
platform: ["ubuntu-latest"]

runs-on: ${{ matrix.platform }}
Expand All @@ -37,5 +37,8 @@ jobs:
- name: Check out code
uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c

- name: Install tparse
run: go install github.com/mfridman/tparse@latest

- name: Run OpenFaaS integration tests
run: hack/run_integration_tests.sh
2 changes: 1 addition & 1 deletion .github/workflows/router-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
name: lint
strategy:
matrix:
go-version: ["1.18"]
go-version: ["1.19"]
platform: ["ubuntu-latest"]

runs-on: ${{ matrix.platform }}
Expand Down
5 changes: 4 additions & 1 deletion .github/workflows/router-unit-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
name: Unit Tests
strategy:
matrix:
go-version: ["1.18"]
go-version: ["1.19"]
platform: ["ubuntu-latest"]

runs-on: ${{ matrix.platform }}
Expand All @@ -38,6 +38,9 @@ jobs:
- name: Check out code
uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c

- name: Install tparse
run: go install github.com/mfridman/tparse@latest

- name: run unit tests
run: make unit-test

Expand Down
13 changes: 8 additions & 5 deletions .github/workflows/verify-gcr-login.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,17 +11,20 @@ jobs:
name: Verify GCR Login
runs-on: ubuntu-latest
timeout-minutes: 3
env:
PROJECT_ID: ${{ secrets.GCP_PROJECT_ID }}

steps:
- name: Check out code
uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c

- name: Login to GCP
uses: google-github-actions/setup-gcloud@62d4898025f6041e16b1068643bfc5a696863587
- id: Login to GCP
uses: google-github-actions/auth@ef5d53e30bbcd8d0836f4288f5e50ff3e086997d
with:
project_id: ${{ secrets.GCP_PROJECT_ID }}
service_account_email: ${{ secrets.GCP_EMAIL }}
service_account_key: ${{ secrets.GCP_CREDENTIALS }}
credentials_json: '${{ secrets.GCP_CREDENTIALS }}'

- name: Set up gcloud
uses: google-github-actions/setup-gcloud@62d4898025f6041e16b1068643bfc5a696863587

- name: Configure Docker
run: gcloud auth configure-docker --quiet
6 changes: 3 additions & 3 deletions vmware-event-router/.golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ linters:
disable-all: true
enable:
- bodyclose
- deadcode
# - deadcode
- depguard
- dogsled
- dupl
Expand All @@ -84,13 +84,13 @@ linters:
- nolintlint
- rowserrcheck
- staticcheck
- structcheck
# - structcheck
- stylecheck
- typecheck
- unconvert
- unparam
- unused
- varcheck
# - varcheck
- whitespace

# don't enable:
Expand Down
9 changes: 6 additions & 3 deletions vmware-event-router/Makefile
Original file line number Diff line number Diff line change
@@ -1,15 +1,18 @@
TEST_TIMEOUT = 20

.DEFAULT_GOAL := help

REQUIRED_BINS := tparse
$(foreach bin,$(REQUIRED_BINS),\
$(if $(shell command -v $(bin) 2> /dev/null),,$(error Please install `$(bin)`)))

.PHONY: help
help: ## Display usage
@awk 'BEGIN {FS = ":.*##"; printf "\nUsage:\n make [target] \033[36m\033[0m\n\nTargets:\n"} /^[a-zA-Z_-]+:.*?##/ { printf " \033[36m%-20s\033[0m %s\n", $$1, $$2 }' $(MAKEFILE_LIST)


.PHONY: tidy
tidy: ## Sync and clean up Go dependencies
@go mod tidy -v
@go mod tidy -v -compat=1.17

# intended for local dev use (won't check for unclean git)
.PHONY: build
Expand All @@ -25,7 +28,7 @@ gofmt: ## Check code is gofmted
.PHONY: unit-test
unit-test: gofmt tidy ## Run unit tests
$(eval TAG=unit)
@go test -count 1 -tags=${TAG} -race -timeout $(TEST_TIMEOUT)s -cover -v ./...
@go test -count 1 -tags=${TAG} -race -timeout $(TEST_TIMEOUT)s -cover -v -json ./... | tparse -all -notests

.PHONY: integration-test
integration-test: gofmt ## Run integration tests (requires Kubernetes cluster w/ OpenFaaS or use hack/run_integration_tests.sh)
Expand Down
1 change: 0 additions & 1 deletion vmware-event-router/deploy/vcsim.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ spec:
containers:
- name: vcsim
image: vmware/vcsim:latest
args: ["/vcsim", "-l", ":8989"]
ports:
- name: https
containerPort: 8989
Expand Down

0 comments on commit 641e723

Please sign in to comment.