-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathazure-pipelines.yml
77 lines (69 loc) · 2.11 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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
# ASP.NET Core
# Build and test ASP.NET Core projects targeting .NET Core.
# Add steps that run tests, create a NuGet package, deploy, and more:
# https://docs.microsoft.com/azure/devops/pipelines/languages/dotnet-core
trigger:
- master
pool:
vmImage: ubuntu-latest
variables:
- group: TerraformServicePrincipleVars
- group: StrifeVars
- name: tag
value: $(Build.BuildId)
- name: imageName
value: bigtalljosh/strife
- name: dockerHub
value: DockerHub_BigTallJosh
- name: buildConfiguration
value: Release
steps:
- task: DotNetCoreCLI@2
displayName: dotnet build $(buildConfiguration)
inputs:
command: build
projects: '**/*.csproj'
arguments: '--configuration $(buildConfiguration)'
- task: DotNetCoreCLI@2
displayName: dotnet test
inputs:
command: test
projects: '**/*Tests.csproj'
arguments: >-
--configuration $(buildConfiguration) --collect "Code coverage"
--no-build
- task: Docker@2
displayName: Build Strife Image
inputs:
repository: $(imageName)
command: build
Dockerfile: Dockerfile
- task: Docker@2
displayName: Push image
inputs:
containerRegistry: |
$(dockerHub)
repository: $(imageName)
command: push
tags: |
$(tag)
# - script: |
# set -e
# terraform init -input=false
# terraform apply -input=false -auto-approve
# name: RunTerraform
# displayName: Run Terraform
# env:
# ARM_CLIENT_ID: $(ARM_CLIENT_ID)
# ARM_CLIENT_SECRET: $(ARM_CLIENT_SECRET)
# ARM_TENANT_ID: $(ARM_TENANT_ID)
# ARM_SUBSCRIPTION_ID: $(ARM_SUBSCRIPTION_ID)
# TF_VAR_imagebuild: $(tag)
# TF_VAR_auth0clientid: $(Auth0-ClientId)
# TF_VAR_auth0clientsecret: $(Auth0-ClientSecret)
# TF_VAR_auth0domain: $(Auth0-Domain)
# TF_VAR_auth0apiidentifier: $(Auth0-ApiIdentifier)
# TF_VAR_azureblobconnectionstring: $(AzureBlob-ConnectionString)
# TF_VAR_azurecosmosuri: $(AzureCosmos-Uri)
# TF_VAR_azurecosmosprimarykey: $(AzureCosmos-PrimaryKey)
# TF_VAR_azurecosmosdatabasename: $(AzureCosmos-DatabaseName)