Skip to content

Commit

Permalink
v6_major_20230306_1
Browse files Browse the repository at this point in the history
  • Loading branch information
JulianHayward committed Mar 6, 2023
1 parent 960edbb commit 6e28d79
Show file tree
Hide file tree
Showing 31 changed files with 1,034 additions and 596 deletions.
14 changes: 7 additions & 7 deletions .azuredevops/pipelines/AzGovViz.pipeline.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# AzGovViz v6_major_20221212_1
# Azure Governance Visualizer v6_major_20230306_1
# First things first:
# 1. Mandatory: In the AzGovViz.variables.yml file set needed variables 'ServiceConnection' and 'ManagementGroupId
# 2. Mandatory: Check line 20
Expand All @@ -19,7 +19,7 @@ schedules:
include:
- master #CHECK branch 'master' is applicable? - delete me :)

#Running AzOps? Run AzGovViz after 'AzOps - Push' ..
#Running AzOps? Run Azure Governance Visualizer after 'AzOps - Push' ..
#AzOps Accellerator https://github.com/Azure/AzOps-Accelerator
#resources:
# pipelines:
Expand All @@ -31,7 +31,7 @@ schedules:
# - master #CHECK branch 'master' is applicable? - delete me :)

jobs:
- job: AzGovViz
- job: AzureGovernanceVisualizer
timeoutInMinutes: 0

pool:
Expand Down Expand Up @@ -113,22 +113,22 @@ jobs:
scriptPath: '$(System.DefaultWorkingDirectory)/$(ScriptDir)/$(Script)'
scriptArguments: $(ScriptArguments) -ScriptPath $(ScriptDir)
azurePowerShellVersion: latestVersion
displayName: 'Run AzGovViz'
displayName: 'Run Azure Governance Visualizer'

- pwsh: |
write-host "#################################"
write-host "Push AzGovViz output to repository"
write-host "Push Azure Governance Visualizer output to repository"
write-host "#################################"
$executionDateTimeInternationalReadable = get-date -format "dd-MMM-yyyy HH:mm:ss"
$currentTimeZone = (Get-TimeZone).Id
git config --global user.email "AzGovVizPipeline@azdo.com"
git config --global user.email "AzureGovernanceVisualizerPipeline@azdo.com"
$PipelineInfo = "Pipeline: '$(Build.DefinitionName)' 'rev $(Build.BuildNumber)' (Project: $([uri]::EscapeDataString("$(System.TeamProject)")); Repository: $(Build.Repository.Name); Branch: $(Build.SourceBranchName) Commit: $(Build.SourceVersion))"
git config --global user.name "$PipelineInfo"
git config pull.rebase false
git add --all
git commit -m "wiki $executionDateTimeInternationalReadable ($currentTimeZone)"
git -c http.extraheader="AUTHORIZATION: bearer $(System.AccessToken)" push origin HEAD:$(Build.SourceBranchName)
displayName: 'Push AzGovViz output to repository'
displayName: 'Push Azure Governance Visualizer output to repository'
- task: AzurePowerShell@5
condition: and(succeeded(), eq(variables['WebAppPublish'], 'true'))
Expand Down
6 changes: 3 additions & 3 deletions .azuredevops/pipelines/AzGovViz.variables.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# AzGovViz v6_major_20221213_1
# Azure Governance Visualizer v6_major_20230306_1
# First things first:
# 1. Replace <YourServiceConnection> with the name of your service connection
# 2. Replace <YourManagementGroupId> with the your ManagementGroupId
Expand Down Expand Up @@ -64,7 +64,7 @@ variables:

### Default Variables - Modify as Needed

# If you integrate AzGovViz into an existing repository you may need to adjust the script directory
# If you integrate Azure Governance Visualizer into an existing repository you may need to adjust the script directory
- name: ScriptDir
#example: YourFolder/pwsh
value: pwsh
Expand All @@ -85,7 +85,7 @@ variables:
# String | default = ';' | example: value: ';'
value: ';'

# Specifies the path to output the results from AzGovViz
# Specifies the path to output the results from Azure Governance Visualizer
- name: OutputPath
# String | example: value: 'wiki'
value: 'wiki'
Expand Down
2 changes: 1 addition & 1 deletion .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "AzGovViz",
"name": "AzureGovernanceVisualizer",
"dockerFile": "Dockerfile",
"settings": {
"terminal.integrated.defaultProfile.linux": "pwsh"
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/AzGovViz.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# AzGovViz v6_major_20220930_1
# Azure Governance Visualizer v6_major_20230306_1
# First things first:
# 1. Mandatory: define <Management Group Id> in line 11
# 2. Optional: enable the schedule (line 21,22)
# Documentation: https://github.com/JulianHayward/Azure-MG-Sub-Governance-Reporting

name: AzGovViz
name: AzureGovernanceVisualizer

env:
OutputPath: wiki
Expand All @@ -25,7 +25,7 @@ on:
workflow_dispatch:

jobs:
AzGovViz:
Azure Governance Visualizer:
runs-on: ubuntu-latest

steps:
Expand Down Expand Up @@ -54,16 +54,16 @@ jobs:
. .\$($env:ScriptDir)\$($env:ScriptPrereqFile) -OutputPath ${env:OutputPath}
azPSVersion: "latest"

- name: Run AzGovViz
- name: Run Azure Governance Visualizer
uses: azure/powershell@v1
with:
inlineScript: |
. .\$($env:ScriptDir)\$($env:ScriptFile) -ManagementGroupId ${env:ManagementGroupId} -ScriptPath ${env:ScriptDir} -OutputPath ${env:OutputPath}
azPSVersion: "latest"

- name: Push AzGovViz output to repository
- name: Push Azure Governance Visualizer output to repository
run: |
git config --global user.email "AzGovVizGHActions@ghActions.com"
git config --global user.email "AzureGovernanceVisualizerGHActions@ghActions.com"
git config --global user.name "$GITHUB_ACTOR"
git config pull.rebase false
git add --all
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/AzGovViz_OIDC.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# AzGovViz v6_major_20220930_1
# Azure Governance Visualizer v6_major_20230306_1
# First things first:
# 1. Mandatory: define <Management Group Id> in line 11
# 2. Optional: enable the schedule (line 22,23)
# Documentation: https://github.com/JulianHayward/Azure-MG-Sub-Governance-Reporting

name: AzGovViz_OIDC
name: AzureGovernanceVisualizer_OIDC

env:
OutputPath: wiki
Expand All @@ -31,7 +31,7 @@ permissions:
contents: write

jobs:
AzGovViz:
AzureGovernanceVisualizer:
runs-on: ubuntu-latest

steps:
Expand All @@ -53,16 +53,16 @@ jobs:
. .\$($env:ScriptDir)\$($env:ScriptPrereqFile) -OutputPath ${env:OutputPath}
azPSVersion: "latest"

- name: Run AzGovViz
- name: Run Azure Governance Visualizer
uses: azure/powershell@v1
with:
inlineScript: |
. .\$($env:ScriptDir)\$($env:ScriptFile) -ManagementGroupId ${env:ManagementGroupId} -SubscriptionId4AzContext ${{secrets.SUBSCRIPTION_ID}} -ScriptPath ${env:ScriptDir} -OutputPath ${env:OutputPath} -GitHubActionsOIDC
azPSVersion: "latest"

- name: Push AzGovViz output to repository
- name: Push Azure Governance Visualizer output to repository
run: |
git config --global user.email "AzGovVizGHActions@ghActions.com"
git config --global user.email "AzureGovernanceVisualizerGHActions@ghActions.com"
git config --global user.name "azgvz"
git config pull.rebase false
git add --all
Expand Down
Loading

0 comments on commit 6e28d79

Please sign in to comment.