Skip to content

Commit

Permalink
Add GitHubEnterprise multi VCS
Browse files Browse the repository at this point in the history
Signed-off-by: peterdeme <[email protected]>
  • Loading branch information
peterdeme committed Nov 17, 2023
1 parent 4961bcb commit 5eeba13
Show file tree
Hide file tree
Showing 31 changed files with 515 additions and 421 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/analysis-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,13 @@ jobs:
- name: Install Go
uses: actions/setup-go@v4
with:
go-version: "1.19"
go-version: "1.21"

- name: Check formatting using gofmt
run: gofmt -s -l -d .

- name: Run golangci-lint
uses: golangci/golangci-lint-action@v3
with:
version: v1.54
args: -v
uses: reviewdog/action-golangci-lint@v2
env:
REVIEWDOG_GITHUB_API_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with: { reporter: github-pr-review }
2 changes: 1 addition & 1 deletion .github/workflows/check-documentation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
- name: Install Go
uses: actions/setup-go@v4
with:
go-version: "1.19"
go-version: "1.21"

- name: Generate documentation
run: cd tools && go generate ./...
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:

- name: Set up Go
uses: actions/setup-go@v4
with: { go-version: 1.19 }
with: { go-version: 1.21 }

- name: Import GPG key
uses: crazy-max/ghaction-import-gpg@v5
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test-prod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
- name: Install Go
uses: actions/setup-go@v4
with:
go-version: "1.19"
go-version: "1.21"

- name: Install Terraform
uses: hashicorp/setup-terraform@v2
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
- name: Install Go
uses: actions/setup-go@v4
with:
go-version: "1.19"
go-version: "1.21"

- name: Install Terraform
uses: hashicorp/setup-terraform@v2
Expand Down
2 changes: 1 addition & 1 deletion .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ linters:
- ineffassign
- nolintlint
- staticcheck
- structcheck
- unused
- typecheck

severity:
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ If you want to build from source, you can simply use `go build` in the root of t

To develop the provider locally you need the following tools:

- [Go 1.19](https://go.dev/doc/install).
- [Go 1.21](https://go.dev/doc/install).
- [GoReleaser](https://goreleaser.com/).
- A Spacelift account to use for testing.

Expand Down
10 changes: 9 additions & 1 deletion docs/data-sources/github_enterprise_integration.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,17 @@ data "spacelift_github_enterprise_integration" "github_enterprise_integration" {
<!-- schema generated by tfplugindocs -->
## Schema

### Optional

- `id` (String) Github integration id. If not provided, the default integration will be returned

### Read-Only

- `api_host` (String) Github integration api host
- `app_id` (String) Github integration app id
- `id` (String) The ID of this resource.
- `description` (String) Github integration description
- `is_default` (Boolean) Github integration is default
- `labels` (List of String) Github integration labels
- `name` (String) Github integration name
- `space_id` (String) Github integration space id
- `webhook_secret` (String) Github integration webhook secret
6 changes: 6 additions & 0 deletions docs/data-sources/module.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,13 @@ Read-Only:

Read-Only:

- `description` (String)
- `id` (String)
- `is_default` (Boolean)
- `labels` (Set of String)
- `name` (String)
- `namespace` (String)
- `space_id` (String)


<a id="nestedatt--gitlab"></a>
Expand Down
6 changes: 6 additions & 0 deletions docs/data-sources/stack.md
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,13 @@ Read-Only:

Read-Only:

- `description` (String)
- `id` (String)
- `is_default` (Boolean)
- `labels` (Set of String)
- `name` (String)
- `namespace` (String)
- `space_id` (String)


<a id="nestedatt--gitlab"></a>
Expand Down
6 changes: 6 additions & 0 deletions docs/data-sources/stacks.md
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,13 @@ Read-Only:

Read-Only:

- `description` (String)
- `id` (String)
- `is_default` (Boolean)
- `labels` (Set of String)
- `name` (String)
- `namespace` (String)
- `space_id` (String)


<a id="nestedobjatt--stacks--gitlab"></a>
Expand Down
4 changes: 4 additions & 0 deletions docs/resources/module.md
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,10 @@ Required:

- `namespace` (String) The GitHub organization / user the repository belongs to

Optional:

- `id` (String) The ID of the GitHub Enterprise integration. If not specified, the default integration will be used.


<a id="nestedblock--gitlab"></a>
### Nested Schema for `gitlab`
Expand Down
4 changes: 4 additions & 0 deletions docs/resources/stack.md
Original file line number Diff line number Diff line change
Expand Up @@ -292,6 +292,10 @@ Required:

- `namespace` (String) The GitHub organization / user the repository belongs to

Optional:

- `id` (String) The ID of the GitHub Enterprise integration. If not specified, the default integration will be used.


<a id="nestedblock--gitlab"></a>
### Nested Schema for `gitlab`
Expand Down
74 changes: 35 additions & 39 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,69 +1,65 @@
module github.com/spacelift-io/terraform-provider-spacelift

go 1.19
go 1.21

require (
github.com/dgrijalva/jwt-go/v4 v4.0.0-preview1
github.com/hashicorp/go-cty v1.4.1-0.20200414143053-d3edf31b6320
github.com/hashicorp/go-retryablehttp v0.7.0
github.com/hashicorp/terraform-plugin-sdk/v2 v2.16.0
github.com/hashicorp/go-retryablehttp v0.7.4
github.com/hashicorp/terraform-plugin-sdk/v2 v2.29.0
github.com/pkg/errors v0.9.1
github.com/shurcooL/graphql v0.0.0-20200928012149-18c5c3165e3a
golang.org/x/exp v0.0.0-20221230185412-738e83a70c30
golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d
golang.org/x/time v0.0.0-20210723032227-1f47c861a9ac
golang.org/x/oauth2 v0.13.0
golang.org/x/time v0.3.0
)

require (
github.com/ProtonMail/go-crypto v0.0.0-20230717121422-5aa5874ade95 // indirect
github.com/agext/levenshtein v1.2.2 // indirect
github.com/apparentlymart/go-cidr v1.1.0 // indirect
github.com/apparentlymart/go-textseg/v13 v13.0.0 // indirect
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/apparentlymart/go-textseg/v15 v15.0.0 // indirect
github.com/cloudflare/circl v1.3.3 // indirect
github.com/fatih/color v1.13.0 // indirect
github.com/golang/protobuf v1.5.2 // indirect
github.com/golang/protobuf v1.5.3 // indirect
github.com/google/go-cmp v0.5.9 // indirect
github.com/hashicorp/errwrap v1.1.0 // indirect
github.com/hashicorp/errwrap v1.0.0 // indirect
github.com/hashicorp/go-checkpoint v0.5.0 // indirect
github.com/hashicorp/go-cleanhttp v0.5.2 // indirect
github.com/hashicorp/go-hclog v1.2.0 // indirect
github.com/hashicorp/go-hclog v1.5.0 // indirect
github.com/hashicorp/go-multierror v1.1.1 // indirect
github.com/hashicorp/go-plugin v1.4.3 // indirect
github.com/hashicorp/go-plugin v1.5.1 // indirect
github.com/hashicorp/go-uuid v1.0.3 // indirect
github.com/hashicorp/go-version v1.6.0 // indirect
github.com/hashicorp/hc-install v0.5.0 // indirect
github.com/hashicorp/hcl/v2 v2.12.0 // indirect
github.com/hashicorp/hc-install v0.6.0 // indirect
github.com/hashicorp/hcl/v2 v2.18.0 // indirect
github.com/hashicorp/logutils v1.0.0 // indirect
github.com/hashicorp/terraform-exec v0.18.1 // indirect
github.com/hashicorp/terraform-json v0.15.0 // indirect
github.com/hashicorp/terraform-plugin-go v0.9.0 // indirect
github.com/hashicorp/terraform-plugin-log v0.4.0 // indirect
github.com/hashicorp/terraform-registry-address v0.0.0-20210412075316-9b2996cce896 // indirect
github.com/hashicorp/terraform-svchost v0.0.0-20200729002733-f050f53b9734 // indirect
github.com/hashicorp/terraform-exec v0.19.0 // indirect
github.com/hashicorp/terraform-json v0.17.1 // indirect
github.com/hashicorp/terraform-plugin-go v0.19.0 // indirect
github.com/hashicorp/terraform-plugin-log v0.9.0 // indirect
github.com/hashicorp/terraform-registry-address v0.2.2 // indirect
github.com/hashicorp/terraform-svchost v0.1.1 // indirect
github.com/hashicorp/yamux v0.0.0-20181012175058-2f1d1f20f75d // indirect
github.com/imdario/mergo v0.3.13 // indirect
github.com/kr/pretty v0.3.0 // indirect
github.com/mattn/go-colorable v0.1.13 // indirect
github.com/mattn/go-isatty v0.0.16 // indirect
github.com/mattn/go-colorable v0.1.12 // indirect
github.com/mattn/go-isatty v0.0.14 // indirect
github.com/mitchellh/copystructure v1.2.0 // indirect
github.com/mitchellh/go-testing-interface v1.14.1 // indirect
github.com/mitchellh/go-wordwrap v1.0.0 // indirect
github.com/mitchellh/mapstructure v1.5.0 // indirect
github.com/mitchellh/reflectwalk v1.0.2 // indirect
github.com/oklog/run v1.0.0 // indirect
github.com/vmihailenco/msgpack v4.0.4+incompatible // indirect
github.com/vmihailenco/msgpack/v4 v4.3.12 // indirect
github.com/vmihailenco/tagparser v0.1.1 // indirect
github.com/zclconf/go-cty v1.13.0 // indirect
golang.org/x/crypto v0.5.0 // indirect
golang.org/x/mod v0.8.0 // indirect
golang.org/x/net v0.8.0 // indirect
golang.org/x/sys v0.6.0 // indirect
golang.org/x/text v0.8.0 // indirect
google.golang.org/appengine v1.6.6 // indirect
google.golang.org/genproto v0.0.0-20200711021454-869866162049 // indirect
google.golang.org/grpc v1.45.0 // indirect
google.golang.org/protobuf v1.28.0 // indirect
gopkg.in/yaml.v3 v3.0.0 // indirect
github.com/vmihailenco/msgpack/v5 v5.3.5 // indirect
github.com/vmihailenco/tagparser/v2 v2.0.0 // indirect
github.com/zclconf/go-cty v1.14.0 // indirect
golang.org/x/crypto v0.14.0 // indirect
golang.org/x/mod v0.12.0 // indirect
golang.org/x/net v0.16.0 // indirect
golang.org/x/sys v0.13.0 // indirect
golang.org/x/text v0.13.0 // indirect
google.golang.org/appengine v1.6.7 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20230525234030-28d5490b6b19 // indirect
google.golang.org/grpc v1.57.0 // indirect
google.golang.org/protobuf v1.31.0 // indirect
)

replace github.com/shurcooL/graphql => github.com/spacelift-io/graphql v1.1.0
replace github.com/shurcooL/graphql => github.com/spacelift-io/graphql v1.2.0
Loading

0 comments on commit 5eeba13

Please sign in to comment.