Skip to content

Commit 2b9d552

Browse files
committed
Add CI job to test build and run with Docker
The test should ensure that scancode-toolkit is capable of being built successfully using Docker. Additionally, the built script should run successfully. Signed-off-by: Abhishek Kumar <abhi.kr.2100@gmail.com>
1 parent dd0b4f0 commit 2b9d552

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

azure-pipelines.yml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,19 +13,20 @@ jobs:
1313
################################################################################
1414

1515

16-
- job: test_build_and_scan_with_docker
16+
- job: test_build_and_run_with_docker
1717
steps:
1818
- task: Docker@2
19-
displayName: Check that building using Docker succeeds
19+
displayName: Check that building and running using Docker succeeds
2020
inputs:
2121
command: 'build'
2222
Dockerfile: '**/Dockerfile'
2323
tags: |
2424
'scancode-toolkit'
2525
'scancode-toolkit:$(Build.BuildId)'
2626
- script: |
27-
docker scan scancode-toolkit:$(Build.BuildId)
28-
displayName: 'Scan image'
27+
docker run -v $PWD/:/project scancode-toolkit -clipeu \
28+
--json-pp /project/scan-result.json /project/apache-2.0.LICENSE
29+
displayName: 'Test run'
2930
3031
3132
################################################################################

0 commit comments

Comments
 (0)