Created
September 23, 2024 12:53
-
-
Save riosengineer/5816db268030951452c89346738b7ee9 to your computer and use it in GitHub Desktop.
Bicep Azure Cost Estimator YAML Example
This file contains hidden or 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
| trigger: none | |
| pool: | |
| vmImage: ubuntu-latest | |
| jobs: | |
| - job: RunNoCache | |
| displayName: Bicep Estimator | |
| steps: | |
| - checkout: self | |
| fetchDepth: 0 | |
| - task: Bash@3 | |
| inputs: | |
| targetType: 'inline' | |
| script: | | |
| wget https://github.com/TheCloudTheory/arm-estimator/releases/download/1.5.1/linux-x64.zip | |
| unzip linux-x64.zip | |
| chmod +x ./azure-cost-estimator | |
| workingDirectory: $(System.DefaultWorkingDirectory) | |
| - task: AzureCLI@2 | |
| inputs: | |
| azureSubscription: 'change_me' | |
| scriptType: 'pscore' | |
| scriptLocation: 'scriptPath' | |
| scriptPath: '$(System.DefaultWorkingDirectory)/bicep-diff.ps1' | |
| addSpnToEnvironment: true | |
| workingDirectory: '$(System.DefaultWorkingDirectory)' | |
| - task: PowerShell@2 | |
| condition: eq(variables['Build.Reason'], 'PullRequest') | |
| env: | |
| SYSTEM_ACCESSTOKEN: $(System.AccessToken) | |
| inputs: | |
| filePath: 'post-markdown.ps1' | |
| workingDirectory: '$(System.DefaultWorkingDirectory)' | |
| - task: PublishBuildArtifacts@1 | |
| inputs: | |
| PathtoPublish: '$(System.DefaultWorkingDirectory)/md-reports' | |
| ArtifactName: 'cost-reports' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment