forked from akuity/kargo
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathazure-pipelines.yml
55 lines (41 loc) · 1.55 KB
/
azure-pipelines.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
# Starter pipeline
# Start with a minimal pipeline that you can customize to build and deploy your code.
# Add steps that build, run tests, deploy, and more:
# https://aka.ms/yaml
trigger:
- main
pool:
vmImage: ubuntu-latest
resources:
containers:
- container: base_image
type: ACR
azureSubscription: Azure SDLC
resourceGroup: SdlcPlatformCore
registry: EdenCore
repository: dotnet_aspnet
trigger:
enabled: true
tags:
include:
- "6.0"
steps:
- script: echo Hello, world!
displayName: 'Run a one-line script'
- task: PowerShell@2
continueOnError: true
inputs:
targetType: 'inline'
script: |
# Look for $(resources.container) vars that indicate trigger is set in the pipeline
Write-Output "Checking for base image update trigger..."
$trigger_tag = "$(resources.container.base_image.tags)"
$trigger_type = "$(resources.container.base_image.type)"
if (-not [string]::IsNullOrEmpty($trigger_tag) -and -not [string]::IsNullOrEmpty($trigger_type)) {
Write-host "Base image trigger set ✅"
} else {
Write-host "##vso[task.logissue type=error] Base image trigger not set! Services will be automatically rebuilt and deployed on these container updates."
Write-host "Make sure the container resources block is set in your pipeline with the name set to 'base_image'"
Write-host "Follow https://outsystemsrd.atlassian.net/wiki/spaces/RRE/pages/3750363455/Architecture+of+Base+Images#Base-container-trigger"
exit 1
}