Skip to content

Commit

Permalink
GHE/Azure/Gitlab multi VCS (#477)
Browse files Browse the repository at this point in the history
  • Loading branch information
peterdeme committed Jan 10, 2024
1 parent 4d3a072 commit 56187da
Show file tree
Hide file tree
Showing 37 changed files with 1,114 additions and 482 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
6 changes: 5 additions & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@ name: Test

on: [push]

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true

jobs:
deployment:
name: Test the code
Expand All @@ -14,7 +18,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
11 changes: 10 additions & 1 deletion docs/data-sources/azure_devops_integration.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,17 @@ data "spacelift_azure_devops_integration" "azure_devops_integration" {}
<!-- schema generated by tfplugindocs -->
## Schema

### Optional

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

### Read-Only

- `id` (String) The ID of this resource.
- `description` (String) Azure DevOps integration description
- `is_default` (Boolean) Azure DevOps integration is default
- `labels` (List of String) Azure DevOps integration labels
- `name` (String) Azure DevOps integration name
- `organization_url` (String) Azure DevOps integration organization url
- `space_id` (String) Azure DevOps integration space id
- `webhook_password` (String) Azure DevOps integration webhook password
- `webhook_url` (String) Azure DevOps integration webhook url
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
11 changes: 10 additions & 1 deletion docs/data-sources/gitlab_integration.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,17 @@ data "spacelift_gitlab_integration" "gitlab_integration" {}
<!-- schema generated by tfplugindocs -->
## Schema

### Optional

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

### Read-Only

- `api_host` (String) Gitlab integration api host
- `id` (String) The ID of this resource.
- `description` (String) Gitlab integration description
- `is_default` (Boolean) Gitlab integration is default
- `labels` (List of String) Gitlab integration labels
- `name` (String) Gitlab integration name
- `space_id` (String) Gitlab integration space id
- `webhook_secret` (String) Gitlab integration webhook secret
- `webhook_url` (String) Gitlab integration webhook url
18 changes: 18 additions & 0 deletions docs/data-sources/module.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,13 @@ data "spacelift_module" "k8s-module" {

Read-Only:

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


<a id="nestedatt--bitbucket_cloud"></a>
Expand All @@ -78,12 +84,24 @@ 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>
### Nested Schema for `gitlab`

Read-Only:

- `description` (String)
- `id` (String)
- `is_default` (Boolean)
- `labels` (Set of String)
- `name` (String)
- `namespace` (String)
- `space_id` (String)
18 changes: 18 additions & 0 deletions docs/data-sources/stack.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,13 @@ Read-Only:

Read-Only:

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


<a id="nestedatt--bitbucket_cloud"></a>
Expand Down Expand Up @@ -124,15 +130,27 @@ 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>
### Nested Schema for `gitlab`

Read-Only:

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


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

Read-Only:

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


<a id="nestedobjatt--stacks--bitbucket_cloud"></a>
Expand Down Expand Up @@ -221,15 +227,27 @@ 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>
### Nested Schema for `stacks.gitlab`

Read-Only:

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


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

- `project` (String) The name of the Azure DevOps project

Optional:

- `id` (String) ID of the Azure Devops integration. If not specified, the default integration will be used.

Read-Only:

- `description` (String) Description of the Azure Devops integration
- `is_default` (Boolean) Indicates whether this is the default Azure Devops integration
- `labels` (Set of String) Labels of the Azure Devops integration
- `name` (String) Name of the Azure Devops integration
- `space_id` (String) ID (slug) of the space the Azure Devops integration is in


<a id="nestedblock--bitbucket_cloud"></a>
### Nested Schema for `bitbucket_cloud`
Expand All @@ -97,6 +109,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 All @@ -105,6 +121,18 @@ Required:

- `namespace` (String) The GitLab namespace containing the repository

Optional:

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

Read-Only:

- `description` (String) Description of the Gitlab integration
- `is_default` (Boolean) Indicates whether this is the default Gitlab integration
- `labels` (Set of String) Labels of the Gitlab integration
- `name` (String) Name of the Gitlab integration
- `space_id` (String) ID (slug) of the space the Gitlab integration is in

## Import

Import is supported using the following syntax:
Expand Down
12 changes: 12 additions & 0 deletions docs/resources/stack.md
Original file line number Diff line number Diff line change
Expand Up @@ -258,6 +258,10 @@ Required:

- `project` (String) The name of the Azure DevOps project

Optional:

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


<a id="nestedblock--bitbucket_cloud"></a>
### Nested Schema for `bitbucket_cloud`
Expand Down Expand Up @@ -293,6 +297,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 All @@ -301,6 +309,10 @@ Required:

- `namespace` (String) The GitLab namespace containing the repository

Optional:

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


<a id="nestedblock--kubernetes"></a>
### Nested Schema for `kubernetes`
Expand Down
Loading

0 comments on commit 56187da

Please sign in to comment.