-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathazure-pipeline_external.yaml
42 lines (36 loc) · 1.04 KB
/
azure-pipeline_external.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
pool: Default
trigger:
batch: true
branches:
include:
- main
paths:
exclude:
- README.md
- azureDockerBuild/
steps:
- script: echo Hello, world!
displayName: "print hello world"
- script: docker build -t rk90229/hello-world:$(Build.BuildNumber) -f Dockerfile_Hello_World_Image .
displayName: "Build image from dockerfile"
- script: |
docker login -u $DOCKER_USER -p $DOCKER_PASSWORD
docker push rk90229/hello-world:$(Build.BuildNumber)
env:
DOCKER_PASSWORD: $(DOCKER_PASSWORD)
displayName: "Push image to dockerhub"
- task: NeuVectorScan@3
inputs:
scanType: 'external'
neuvectorScanner: 'neuvector-external-scanner'
containerRegistry: 'docker-test'
repository: 'rk90229/hello-world'
tag: $(Build.BuildNumber)
failOnHighSeverityThreshold: false
highSeverityThreshold: '2'
failOnMediumSeverityThreshold: false
mediumSeverityThreshold: '4'
- task: PublishPipelineArtifact@1
inputs:
targetPath: '$(Pipeline.Workspace)'
artifactName: 'scan-result'