forked from hashicorp/terraform-provider-azuread
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Tooling: generation for TC services / GH labels, update workflows
- Loading branch information
1 parent
17184fe
commit 8df93e1
Showing
20 changed files
with
677 additions
and
30 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 |
---|---|---|
@@ -1,7 +1,5 @@ | ||
# Copyright (c) HashiCorp, Inc. | ||
# SPDX-License-Identifier: MPL-2.0 | ||
|
||
# NOTE: this file is generated via 'make generate' | ||
bug: | ||
- 'panic:' | ||
crash: | ||
- 'panic:' | ||
- 'panic:' |
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,9 +1,23 @@ | ||
# Copyright (c) HashiCorp, Inc. | ||
# SPDX-License-Identifier: MPL-2.0 | ||
|
||
# NOTE: this file is generated via 'make generate' | ||
dependencies: | ||
- go.mod | ||
- go.sum | ||
- vendor/**/* | ||
- changed-files: | ||
- any-glob-to-any-file: | ||
- go.mod | ||
- go.sum | ||
- vendor/**/* | ||
documentation: | ||
- website/**/* | ||
- changed-files: | ||
- any-glob-to-any-file: | ||
- docs/**/* | ||
- examples/**/* | ||
tooling: | ||
- changed-files: | ||
- any-glob-to-any-file: | ||
- .github/**/* | ||
- internal/tools/**/* | ||
- scripts/**/* | ||
- GNUmakefile | ||
state-migration: | ||
- changed-files: | ||
- any-glob-to-any-file: | ||
- internal/services/**/migration/**/* |
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,26 @@ | ||
name: Comment Failure | ||
|
||
on: | ||
# This file is reused, and called from other workflows | ||
workflow_call: | ||
|
||
jobs: | ||
comment-failure: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Get run url | ||
if: failure() | ||
run: | | ||
echo "gha_url=https://github.com/${{github.repository}}/actions/runs/${{github.run_id}}" >> $GITHUB_ENV | ||
- name: Send build failure comment | ||
if: failure() | ||
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1 | ||
with: | ||
result-encoding: string | ||
script: | | ||
github.rest.issues.createComment({ | ||
issue_number: ${{ github.event.number }}, | ||
owner: context.repo.owner, | ||
repo: context.repo.repo, | ||
body: '<b>Build failure</b> \n\n This pull request contains a build failure which needs addressed [here](${{ env.gha_url}}) .' | ||
}) |
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,35 @@ | ||
--- | ||
name: Generation Check | ||
|
||
permissions: | ||
contents: read | ||
|
||
on: | ||
pull_request: | ||
types: ['opened', 'synchronize'] | ||
paths: | ||
- '.github/workflows/gencheck.yaml' | ||
- '**.go' | ||
|
||
concurrency: | ||
group: 'gencheck-${{ github.head_ref }}' | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
gencheck: | ||
runs-on: [custom, linux, large] | ||
steps: | ||
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 | ||
- uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5.0.0 | ||
with: | ||
go-version-file: ./.go-version | ||
- run: bash scripts/gogetcookie.sh | ||
- run: make gencheck | ||
|
||
save-artifacts-on-fail: | ||
if: ${{ needs.gencheck.result }} == 'failure' | ||
uses: ./.github/workflows/save-artifacts.yaml | ||
|
||
comment-on-fail: | ||
if: ${{ needs.gencheck.result }} == 'failure' | ||
uses: ./.github/workflows/comment-failure.yaml |
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,20 @@ | ||
// Copyright (c) HashiCorp, Inc. | ||
// SPDX-License-Identifier: MPL-2.0 | ||
// NOTE: this is Generated from the Service Definitions - manual changes will be lost | ||
// to re-generate this file, run 'make generate' in the root of the repository | ||
var services = mapOf( | ||
"administrativeunits" to "Administrative Units", | ||
"approleassignments" to "App Role Assignments", | ||
"applications" to "Applications", | ||
"conditionalaccess" to "Conditional Access", | ||
"directoryobjects" to "Directory Objects", | ||
"directoryroles" to "Directory Roles", | ||
"domains" to "Domains", | ||
"groups" to "Groups", | ||
"identitygovernance" to "Identity Governance", | ||
"invitations" to "Invitations", | ||
"policies" to "Policies", | ||
"serviceprincipals" to "Service Principals", | ||
"userflows" to "User Flows", | ||
"users" to "Users" | ||
) |
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,23 @@ | ||
## Generator: Services | ||
|
||
Each Service Definition contains metadata (such as the Display Name & Website Categories) required in other parts of the codebase, for easier grouping. | ||
|
||
This generator takes that metadata and uses it to generate two things: | ||
|
||
1. Website Categories - which validates the categories used in the website exist, required for website deployments to happen. | ||
2. Service Definitions - generates the list of services used to run the Acceptance Tests | ||
3. GitHub Labels - generates the list of tags which should be assigned to a pull request when files within this path are changed. | ||
|
||
This is run via go:generate whenever the "SupportedServices" array is changed so that this is kept up-to-date. | ||
|
||
## Example Usage | ||
|
||
``` | ||
go run main.go -path=../../path/to/root-directory | ||
``` | ||
|
||
## Arguments | ||
|
||
* `help` - Show help? | ||
|
||
* `path` - The Relative Path to the root of the repository |
Oops, something went wrong.