Skip to content
This repository has been archived by the owner on Aug 1, 2023. It is now read-only.

Include .github CI/CD configuration #3

Closed
displague opened this issue Nov 17, 2021 · 2 comments · Fixed by #9
Closed

Include .github CI/CD configuration #3

displague opened this issue Nov 17, 2021 · 2 comments · Fixed by #9
Assignees

Comments

@displague
Copy link

displague commented Nov 17, 2021

The first thing users will want to do with their new provider is open PRs (make reviewable?) and publish the images to the Upbound registry or others.

Make it easy to get started by wiring up common settings. The Terrajet guide should include any search/replace needed to get .github updated for their environment.

@displague
Copy link
Author

displague commented Nov 18, 2021

I copied the provider-tf-aws .github folder into my project and needed some additional changes. crossplane-contrib/provider-tf-equinix-metal#1

I ran into problems with a deprecated resource in my TF provider and needed to Skip it. Before I skipped it, the make generate, reviewable, and check-diff commands resulted in differing changes.

Once published, I ran into another set of problems. The TERRAFORM_PROVIDER_VERSION and TERRAFORM_PROVIDER_SOURCE variables did not make it to the deployment.

I attempted to add these via a ControllerConfig after the install, but the environment variables were not picked up and I needed to add the argument equivalents.

@displague
Copy link
Author

If goimports is not preinstalled (typical in CI/CD), the build will fail:

$ make generate
21:33:26 [ .. ] verify dependencies have expected content
all modules verified
21:33:28 [ OK ] go modules dependencies verified
21:33:28 [ .. ] go generate darwin_amd64
Skipping resource metal_volume_attachment because it is in SkipList
Skipping resource metal_volume because it is in SkipList
panic: cannot run goimports for apis folder: bash: goimports: command not found
: exit status 127

goroutine 1 [running]:
github.com/crossplane-contrib/terrajet/pkg/pipeline.Run(0xc0001a4180, {0xc000b021c0, 0x2c})
        /Users/marques/src/provider-tf-equinix-metal/.work/pkg/pkg/mod/github.com/crossplane-contrib/terrajet@v0.1.1-0.20211118151921-cbab50fcd600/pkg/pipeline/run.go:108 +0xa79
main.main()
        /Users/marques/src/provider-tf-equinix-metal/cmd/generator/main.go:41 +0x6d
exit status 2
apis/generate.go:32: running "go": exit status 1
generate: open /Users/marques/src/provider-tf-equinix-metal/apis/bgp/v1alpha1/zz_generated.deepcopy.go: no such file or directory
21:33:37 [FAIL]
make[1]: *** [go.generate] Error 1
make: *** [generate] Error 2

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants