-
Notifications
You must be signed in to change notification settings - Fork 400
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'origin/master' into resource-settings
- Loading branch information
Showing
86 changed files
with
2,987 additions
and
642 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 |
---|---|---|
@@ -0,0 +1,145 @@ | ||
name: Provider schema | ||
|
||
on: | ||
pull_request: | ||
types: [opened, synchronize] | ||
|
||
workflow_dispatch: | ||
inputs: | ||
base: | ||
description: 'Base ref' | ||
default: 'master' | ||
required: true | ||
head: | ||
description: 'Head ref' | ||
default: 'master' | ||
required: true | ||
|
||
jobs: | ||
compute_current: | ||
name: "Generate current" | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- if: github.event_name == 'pull_request' | ||
name: Checkout | ||
uses: actions/checkout@v4 | ||
with: | ||
# Checkout main branch to generate schema for current release | ||
ref: master | ||
|
||
- if: github.event_name == 'workflow_dispatch' | ||
name: Checkout | ||
uses: actions/checkout@v4 | ||
with: | ||
ref: ${{ github.event.inputs.base }} | ||
|
||
- name: 'Setup Go' | ||
uses: actions/setup-go@v4 | ||
with: | ||
go-version: 1.21.x | ||
|
||
- name: 'Setup Terraform' | ||
uses: hashicorp/setup-terraform@v2 | ||
with: | ||
terraform_wrapper: false | ||
|
||
- run: make install | ||
|
||
- name: Generate provider schema | ||
shell: bash | ||
run: | | ||
set -ex | ||
cd /tmp | ||
cat > main.tf <<EOF | ||
terraform { | ||
required_providers { | ||
databricks = { | ||
source = "databricks/databricks" | ||
} | ||
} | ||
} | ||
EOF | ||
terraform init | ||
terraform providers schema -json > provider.json | ||
- name: 'Upload provider schema' | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: schema-current | ||
path: /tmp/provider.json | ||
retention-days: 1 | ||
|
||
compute_new: | ||
name: "Generate new" | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- if: github.event_name == 'pull_request' | ||
name: Checkout | ||
uses: actions/checkout@v4 | ||
|
||
- if: github.event_name == 'workflow_dispatch' | ||
name: Checkout | ||
uses: actions/checkout@v4 | ||
with: | ||
ref: ${{ github.event.inputs.head }} | ||
|
||
- name: 'Setup Go' | ||
uses: actions/setup-go@v4 | ||
with: | ||
go-version: 1.21.x | ||
|
||
- name: 'Setup Terraform' | ||
uses: hashicorp/setup-terraform@v2 | ||
with: | ||
terraform_wrapper: false | ||
|
||
- run: make install | ||
|
||
- name: Generate provider schema | ||
shell: bash | ||
run: | | ||
set -ex | ||
cd /tmp | ||
cat > main.tf <<EOF | ||
terraform { | ||
required_providers { | ||
databricks = { | ||
source = "databricks/databricks" | ||
} | ||
} | ||
} | ||
EOF | ||
terraform init | ||
terraform providers schema -json > provider.json | ||
- name: 'Upload provider schema' | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: schema-new | ||
path: /tmp/provider.json | ||
retention-days: 1 | ||
|
||
diff: | ||
needs: [compute_current, compute_new] | ||
|
||
name: "Compute diff" | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: 'Setup Go' | ||
uses: actions/setup-go@v4 | ||
with: | ||
go-version: 1.21.x | ||
cache: false | ||
|
||
- run: go install github.com/josephburnett/jd@latest | ||
|
||
- name: 'Download provider schemas' | ||
uses: actions/download-artifact@v3 | ||
|
||
- run: ls -l schema*/* | ||
|
||
- run: jd -color schema-current/provider.json schema-new/provider.json | ||
continue-on-error: true |
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 |
---|---|---|
@@ -1 +1 @@ | ||
* @databricks/field-dev-ecosystem @databricks/eng-plat-auto-exp-reviewers | ||
* @databricks/field-dev-terraform @databricks/eng-plat-auto-exp-reviewers |
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
Oops, something went wrong.