-
Notifications
You must be signed in to change notification settings - Fork 4
/
azure-pipelines.yml
46 lines (39 loc) · 1.24 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
variables:
buildConfiguration: 'Release'
stages:
- stage: Build
jobs:
- job: Build
pool:
vmImage: ubuntu-22.04
steps:
- task: UseDotNet@2
displayName: Install .NET 7
inputs:
version: 7.x
- script: 'dotnet restore src/Pootis-Bot.sln'
displayName: Restore Packages
- script: 'dotnet publish src/Pootis-Bot.sln --no-restore -c $(buildConfiguration)'
displayName: Build Project
- task: PublishPipelineArtifact@1
displayName: Upload Artifact
inputs:
targetPath: src/bin/Release/publish
artifactName: $(Build.DefinitionName)-$(Agent.JobName)-$(Build.BuildNumber)-$(Build.SourceBranchName)
- stage: Deploy
dependsOn: Build
condition: succeeded('Build')
jobs:
- job: Docker
pool:
vmImage: ubuntu-22.04
steps:
- script: echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USER" --password-stdin
displayName: Docker Login
env:
DOCKER_USER: $(DOCKER_USER)
DOCKER_PASSWORD: $(DOCKER_PASSWORD)
- script: docker buildx create --use
displayName: Docker BuildX Create
- script: docker buildx build --push --platform linux/amd64,linux/arm64/v8 --tag voltstro/pootis-bot:autobuild .
displayName: Docker BuildX Build