-
-
Notifications
You must be signed in to change notification settings - Fork 20
/
azure-pipelines.yml
41 lines (37 loc) · 1.03 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
name : Docker-CI
trigger:
branches:
include:
- master
- development
- rewrite/core/*
pool:
vmImage: 'ubuntu-latest'
variables:
ImageName: 'velvetthepanda/silk:$(Build.BuildId)'
stages:
- stage: Build
displayName: Build image
jobs:
- job: Build
displayName: Build and push Docker image
steps:
- task: Docker@1
displayName: 'Build the Docker image'
inputs:
containerregistrytype: 'Container Registry'
dockerRegistryEndpoint: 'Docker Hub'
command: 'Build an image'
dockerFile: '**/Dockerfile'
imageName: '$(ImageName)'
includeLatestTag: true
useDefaultContext: false
buildContext: '.'
- task: Docker@1
displayName: 'Push the Docker image to Dockerhub'
inputs:
containerregistrytype: 'Container Registry'
dockerRegistryEndpoint: 'Docker Hub'
command: 'Push an image'
imageName: '$(ImageName)'
condition: and(succeeded(), ne(variables['Build.Reason'], 'PullRequest'))