-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathazure-pipeline.yaml
66 lines (58 loc) · 1.8 KB
/
azure-pipeline.yaml
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
pool:
vmImage: 'ubuntu-latest'
trigger:
paths:
exclude:
- azure-pipeline.yaml
variables:
isMain: $[eq(variables['Build.SourceBranch'], 'refs/heads/master')]
schedules:
- cron: "0 */3 * * *"
branches:
include:
- master
always: "true"
jobs:
- job: renovate
displayName: Renovate
timeoutInMinutes: 120
strategy:
matrix:
ProjectName:
repositoryPrefix: 'Prefix'
steps:
- task: Cache@2
displayName: Cache npm
inputs:
key: 'npm | "$(Agent.OS)" | package-lock.json'
path: ./node_modules
cacheHitVar: CACHE_RESTORED
- task: Npm@1
displayName: Npm install
condition: ne(variables.CACHE_RESTORED, 'true')
inputs:
command: 'install'
- task: Bash@3
continueOnError: true
displayName: Run renovate - $(repositoryPrefix) Prefix
inputs:
targetType: 'inline'
script: |
set -x
#export LOG_LEVEL=debug
export RENOVATE_CONFIG_FILE="./renovate-config.js"
export GITHUB_COM_TOKEN=$(GITHUB_COM_TOKEN)
export AZURE_DEVOPS_ARTIFACT=$(System.AccessToken)
export RENOVATE_TOKEN=$(System.AccessToken)
export RENOVATE_ENDPOINT="$(System.CollectionUri)"
export RENOVATE_REVIEWERS_FROM_CODE_OWNERS=true
export RENOVATE_AUTODISCOVER=true
export RENOVATE_AUTODISCOVER_FILTER="/$(System.TeamProject)\/($(repositoryPrefix)).*/"
if [ "$(isMain)" == "True" ]
then
echo "Branch MASTER"
node ./node_modules/renovate/dist/renovate
else
echo "Branch autre que MASTER - dry-run"
node ./node_modules/renovate/dist/renovate --dry-run
fi