Skip to content

Commit 62ce6ec

Browse files
authored
Merge pull request #3159 from abhi-kr-2100/fix-issue-3155
Fix issue 3155 by running `scancode-reindex-licenses` subcommand instead of using `--reindex-licenses` flag
2 parents a410f6e + 2b9d552 commit 62ce6ec

File tree

2 files changed

+26
-3
lines changed

2 files changed

+26
-3
lines changed

Dockerfile

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,10 @@ WORKDIR /scancode-toolkit
3737
# Copy sources into docker container
3838
COPY . /scancode-toolkit
3939

40-
# Run scancode once for initial configuration, with
41-
# --reindex-licenses to create the base license index
42-
RUN ./scancode --reindex-licenses
40+
# Initial configuration using ./configure, scancode-reindex-licenses to build
41+
# the base license index
42+
RUN ./configure \
43+
&& ./venv/bin/scancode-reindex-licenses
4344

4445
# Add scancode to path
4546
ENV PATH=/scancode-toolkit:$PATH

azure-pipelines.yml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,28 @@
77

88
jobs:
99

10+
11+
################################################################################
12+
# Tests building with docker
13+
################################################################################
14+
15+
16+
- job: test_build_and_run_with_docker
17+
steps:
18+
- task: Docker@2
19+
displayName: Check that building and running using Docker succeeds
20+
inputs:
21+
command: 'build'
22+
Dockerfile: '**/Dockerfile'
23+
tags: |
24+
'scancode-toolkit'
25+
'scancode-toolkit:$(Build.BuildId)'
26+
- script: |
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'
30+
31+
1032
################################################################################
1133
# These jobs are using VMs and Azure-provided Pythons 3.8
1234
################################################################################

0 commit comments

Comments
 (0)