mirror of
https://github.com/collinbarrett/FilterLists.git
synced 2026-03-11 09:04:27 +00:00
extract some duplicated configs to vars
This commit is contained in:
parent
2ef5dceec6
commit
4516c1de20
1 changed files with 16 additions and 17 deletions
|
|
@ -1,9 +1,6 @@
|
|||
trigger:
|
||||
batch: false
|
||||
branches:
|
||||
include: ["master"]
|
||||
paths:
|
||||
include:
|
||||
variables:
|
||||
- name: triggerIncludePaths
|
||||
value:
|
||||
[
|
||||
"azure-pipelines.web.yaml",
|
||||
"src/FilterLists.Web/*",
|
||||
|
|
@ -11,20 +8,22 @@ trigger:
|
|||
"docker-compose.yml",
|
||||
"docker-compose.prod.yml",
|
||||
]
|
||||
- name: onSuccessAndMasterCondition
|
||||
value: "and(succeeded(), eq(variables['Build.SourceBranch'], 'refs/heads/master'))"
|
||||
|
||||
trigger:
|
||||
batch: false
|
||||
branches:
|
||||
include: ["master"]
|
||||
paths:
|
||||
include: ${{ variables.triggerIncludePaths }}
|
||||
|
||||
pr:
|
||||
autoCancel: false
|
||||
branches:
|
||||
include: ["master"]
|
||||
paths:
|
||||
include:
|
||||
[
|
||||
"azure-pipelines.web.yaml",
|
||||
"src/FilterLists.Web/*",
|
||||
".dockerignore",
|
||||
"docker-compose.yml",
|
||||
"docker-compose.prod.yml",
|
||||
]
|
||||
include: ${{ variables.triggerIncludePaths }}
|
||||
|
||||
pool:
|
||||
vmImage: "ubuntu-latest"
|
||||
|
|
@ -51,7 +50,7 @@ steps:
|
|||
tags: |
|
||||
latest
|
||||
$(Build.BuildId)
|
||||
condition: "and(succeeded(), eq(variables['Build.SourceBranch'], 'refs/heads/master'))"
|
||||
condition: ${{ variables.onSuccessAndMasterCondition }}
|
||||
|
||||
- task: CopyFiles@2
|
||||
displayName: "stage docker-compose files"
|
||||
|
|
@ -63,7 +62,7 @@ steps:
|
|||
TargetFolder: "$(Build.ArtifactStagingDirectory)"
|
||||
CleanTargetFolder: true
|
||||
OverWrite: true
|
||||
condition: "and(succeeded(), eq(variables['Build.SourceBranch'], 'refs/heads/master'))"
|
||||
condition: ${{ variables.onSuccessAndMasterCondition }}
|
||||
|
||||
- task: PublishBuildArtifacts@1
|
||||
displayName: "publish docker-compose files"
|
||||
|
|
@ -71,4 +70,4 @@ steps:
|
|||
PathtoPublish: "$(Build.ArtifactStagingDirectory)"
|
||||
ArtifactName: "drop"
|
||||
publishLocation: "Container"
|
||||
condition: "and(succeeded(), eq(variables['Build.SourceBranch'], 'refs/heads/master'))"
|
||||
condition: ${{ variables.onSuccessAndMasterCondition }}
|
||||
|
|
|
|||
Loading…
Reference in a new issue