forked from AErmie/DevSecOps
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwhitesource-pipeline.yml
51 lines (42 loc) · 1.61 KB
/
whitesource-pipeline.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
47
48
49
50
51
trigger: none
pool:
vmImage: 'windows-latest'
variables:
- group: SecureVariables
- name: WhiteSource-ProductName
value: DevSecOpsProduct
- name: WhiteSource-ProjectName
value: DevSecOpsProject
stages:
- stage: QualityCheckStage
displayName: Quality Check Stage
jobs:
- job: WhiteSourceJob
displayName: Run WhiteSource Scan
steps:
- task: DotNetCoreCLI@2
displayName: .NET Restore
inputs:
command: "restore"
projects: "**/*.csproj"
feedsToUse: "config"
nugetConfigPath: "nuget.config"
- task: CmdLine@2
displayName: "Download WhiteSource Unified Agent"
inputs:
script: curl -LJO https://github.com/whitesource/unified-agent-distribution/releases/latest/download/wss-unified-agent.jar
- task: CmdLine@2
displayName: "Run WhiteSource Unified Agent Scan"
inputs:
script: |
java -jar wss-unified-agent.jar -c whitesource-fs-agent.config -product $(WhiteSource-ProductName) -project $(WhiteSource-ProjectName) -apiKey $(WhiteSource-APIKey)
exit $?
# - script: |
# curl -LJO https://github.com/whitesource/unified-agent-distribution/releases/latest/download/wss-unified-agent.jar
# displayName: 'Download the latest Unified Agent'
# - script: |
# ls -la
# displayName: Root DIR Contents
# - script: |
# java -jar wss-unified-agent.jar -c ./whitesource-fs-agent.config -apiKey $(WhiteSource-APIKey) -product DevSecOpsProduct -project DevSecOpsProject
# displayName: 'Run Unified Agent Scan'