forked from crossplane-contrib/provider-keycloak
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Dennis Kniep <[email protected]>
- Loading branch information
1 parent
ca420d2
commit 2b10d82
Showing
1 changed file
with
36 additions
and
1 deletion.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -185,7 +185,42 @@ Build binary: | |
make build | ||
``` | ||
|
||
## Regression Tests | ||
### 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>` | ||
|
||
3. Build and publish to custom repo | ||
|
||
If you want to build and publish with CI, then add following to [GithubRepo > Settings > Secrets and variables > Actions](https://github.com/denniskniep/provider-keycloak/settings/secrets/actions) | ||
|
||
Variables > Repository variables | ||
* TERRAFORM_PROVIDER_REPO=https://github.com/<owner>/terraform-provider-keycloak | ||
* TERRAFORM_PROVIDER_VERSION=1.0.0 | ||
* UPBOUND_MARKETPLACE_PUSH_ROBOT_USR=<user> | ||
* XPKG_REG_ORGS=xpkg.upbound.io/<repo> | ||
* XPKG_REG_ORGS_NO_PROMOTE=xpkg.upbound.io/<repo> | ||
|
||
Secrets > Repository secrets | ||
* UPBOUND_MARKETPLACE_PUSH_ROBOT_PSW=<password> | ||
|
||
## Regression Tests | ||
TODO: Add regression test docs | ||
|
||
## Report a Bug | ||
|