-
Notifications
You must be signed in to change notification settings - Fork 227
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into jorlando/add-mobile-app-oncall-integration-t…
…emplates
- Loading branch information
Showing
206 changed files
with
7,411 additions
and
1,537 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,22 +16,24 @@ jobs: | |
integration: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-go@v5 | ||
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 | ||
- uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2 | ||
with: | ||
go-version: '1.21' | ||
- uses: hashicorp/setup-terraform@v3 | ||
go-version-file: go.mod | ||
- uses: hashicorp/setup-terraform@b9cd54a3c349d3f38e8881555d616ced269862dd # v3.1.2 | ||
- run: make integration-test | ||
|
||
cloudinstance: | ||
concurrency: cloud-instance | ||
concurrency: | ||
group: cloud-instance | ||
cancel-in-progress: false | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-go@v5 | ||
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 | ||
- uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2 | ||
with: | ||
go-version: '1.21' | ||
- uses: hashicorp/setup-terraform@v3 | ||
go-version-file: go.mod | ||
- uses: hashicorp/setup-terraform@b9cd54a3c349d3f38e8881555d616ced269862dd # v3.1.2 | ||
- name: Get Secrets | ||
uses: grafana/shared-workflows/actions/get-vault-secrets@main | ||
with: | ||
|
@@ -41,12 +43,16 @@ jobs: | |
GRAFANA_SM_ACCESS_TOKEN=cloud-instance-tests:sm-token | ||
GRAFANA_SM_URL=cloud-instance-tests:sm-url | ||
GRAFANA_URL=cloud-instance-tests:url | ||
- uses: iFaxity/[email protected] | ||
- uses: iFaxity/wait-on-action@a7d13170ec542bdca4ef8ac4b15e9c6aa00a6866 # v1.2.1 | ||
with: | ||
resource: ${{ env.GRAFANA_URL }} | ||
interval: 2000 # 2s | ||
timeout: 30000 # 30s | ||
- run: make testacc-cloud-instance | ||
- uses: nick-fields/retry@7152eba30c6575329ac0576536151aca5a72780e # v3.0.0 | ||
with: | ||
timeout_minutes: 30 | ||
max_attempts: 3 # Try 3 times to make sure we don't report failures on flaky tests | ||
command: make testacc-cloud-instance | ||
|
||
local: | ||
strategy: | ||
|
@@ -55,7 +61,7 @@ jobs: | |
# OSS tests, run on all versions | ||
version: ['11.0.0', '10.4.3', '9.5.18'] | ||
type: ['oss'] | ||
subset: ['basic', 'other', 'long', 'generate'] | ||
subset: ['basic', 'other', 'long'] | ||
include: | ||
- version: '11.0.0' | ||
type: 'oss' | ||
|
@@ -74,36 +80,47 @@ jobs: | |
# Enterprise tests | ||
- version: '11.0.0' | ||
type: 'enterprise' | ||
subset: 'all' | ||
subset: 'enterprise' | ||
- version: '10.4.3' | ||
type: 'enterprise' | ||
subset: 'all' | ||
subset: 'enterprise' | ||
- version: '9.5.18' | ||
type: 'enterprise' | ||
subset: 'all' | ||
subset: 'enterprise' | ||
# Generate tests | ||
- version: '11.0.0' | ||
type: 'enterprise' | ||
subset: 'generate' | ||
- version: '10.4.3' | ||
type: 'enterprise' | ||
subset: 'generate' | ||
name: ${{ matrix.version }} - ${{ matrix.type }} - ${{ matrix.subset }} | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-go@v5 | ||
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 | ||
- uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2 | ||
with: | ||
go-version: '1.21' | ||
- uses: hashicorp/setup-terraform@v3 | ||
go-version-file: go.mod | ||
- uses: hashicorp/setup-terraform@b9cd54a3c349d3f38e8881555d616ced269862dd # v3.1.2 | ||
- name: Get Enterprise License | ||
uses: grafana/shared-workflows/actions/get-vault-secrets@main | ||
if: matrix.type == 'enterprise' | ||
with: | ||
repo_secrets: | | ||
GF_ENTERPRISE_LICENSE_TEXT=enterprise:license | ||
- name: Cache Docker image | ||
uses: ScribeMD/docker-cache@0.5.0 | ||
uses: ScribeMD/docker-cache@fb28c93772363301b8d0a6072ce850224b73f74e # v0.5.0 | ||
with: | ||
key: docker-${{ runner.os }}-${{ matrix.type == 'enterprise' && 'enterprise' || 'oss' }}-${{ matrix.version }} | ||
- run: make testacc-${{ matrix.type }}-docker | ||
- uses: nick-fields/retry@7152eba30c6575329ac0576536151aca5a72780e # v3.0.0 | ||
with: | ||
timeout_minutes: 30 | ||
max_attempts: 3 # Try 3 times to make sure we don't report failures on flaky tests | ||
command: make testacc-${{ matrix.type }}-docker | ||
env: | ||
GRAFANA_VERSION: ${{ matrix.version }} | ||
TESTARGS: >- | ||
${{ matrix.subset == 'all' && '-parallel 2' || '' }} | ||
${{ matrix.subset == 'enterprise' && '-skip="TestAccGenerate" -parallel 2' || '' }} | ||
${{ matrix.subset == 'basic' && '-run=".*_basic" -short -parallel 2' || '' }} | ||
${{ matrix.subset == 'other' && '-skip=".*_basic" -short -parallel 2' || '' }} | ||
${{ matrix.subset == 'long' && '-run=".*longtest" -parallel 1' || '' }} | ||
|
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
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 |
---|---|---|
|
@@ -24,21 +24,21 @@ jobs: | |
- run-cloud-tests | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 | ||
- name: Unshallow | ||
run: git fetch --prune --unshallow | ||
- name: Set up Go | ||
uses: actions/setup-go@v5 | ||
uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2 | ||
with: | ||
go-version: '1.21' | ||
go-version-file: go.mod | ||
- name: Import GPG key | ||
id: import_gpg | ||
uses: crazy-max/[email protected] | ||
uses: crazy-max/ghaction-import-gpg@01dd5d3ca463c7f10f7f4f7b4f177225ac661ee4 # v6.1.0 | ||
with: | ||
gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }} | ||
passphrase: ${{ secrets.PASSPHRASE }} | ||
- name: Run GoReleaser | ||
uses: goreleaser/goreleaser-action@v6 | ||
uses: goreleaser/goreleaser-action@286f3b13b1b49da4ac219696163fb8c1c93e1200 # v6.0.0 | ||
with: | ||
version: latest | ||
args: release --clean | ||
|
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
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
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 |
---|---|---|
@@ -0,0 +1,16 @@ | ||
package main | ||
|
||
import ( | ||
"fmt" | ||
|
||
"github.com/grafana/terraform-provider-grafana/v3/pkg/provider" | ||
) | ||
|
||
func main() { | ||
fmt.Println("Listing resources without lister functions:") | ||
for _, r := range provider.Resources() { | ||
if r.ListIDsFunc == nil { | ||
fmt.Println(r.Name) | ||
} | ||
} | ||
} |
Oops, something went wrong.