-
Notifications
You must be signed in to change notification settings - Fork 0
/
azure-pipelines.yml
49 lines (45 loc) · 1.61 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
# Azure Pipelines documentation https://aka.ms/yaml
name: 1.0.$(BuildId)
variables:
${{ if eq(variables['Build.SourceBranchName'], 'master') }}:
PackageVersion: $(Build.BuildNumber)
${{ if ne(variables['Build.SourceBranchName'], 'master') }}:
PackageVersion: $(Build.BuildNumber)-$(Build.SourceBranchName)
pool:
vmImage: 'ubuntu-latest'
steps:
- checkout: self
lfs: true
- task: UseDotNet@2
displayName: 'Install .NET Core SDK'
inputs:
packageType: 'sdk'
version: '2.2.301'
- task: HelmInstaller@1
displayName: 'Install Helm'
inputs:
helmVersionToInstall: latest
- script: 'dotnet tool install --global Cake.Tool'
displayName: 'Install cake global tool'
failOnStderr: true
- script: 'dotnet cake --target=Init'
displayName: 'Helm Init'
failOnStderr: true
- script: 'dotnet cake --target=Update'
displayName: 'Helm Update'
failOnStderr: true
- script: 'dotnet cake --target=Lint'
displayName: 'Helm Lint'
failOnStderr: true
- script: 'dotnet cake --target=Package --PackageVersion=$(PackageVersion)'
displayName: 'Helm Package'
failOnStderr: true
- task: AzureCLI@1
displayName: 'Azure Container Registry Push'
inputs:
azureSubscription: 'Azure'
scriptLocation: inlineScript
inlineScript: 'dotnet cake --target=Push --verbosity=Diagnostic --AzureContainerRegistryName="$(AzureContainerRegistryName)" --AzureContainerRegistryUsername="$(AzureContainerRegistryUsername)" --AzureContainerRegistryPassword="$(AzureContainerRegistryPassword1)"'
- publish: './Artifacts'
artifact: 'HelmCharts'
displayName: 'Publish Artifacts'