-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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 error_details
- Loading branch information
Showing
541 changed files
with
18,094 additions
and
6,782 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
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,98 @@ | ||
name: TGC Build and Unit Test | ||
|
||
permissions: | ||
actions: read | ||
contents: read | ||
statuses: write | ||
|
||
env: | ||
status_suffix: "-build-and-unit-tests" | ||
|
||
on: | ||
workflow_dispatch: | ||
inputs: | ||
owner: | ||
description: 'The owner of the fork' | ||
required: false | ||
default: 'modular-magician' | ||
repo: | ||
description: 'The Base Repository to pull from' | ||
required: false | ||
default: 'terraform-google-conversion' | ||
branch: | ||
description: 'The branch or sha of the tgc execute against' | ||
required: true | ||
sha: | ||
description: "The commit SHA in magic-modules repository where the status result will be posted" | ||
required: true | ||
|
||
concurrency: | ||
group: test-tgc-${{ github.event.inputs.owner }}-${{ github.event.inputs.repo }}-${{ github.event.inputs.branch }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
build-and-unit-test: | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 30 | ||
steps: | ||
- name: Checkout Repository | ||
uses: actions/checkout@v2 | ||
with: | ||
repository: ${{ github.event.inputs.owner }}/${{ github.event.inputs.repo }} | ||
ref: ${{ github.event.inputs.branch }} | ||
path: tgc | ||
fetch-depth: 2 | ||
- name: Check for Code Changes | ||
id: pull_request | ||
run: | | ||
cd tgc | ||
gofiles=$(git diff --name-only HEAD~1 | { grep -e "\.go$" -e "go.mod$" -e "go.sum$" || test $? = 1; }) | ||
if [ -z "$gofiles" ]; then | ||
echo "has_changes=false" >> $GITHUB_OUTPUT | ||
else | ||
echo "has_changes=true" >> $GITHUB_OUTPUT | ||
fi | ||
- name: Get Job URL | ||
if: ${{ !cancelled() }} | ||
id: get_job | ||
run: | | ||
response=$(curl --get -Ss -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" -H "Accept: application/vnd.github.v3+json" "https://api.github.com/repos/${{ github.repository }}/actions/runs/${{ github.run_id }}/attempts/${{ github.run_attempt }}/jobs") | ||
html_url=$(echo "$response" | jq -r --arg job_name "${{ github.job }}" '.jobs | map(select(.name == $job_name)) | .[0].html_url') | ||
echo "url=${html_url}" >> $GITHUB_OUTPUT | ||
- name: Post Pending Status to Pull Request | ||
if: ${{ !cancelled() }} | ||
run: | | ||
curl -X POST -H "Authorization: token ${{secrets.GITHUB_TOKEN}}" \ | ||
-H "Accept: application/vnd.github.v3+json" \ | ||
"https://api.github.com/repos/GoogleCloudPlatform/magic-modules/statuses/${{github.event.inputs.sha}}" \ | ||
-d '{ | ||
"context": "${{ github.event.inputs.repo }}${{ env.status_suffix }}", | ||
"target_url": "${{ steps.get_job.outputs.url }}", | ||
"state": "pending" | ||
}' | ||
- name: Set up Go | ||
if: ${{ !failure() && steps.pull_request.outputs.has_changes == 'true' }} | ||
uses: actions/setup-go@v4 | ||
with: | ||
go-version: '^1.19.9' | ||
- name: Build Terraform Google Conversion | ||
if: ${{ !failure() && steps.pull_request.outputs.has_changes == 'true' }} | ||
run: | | ||
cd tgc | ||
go build | ||
- name: Run Unit Tests | ||
if: ${{ !failure() && steps.pull_request.outputs.has_changes == 'true' }} | ||
run: | | ||
cd tgc | ||
make test | ||
- name: Post Result Status to Pull Request | ||
if: ${{ !cancelled() }} | ||
run: | | ||
curl -X POST -H "Authorization: token ${{secrets.GITHUB_TOKEN}}" \ | ||
-H "Accept: application/vnd.github.v3+json" \ | ||
"https://api.github.com/repos/GoogleCloudPlatform/magic-modules/statuses/${{github.event.inputs.sha}}" \ | ||
-d '{ | ||
"context": "${{ github.event.inputs.repo }}${{ env.status_suffix }}", | ||
"target_url": "${{ steps.get_job.outputs.url }}", | ||
"state": "${{ job.status }}" | ||
}' |
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,8 +1,5 @@ | ||
--- | ||
title: "Home" | ||
weight: 0 | ||
type: "docs" | ||
date: 2022-11-14T09:50:49-08:00 | ||
title: "Overview" | ||
--- | ||
|
||
|
||
|
2 changes: 2 additions & 0 deletions
2
docs/content/docs/best-practices/_index.md → docs/content/best-practices/_index.md
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,6 +1,8 @@ | ||
--- | ||
title: "Best practices" | ||
weight: 25 | ||
aliases: | ||
- /docs/best-practices | ||
--- | ||
|
||
# Best practices | ||
|
1 change: 0 additions & 1 deletion
1
docs/content/docs/getting-started/_index.md → docs/content/getting-started/_index.md
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,5 +1,4 @@ | ||
--- | ||
title: "Getting Started" | ||
weight: 10 | ||
isSection: 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
2 changes: 2 additions & 0 deletions
2
...ocs/getting-started/generate-providers.md → ...ent/getting-started/generate-providers.md
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
2 changes: 2 additions & 0 deletions
2
...getting-started/provider-documentation.md → ...getting-started/provider-documentation.md
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
2 changes: 2 additions & 0 deletions
2
...ocs/getting-started/run-provider-tests.md → ...ent/getting-started/run-provider-tests.md
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
2 changes: 2 additions & 0 deletions
2
docs/content/docs/getting-started/setup.md → docs/content/getting-started/setup.md
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
2 changes: 2 additions & 0 deletions
2
...ocs/getting-started/use-built-provider.md → ...ent/getting-started/use-built-provider.md
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
2 changes: 2 additions & 0 deletions
2
docs/content/docs/how-to/_index.md → docs/content/how-to/_index.md
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,6 +1,8 @@ | ||
--- | ||
title: "How To" | ||
weight: 20 | ||
aliases: | ||
- /docs/how-to | ||
--- | ||
|
||
# How To | ||
|
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
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.