-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: release based on tf provider fork
* Download tf-provider from github releases * Document how to publish to different repo Signed-off-by: Dennis Kniep <[email protected]>
- Loading branch information
1 parent
b014afa
commit 58d214b
Showing
2 changed files
with
78 additions
and
5 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 |
---|---|---|
|
@@ -151,7 +151,8 @@ You can explore the available custom resources: | |
|
||
Run code-generation pipeline: | ||
```console | ||
go run cmd/generator/main.go "$PWD" | ||
go install golang.org/x/tools/cmd/goimports@latest | ||
go run cmd/generator/main.go "$(pwd)" | ||
``` | ||
|
||
Checkout sub-repositories: | ||
|
@@ -184,7 +185,62 @@ Build binary: | |
make build | ||
``` | ||
|
||
## Regression Tests | ||
### Build from custom Terraform Provider | ||
|
||
If you want to build this crossplane provider on top of a forked `terraform-provider-keycloak` follow these instructions: | ||
|
||
1. Execute code generation: | ||
``` | ||
TERRAFORM_PROVIDER_REPO=https://github.com/<owner>/terraform-provider-keycloak \ | ||
TERRAFORM_PROVIDER_VERSION=1.0.0 \ | ||
make generate | ||
``` | ||
**Hint:** `TERRAFORM_PROVIDER_VERSION` must be a Release. Releases can be found here: `https://github.com/<owner>/terraform-provider-keycloak/releases`. | ||
Every ReleaseName should have the prefix "v" (i.e 'v1.0.0'). But if you specify the `TERRAFORM_PROVIDER_VERSION` you need to | ||
skip that prefix (i.e. '1.0.0') | ||
|
||
2. Use forked repo as go dependency: | ||
``` | ||
go mod edit -replace="github.com/keycloak/[email protected]=github.com/<owner>/[email protected]" | ||
go mod tidy | ||
``` | ||
**Hint:** You can also specify the version as `github.com/<owner>/[email protected]<timestamp>-<commitHash>` | ||
|
||
### Build and publish to custom repo | ||
|
||
Install up cli: https://docs.upbound.io/reference/cli/ | ||
|
||
Git tag with the version that should be published: | ||
```console | ||
git tag v<VersionNumber> | ||
``` | ||
|
||
Create a release branch with git: | ||
```console | ||
git checkout -b release-v<VersionNumber> | ||
``` | ||
|
||
Ensure that you ran `make generate` and `make build` | ||
|
||
**Hint:** If you want to build a specific platform you can do this with: | ||
```console | ||
PLATFORMS=linux_amd64 make build | ||
``` | ||
|
||
Login | ||
```console | ||
up login -t <TOKEN> | ||
``` | ||
|
||
Publish | ||
```console | ||
PLATFORMS=linux_amd64 \ | ||
XPKG_REG_ORGS=xpkg.upbound.io/<owner> \ | ||
XPKG_REG_ORGS_NO_PROMOTE=xpkg.upbound.io/<owner> \ | ||
make publish | ||
``` | ||
|
||
## Regression Tests | ||
TODO: Add regression test docs | ||
|
||
## Report a Bug | ||
|