Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(deps): update build/, up, and terraform versions #51

Merged
merged 2 commits into from
Jul 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ jobs:
restore-keys: ${{ runner.os }}-pkg-

- name: Vendor Dependencies
run: make vendor vendor.check
run: make go.vendor go.vendor.check

# We could run 'make lint' but we prefer this action because it leaves
# 'annotations' (i.e. it comments on PRs to point out linter violations).
Expand Down Expand Up @@ -118,7 +118,7 @@ jobs:
restore-keys: ${{ runner.os }}-pkg-

- name: Vendor Dependencies
run: make vendor vendor.check
run: make go.vendor go.vendor.check

- name: Check Diff
run: make check-diff
Expand Down Expand Up @@ -161,7 +161,7 @@ jobs:
restore-keys: ${{ runner.os }}-pkg-

- name: Vendor Dependencies
run: make vendor vendor.check
run: make go.vendor go.vendor.check

- name: Run Unit Tests
run: make -j2 test
Expand Down Expand Up @@ -222,7 +222,7 @@ jobs:
${{ runner.os }}-pkg-

- name: Vendor Dependencies
run: make vendor vendor.check
run: make go.vendor go.vendor.check

- name: Build Helm Chart
run: make -j2 build
Expand Down Expand Up @@ -283,7 +283,7 @@ jobs:
restore-keys: ${{ runner.os }}-pkg-

- name: Vendor Dependencies
run: make vendor vendor.check
run: make go.vendor go.vendor.check

- name: Build Artifacts
run: make -j2 build.all
Expand Down
24 changes: 13 additions & 11 deletions .golangci.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
run:
deadline: 10m

skip-files:
- "zz_\\..+\\.go$"
deadline: 20m

output:
# colored-line-number|line-number|json|tab|checkstyle|code-climate, default is "colored-line-number"
format: colored-line-number
formats:
- format: colored-line-number
path: stdout

linters-settings:
errcheck:
Expand All @@ -27,9 +26,9 @@ linters-settings:
# report about shadowed variables
check-shadowing: false

golint:
# minimal confidence for issues, default is 0.8
min-confidence: 0.8
revive:
# confidence for issues, default is 0.8
confidence: 0.8

gofmt:
# simplify code: gofmt with `-s` option, true by default
Expand All @@ -42,7 +41,7 @@ linters-settings:

gocyclo:
# minimal code complexity to report, 30 by default (but we recommend 10-20)
min-complexity: 10
min-complexity: 20

maligned:
# print struct with more effective memory layout or not, false by default
Expand Down Expand Up @@ -108,12 +107,11 @@ linters:
- govet
- gocyclo
- gocritic
- interfacer
- goconst
- goimports
- gofmt # We enable this as well as goimports for its simplify mode.
- prealloc
- golint
- revive
- unconvert
- misspell
- nakedret
Expand All @@ -125,6 +123,10 @@ linters:


issues:
# Exclude generated files
exclude-files:
- "zz_\\..+\\.go$"

# Excluding configuration per-path and per-linter
exclude-rules:
# Exclude some linters from running on tests files.
Expand Down
9 changes: 4 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ PROJECT_REPO := github.com/crossplane-contrib/$(PROJECT_NAME)
GO_REQUIRED_VERSION ?= 1.19
GOLANGCILINT_VERSION ?= 1.57.2

export TERRAFORM_VERSION := 1.3.1
export TERRAFORM_VERSION := 1.5.5

export TERRAFORM_PROVIDER_SOURCE := equinix/equinix
export TERRAFORM_PROVIDER_VERSION := 1.36.0
Expand Down Expand Up @@ -52,7 +52,7 @@ GO111MODULE = on
# ====================================================================================
# Setup Kubernetes tools

UP_VERSION = v0.13.0
UP_VERSION = v0.28.0
UP_CHANNEL = stable
-include build/makelib/k8s_tools.mk

Expand All @@ -69,7 +69,7 @@ XPKG_REG_ORGS ?= xpkg.upbound.io/equinix index.docker.io/crossplane
# NOTE(hasheddan): skip promoting on xpkg.upbound.io as channel tags are
# inferred.
XPKG_REG_ORGS_NO_PROMOTE ?= xpkg.upbound.io/equinix
XPKGS = provider-jet-equinix
XPKGS = $(PROJECT_NAME)
-include build/makelib/xpkg.mk

# NOTE(hasheddan): we force image building to happen prior to xpkg build so that
Expand Down Expand Up @@ -109,7 +109,7 @@ $(TERRAFORM_PROVIDER_SCHEMA): $(TERRAFORM)
@$(INFO) generating provider schema for $(TERRAFORM_PROVIDER_SOURCE) $(TERRAFORM_PROVIDER_VERSION)
@mkdir -p $(TERRAFORM_WORKDIR)
@echo '{"terraform":[{"required_providers":[{"provider":{"source":"'"$(TERRAFORM_PROVIDER_SOURCE)"'","version":"'"$(TERRAFORM_PROVIDER_VERSION)"'"}}],"required_version":"'"$(TERRAFORM_VERSION)"'"}]}' > $(TERRAFORM_WORKDIR)/main.tf.json
@$(TERRAFORM) -chdir=$(TERRAFORM_WORKDIR) init > $(TERRAFORM_WORKDIR)/terraform-logs.txt 2>&1
@$(TERRAFORM) -chdir=$(TERRAFORM_WORKDIR) init -upgrade > $(TERRAFORM_WORKDIR)/terraform-logs.txt 2>&1
@$(TERRAFORM) -chdir=$(TERRAFORM_WORKDIR) providers schema -json=true > $(TERRAFORM_PROVIDER_SCHEMA) 2>> $(TERRAFORM_WORKDIR)/terraform-logs.txt
@$(OK) generating provider schema for $(TERRAFORM_PROVIDER_SOURCE) $(TERRAFORM_PROVIDER_VERSION)

Expand All @@ -124,7 +124,6 @@ pull-docs:
@rm -f "$(WORK_DIR)/$(TERRAFORM_PROVIDER_SOURCE)/$(TERRAFORM_DOCS_PATH)/equinix_metal_port_vlan_attachment.md" \
"$(WORK_DIR)/$(TERRAFORM_PROVIDER_SOURCE)/$(TERRAFORM_DOCS_PATH)/equinix_fabric_routing_protocol.md"

generate.init: $(TERRAFORM_PROVIDER_SCHEMA) pull-docs

generate.init: $(TERRAFORM_PROVIDER_SCHEMA) pull-docs

Expand Down
Loading