mirror of
https://github.com/spring-projects/spring-petclinic.git
synced 2025-07-22 15:25:49 +00:00
added variables
This commit is contained in:
parent
f94354fce1
commit
1e7984b74c
1 changed files with 11 additions and 6 deletions
|
@ -3,6 +3,10 @@ pool: Default
|
||||||
pr:
|
pr:
|
||||||
- develop
|
- develop
|
||||||
|
|
||||||
|
variables:
|
||||||
|
dockerImagerepo: 'venkeyboda/spc'
|
||||||
|
dockerImagetag: '$(Build.BuildId)'
|
||||||
|
|
||||||
stages:
|
stages:
|
||||||
- stage: CI
|
- stage: CI
|
||||||
jobs:
|
jobs:
|
||||||
|
@ -32,15 +36,15 @@ stages:
|
||||||
inputs:
|
inputs:
|
||||||
command: 'build'
|
command: 'build'
|
||||||
Dockerfile: './Dockerfile'
|
Dockerfile: './Dockerfile'
|
||||||
repository: venkeyboda/spring-petclinic
|
repository: $(dockerImagerepo)
|
||||||
tags: |
|
tags: |
|
||||||
'$(Build.BuildId)'
|
$(dockerImagetag)
|
||||||
|
|
||||||
- task: CmdLine@2
|
- task: CmdLine@2
|
||||||
displayName: 'scannig image '
|
displayName: 'scannig image '
|
||||||
inputs:
|
inputs:
|
||||||
script: |
|
script: |
|
||||||
trivy image $('venkeyboda/spring-petclinic'):'$(Build.BuildId)' -o trivy-report.xml
|
trivy image $(dockerImagerepo):$(dockerImagetag) -o trivy-report.xml
|
||||||
|
|
||||||
- task: PublishPipelineArtifact@1
|
- task: PublishPipelineArtifact@1
|
||||||
displayName: 'Publish Trivy Report'
|
displayName: 'Publish Trivy Report'
|
||||||
|
@ -52,7 +56,8 @@ stages:
|
||||||
displayName: 'pushing the docker image'
|
displayName: 'pushing the docker image'
|
||||||
inputs:
|
inputs:
|
||||||
command: 'push'
|
command: 'push'
|
||||||
containerRegistry: 'docker hub'
|
containerRegistry: 'DOCKER_HUB'
|
||||||
repository: venkeyboda/spring-petclinic
|
repository: $(dockerImagerepo)
|
||||||
tags: |
|
tags: |
|
||||||
'$(Build.BuildId)'
|
$(dockerImagetag)
|
||||||
|
|
Loading…
Reference in a new issue