-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #153 from salasberryfin/downgrade-wrangler-version
chore: downgrade wrangler version
- Loading branch information
Showing
13 changed files
with
299 additions
and
15 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
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,26 @@ | ||
# Please see the documentation for all configuration options: | ||
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates | ||
version: 2 | ||
updates: | ||
# GitHub Actions | ||
- package-ecosystem: "github-actions" | ||
directory: "/" | ||
schedule: | ||
interval: "weekly" | ||
commit-message: | ||
prefix: ":seedling:" | ||
# Go | ||
- package-ecosystem: "gomod" | ||
directory: "/" | ||
schedule: | ||
interval: "weekly" | ||
ignore: | ||
# Ignore controller-runtime as its upgraded manually. | ||
- dependency-name: "sigs.k8s.io/controller-runtime" | ||
# Ignore k8s and its transitives modules as they are upgraded manually | ||
# together with controller-runtime. | ||
- dependency-name: "k8s.io/*" | ||
# Ignore wrangler | ||
- dependency-name: "github.com/rancher/wrangler" | ||
commit-message: | ||
prefix: ":seedling:" |
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,14 @@ | ||
name: Go API Diff | ||
on: | ||
pull_request: | ||
jobs: | ||
go-apidiff: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
- uses: actions/setup-go@v4 | ||
with: | ||
go-version: 1.19 | ||
- uses: joelanford/go-apidiff@main |
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,27 @@ | ||
name: Build | ||
on: | ||
pull_request: | ||
push: | ||
branches: | ||
- master | ||
- rancher/v2.6 | ||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v3 | ||
- name: Install Go | ||
uses: actions/setup-go@v4 | ||
with: | ||
go-version: 1.19.x | ||
- uses: actions/[email protected] | ||
with: | ||
path: | | ||
~/go/pkg/mod | ||
~/.cache/go-build | ||
key: ${{ runner.os }}-build-go-${{ hashFiles('**/go.sum') }} | ||
restore-keys: | | ||
${{ runner.os }}-build-go-${{ hashFiles('**/go.sum') }} | ||
- name: Build GKE operator binary | ||
run: make operator |
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,23 @@ | ||
name: Lint | ||
on: | ||
pull_request: | ||
push: | ||
branches: | ||
- master | ||
- rancher/v2.6 | ||
tags: | ||
- 'v*' | ||
jobs: | ||
lint: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v3 | ||
- name: Install Go | ||
uses: actions/setup-go@v4 | ||
with: | ||
go-version: 1.19.x | ||
- name: Analysis | ||
uses: golangci/golangci-lint-action@v3 | ||
with: | ||
args: -v |
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,31 @@ | ||
name: Nightly | ||
on: | ||
schedule: | ||
- cron: '0 1 * * *' | ||
jobs: | ||
nightly: | ||
env: | ||
REPO: ttl.sh/gke-operator-nightly | ||
TAG: 1d | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
- name: Build binary | ||
run: make build | ||
- name: Set current date as env variable | ||
run: echo "NOW=$(date +'%Y%m%d')" >> $GITHUB_ENV | ||
- name: Set up Docker Buildx | ||
id: buildx | ||
uses: docker/[email protected] | ||
- name: Build and push image | ||
uses: docker/[email protected] | ||
with: | ||
context: . | ||
tags: ${{ env.REPO}}-${{ env.NOW }}:${{ env.TAG }} | ||
push: true | ||
cache-from: type=gha | ||
cache-to: type=gha,mode=max | ||
file: package/Dockerfile |
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,38 @@ | ||
name: Scan | ||
on: | ||
pull_request: | ||
push: | ||
branches: | ||
- master | ||
- rancher/v2.6 | ||
tags: | ||
- "v*" | ||
jobs: | ||
scan: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
- name: Build binary | ||
run: make build | ||
- name: Set up Docker Buildx | ||
id: buildx | ||
uses: docker/[email protected] | ||
- name: Build image | ||
uses: docker/[email protected] | ||
with: | ||
context: . | ||
tags: ghcr.io/rancher/gke-operator:${{ github.sha }} | ||
load: true | ||
push: false | ||
file: package/Dockerfile | ||
- name: Run Trivy vulnerability scanner | ||
uses: aquasecurity/trivy-action@master | ||
with: | ||
image-ref: "ghcr.io/rancher/gke-operator:${{ github.sha }}" | ||
format: "table" | ||
exit-code: "1" | ||
ignore-unfixed: true | ||
severity: "CRITICAL,HIGH" |
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,27 @@ | ||
name: Verify | ||
on: | ||
pull_request: | ||
push: | ||
branches: | ||
- master | ||
- rancher/v2.6 | ||
jobs: | ||
test: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Install Go | ||
uses: actions/setup-go@v4 | ||
with: | ||
go-version: 1.19.x | ||
- uses: actions/[email protected] | ||
with: | ||
path: | | ||
~/go/pkg/mod | ||
~/.cache/go-build | ||
key: ${{ runner.os }}-test-go-${{ hashFiles('**/go.sum') }} | ||
restore-keys: | | ||
${{ runner.os }}-test-go-${{ hashFiles('**/go.sum') }} | ||
- name: Run make verify | ||
run: | | ||
make verify |
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,16 +1,66 @@ | ||
TARGETS := $(shell ls scripts) | ||
|
||
ROOT_DIR:=$(shell dirname $(realpath $(firstword $(MAKEFILE_LIST)))) | ||
BIN_DIR := $(abspath $(ROOT_DIR)/bin) | ||
GO_INSTALL = ./scripts/go_install.sh | ||
|
||
MOCKGEN_VER := v1.6.0 | ||
MOCKGEN_BIN := mockgen | ||
MOCKGEN := $(BIN_DIR)/$(MOCKGEN_BIN)-$(MOCKGEN_VER) | ||
MOCKGEN_PKG := github.com/golang/mock/mockgen | ||
|
||
GO_APIDIFF_VER := v0.6.0 | ||
GO_APIDIFF_BIN := go-apidiff | ||
GO_APIDIFF := $(BIN_DIR)/$(GO_APIDIFF_BIN)-$(GO_APIDIFF_VER) | ||
GO_APIDIFF_PKG := github.com/joelanford/go-apidiff | ||
|
||
|
||
$(MOCKGEN): | ||
GOBIN=$(BIN_DIR) $(GO_INSTALL) $(MOCKGEN_PKG) $(MOCKGEN_BIN) $(MOCKGEN_VER) | ||
|
||
$(GO_APIDIFF): | ||
GOBIN=$(BIN_DIR) $(GO_INSTALL) $(GO_APIDIFF_PKG) $(GO_APIDIFF_BIN) $(GO_APIDIFF_VER) | ||
|
||
.dapper: | ||
@echo Downloading dapper | ||
@curl -sL https://releases.rancher.com/dapper/latest/dapper-`uname -s`-`uname -m` > .dapper.tmp | ||
@@chmod +x .dapper.tmp | ||
@./.dapper.tmp -v | ||
@mv .dapper.tmp .dapper | ||
|
||
.PHONY: $(TARGETS) | ||
$(TARGETS): .dapper | ||
./.dapper $@ | ||
|
||
clean: | ||
rm -rf build bin dist | ||
.PHONY: generate-go | ||
generate-go: $(MOCKGEN) | ||
go generate ./pkg/gke/... | ||
|
||
.PHONY: $(TARGETS) | ||
.PHONY: generate-crd | ||
generate-crd: $(MOCKGEN) | ||
go generate main.go | ||
|
||
.PHONY: generate | ||
generate: | ||
$(MAKE) generate-go | ||
$(MAKE) generate-crd | ||
|
||
.PHONY: operator | ||
operator: | ||
go build -o bin/gke-operator main.go | ||
|
||
ALL_VERIFY_CHECKS = generate | ||
|
||
.PHONY: verify | ||
verify: $(addprefix verify-,$(ALL_VERIFY_CHECKS)) | ||
|
||
.PHONY: verify-generate | ||
verify-generate: generate | ||
@if !(git diff --quiet HEAD); then \ | ||
git diff; \ | ||
echo "generated files are out of date, run make generate"; exit 1; \ | ||
fi | ||
|
||
.PHONY: clean | ||
clean: | ||
rm -rf build bin dist |
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
Oops, something went wrong.