JulianHayward / Azure-MG-Sub-Governance-Reporting

Azure Governance Visualizer aka AzGovViz is a PowerShell script that captures Azure Governance related information such as Azure Policy, RBAC (a lot more) by polling Azure ARM, Storage and Microsoft Graph APIs.
MIT License
814 stars 293 forks source link

Feature request: support GitLab pipelines #200

Closed erisnar closed 2 months ago

erisnar commented 1 year ago

Hello!

We run AzGovViz in a GitLab environment. We are able to execute the powershell scripts in our pipelines since GitLab Pipelines and GitHub Actions use similar syntax. This is achieved by setting the environment variable $env:GITHUB_ACTIONS used in the AzAPICall funciton.

https://www.powershellgallery.com/packages/AzAPICall/1.1.72/Content/functions%5CAzAPICallFunctions.ps1 line 2033.

Maybe we could extend the AzAPICall function to also include GITLAB_PIPELINES or something similar?

We created GitLab CI-templates based on the provided GitHub Actions workflows.

JulianHayward commented 1 year ago

Hello @erisnar, finally :) was waiting for someone to come up with a GitLab pipeline and identifier. Let´s connect on LinkedIn and take action?

erisnar commented 1 year ago

Yes!

There are a lot of built in environment variables for GitLab. We could use

GITLAB_CI | Available for all jobs executed in CI/CD. true when available.

https://docs.gitlab.com/ee/ci/variables/predefined_variables.html

JulianHayward commented 2 months ago

moving to backlog