forked from mvdbos/owasp-dep-check-cache-builder
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathazure-pipelines.yml
38 lines (34 loc) · 1.37 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
schedules:
- cron: "0 3,6,9,12,15,18,21 * * *"
displayName: "Build OWASP Dependency Check cache every 3 hours"
branches:
include:
- master
always: true
pool:
vmImage: ubuntu-16.04
steps:
- task: DownloadGitHubRelease@0
displayName: 'Download cache from release on GitHub'
inputs:
connection: 'github-vnomus'
userRepository: 'mvdbos/owasp-dep-check-cache-builder'
defaultVersionType: 'specificTag'
version: 'v1.0'
downloadPath: '$(System.ArtifactsDirectory)'
- script: |
curl -sfL -o $(system.defaultWorkingDirectory)/dependency-check.zip https://dl.bintray.com/jeremy-long/owasp/dependency-check-5.1.0-release.zip
unzip $(system.defaultWorkingDirectory)/dependency-check.zip -d $(system.defaultWorkingDirectory)
$(system.defaultWorkingDirectory)/dependency-check/bin/dependency-check.sh --updateonly --data $(System.ArtifactsDirectory)
displayName: 'Update OWASP cache'
- task: GitHubRelease@0
displayName: 'Update release on GitHub'
inputs:
gitHubConnection: github-vnomus
repositoryName: '$(Build.Repository.Name)'
action: 'edit' # Options: create, edit, delete
target: '$(Build.SourceVersion)' # Required when action == Create || Action == Edit
tag: 'v1.0'
assets: '$(System.ArtifactsDirectory)/*'
assetUploadMode: 'delete'
addChangeLog: false