Skip to content

Commit

Permalink
Merge branch 'main' into renovate/configure
Browse files Browse the repository at this point in the history
  • Loading branch information
jeanduplessis authored Oct 7, 2024
2 parents fcff003 + 791f73a commit 7330b0c
Show file tree
Hide file tree
Showing 35 changed files with 680 additions and 818 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/backport.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@ on:

jobs:
backport:
uses: upbound/uptest/.github/workflows/provider-backport.yml@main
uses: upbound/official-providers-ci/.github/workflows/provider-backport.yml@standard-runners
12 changes: 9 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ on:

env:
# Common versions
GO_VERSION: '1.19'
GOLANGCI_VERSION: 'v1.50.0'
GO_VERSION: '1.21'
GOLANGCI_VERSION: 'v1.54.0'
DOCKER_BUILDX_VERSION: 'v0.8.2'

# Common users. We can't run a step 'if secrets.XXX != ""' but we can run a
Expand Down Expand Up @@ -241,7 +241,13 @@ jobs:

publish-artifacts:
runs-on: ubuntu-22.04
needs: detect-noop
needs:
- detect-noop
- report-breaking-changes
- lint
- check-diff
- unit-tests
- local-deploy
if: needs.detect-noop.outputs.noop != 'true'

steps:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/commands.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ on: issue_comment

jobs:
comment-commands:
uses: upbound/uptest/.github/workflows/provider-commands.yml@main
uses: upbound/official-providers-ci/.github/workflows/provider-commands.yml@standard-runners
2 changes: 1 addition & 1 deletion .github/workflows/e2e.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:

jobs:
e2e:
uses: upbound/uptest/.github/workflows/pr-comment-trigger.yml@main
uses: upbound/official-providers-ci/.github/workflows/pr-comment-trigger.yml@standard-runners
secrets:
UPTEST_CLOUD_CREDENTIALS: ${{ secrets.UPTEST_CLOUD_CREDENTIALS }}
UPTEST_DATASOURCE: ${{ secrets.UPTEST_DATASOURCE }}
2 changes: 1 addition & 1 deletion .github/workflows/tag.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ on:

jobs:
tag:
uses: upbound/uptest/.github/workflows/provider-tag.yml@main
uses: upbound/official-providers-ci/.github/workflows/provider-tag.yml@standard-runners
with:
version: ${{ github.event.inputs.version }}
message: ${{ github.event.inputs.message }}
2 changes: 1 addition & 1 deletion .gitmodules
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
[submodule "build"]
path = build
url = https://github.com/upbound/build
url = https://github.com/crossplane/build
34 changes: 24 additions & 10 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,15 @@
PROJECT_NAME ?= upjet-provider-template
PROJECT_REPO ?= github.com/upbound/$(PROJECT_NAME)

export TERRAFORM_VERSION ?= 1.2.1
export TERRAFORM_VERSION ?= 1.5.7

# Do not allow a version of terraform greater than 1.5.x, due to versions 1.6+ being
# licensed under BSL, which is not permitted.
TERRAFORM_VERSION_VALID := $(shell [ "$(TERRAFORM_VERSION)" = "`printf "$(TERRAFORM_VERSION)\n1.6" | sort -V | head -n1`" ] && echo 1 || echo 0)

export TERRAFORM_PROVIDER_SOURCE ?= hashicorp/null
export TERRAFORM_PROVIDER_REPO ?= https://github.com/hashicorp/terraform-provider-null
export TERRAFORM_PROVIDER_VERSION ?= 3.1.0
export TERRAFORM_PROVIDER_VERSION ?= 3.2.2
export TERRAFORM_PROVIDER_DOWNLOAD_NAME ?= terraform-provider-null
export TERRAFORM_PROVIDER_DOWNLOAD_URL_PREFIX ?= https://releases.hashicorp.com/$(TERRAFORM_PROVIDER_DOWNLOAD_NAME)/$(TERRAFORM_PROVIDER_VERSION)
export TERRAFORM_NATIVE_PROVIDER_BINARY ?= terraform-provider-null_v3.1.0_x5
Expand Down Expand Up @@ -40,8 +44,8 @@ NPROCS ?= 1
# to half the number of CPU cores.
GO_TEST_PARALLEL := $(shell echo $$(( $(NPROCS) / 2 )))

GO_REQUIRED_VERSION ?= 1.19
GOLANGCILINT_VERSION ?= 1.50.0
GO_REQUIRED_VERSION ?= 1.21
GOLANGCILINT_VERSION ?= 1.54.0
GO_STATIC_PACKAGES = $(GO_PROJECT)/cmd/provider $(GO_PROJECT)/cmd/generator
GO_LDFLAGS += -X $(GO_PROJECT)/internal/version.Version=$(VERSION)
GO_SUBDIRS += cmd internal apis
Expand All @@ -51,7 +55,7 @@ GO_SUBDIRS += cmd internal apis
# Setup Kubernetes tools

KIND_VERSION = v0.15.0
UP_VERSION = v0.18.0
UP_VERSION = v0.28.0
UP_CHANNEL = stable
UPTEST_VERSION = v0.5.0
-include build/makelib/k8s_tools.mk
Expand Down Expand Up @@ -93,15 +97,20 @@ xpkg.build.upjet-provider-template: do.build.images

# NOTE(hasheddan): we ensure up is installed prior to running platform-specific
# build steps in parallel to avoid encountering an installation race condition.
build.init: $(UP)
build.init: $(UP) check-terraform-version

# ====================================================================================
# Setup Terraform for fetching provider schema
TERRAFORM := $(TOOLS_HOST_DIR)/terraform-$(TERRAFORM_VERSION)
TERRAFORM_WORKDIR := $(WORK_DIR)/terraform
TERRAFORM_PROVIDER_SCHEMA := config/schema.json

$(TERRAFORM):
check-terraform-version:
ifneq ($(TERRAFORM_VERSION_VALID),1)
$(error invalid TERRAFORM_VERSION $(TERRAFORM_VERSION), must be less than 1.6.0 since that version introduced a not permitted BSL license))
endif

$(TERRAFORM): check-terraform-version
@$(INFO) installing terraform $(HOSTOS)-$(HOSTARCH)
@mkdir -p $(TOOLS_HOST_DIR)/tmp-terraform
@curl -fsSL https://releases.hashicorp.com/terraform/$(TERRAFORM_VERSION)/terraform_$(TERRAFORM_VERSION)_$(SAFEHOST_PLATFORM).zip -o $(TOOLS_HOST_DIR)/tmp-terraform/terraform.zip
Expand All @@ -127,7 +136,7 @@ pull-docs:

generate.init: $(TERRAFORM_PROVIDER_SCHEMA) pull-docs

.PHONY: $(TERRAFORM_PROVIDER_SCHEMA) pull-docs
.PHONY: $(TERRAFORM_PROVIDER_SCHEMA) pull-docs check-terraform-version
# ====================================================================================
# Targets

Expand Down Expand Up @@ -162,14 +171,15 @@ run: go.build

# ====================================================================================
# End to End Testing
CROSSPLANE_VERSION = 1.16.0
CROSSPLANE_NAMESPACE = upbound-system
-include build/makelib/local.xpkg.mk
-include build/makelib/controlplane.mk

# This target requires the following environment variables to be set:
# - UPTEST_EXAMPLE_LIST, a comma-separated list of examples to test
# To ensure the proper functioning of the end-to-end test resource pre-deletion hook, it is crucial to arrange your resources appropriately.
# You can check the basic implementation here: https://github.com/upbound/uptest/blob/main/internal/templates/01-delete.yaml.tmpl.
# You can check the basic implementation here: https://github.com/crossplane/uptest/blob/main/internal/templates/03-delete.yaml.tmpl.
# - UPTEST_CLOUD_CREDENTIALS (optional), multiple sets of AWS IAM User credentials specified as key=value pairs.
# The support keys are currently `DEFAULT` and `PEER`. So, an example for the value of this env. variable is:
# DEFAULT='[default]
Expand All @@ -179,7 +189,7 @@ CROSSPLANE_NAMESPACE = upbound-system
# aws_access_key_id = REDACTED
# aws_secret_access_key = REDACTED'
# The associated `ProviderConfig`s will be named as `default` and `peer`.
# - UPTEST_DATASOURCE_PATH (optional), see https://github.com/upbound/uptest#injecting-dynamic-values-and-datasource
# - UPTEST_DATASOURCE_PATH (optional), please see https://github.com/crossplane/uptest#injecting-dynamic-values-and-datasource
uptest: $(UPTEST) $(KUBECTL) $(KUTTL)
@$(INFO) running automated tests
@KUBECTL=$(KUBECTL) KUTTL=$(KUTTL) $(UPTEST) e2e "${UPTEST_EXAMPLE_LIST}" --data-source="${UPTEST_DATASOURCE_PATH}" --setup-script=cluster/test/setup.sh --default-conditions="Test" || $(FAIL)
Expand Down Expand Up @@ -242,3 +252,7 @@ crossplane.help:
help-special: crossplane.help

.PHONY: crossplane.help help-special

# TODO(negz): Update CI to use these targets.
vendor: modules.download
vendor.check: modules.check
10 changes: 10 additions & 0 deletions apis/null/v1alpha1/zz_generated.conversion_hubs.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions apis/null/v1alpha1/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 4 additions & 3 deletions apis/null/v1alpha1/zz_generated.managed.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 4 additions & 3 deletions apis/null/v1alpha1/zz_generated.managedlist.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 1 addition & 5 deletions apis/null/v1alpha1/zz_groupversion_info.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

21 changes: 13 additions & 8 deletions apis/null/v1alpha1/zz_resource_types.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions apis/v1alpha1/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions apis/v1beta1/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 4 additions & 3 deletions apis/v1beta1/zz_generated.pc.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 4 additions & 3 deletions apis/v1beta1/zz_generated.pcu.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 4 additions & 3 deletions apis/v1beta1/zz_generated.pculist.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 7330b0c

Please sign in to comment.