Skip to content

Commit bc78721

Browse files
Merge pull request #3957 from aboutcode-org/3955-update-Dockerfile
3955 update dockerfile
2 parents 6e42937 + 1a255a8 commit bc78721

File tree

4 files changed

+41
-5
lines changed

4 files changed

+41
-5
lines changed

CHANGELOG.rst

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,9 @@ v33.0.0 (next next, roadmap)
3737
of these in other summary plugins.
3838
See https://github.com/nexB/scancode-toolkit/issues/1745
3939

40+
- Update Dockerfile and test container build.
41+
See https://github.com/aboutcode-org/scancode-toolkit/issues/3955
42+
4043
v32.3.0 - 2024-10-21
4144
--------------------
4245

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
# See https://aboutcode.org for more information about nexB OSS projects.
88
#
99

10-
FROM --platform=linux/amd64 python:3.8-slim-buster
10+
FROM --platform=linux/amd64 python:3.12-slim-bookworm
1111

1212
# Python settings: Force unbuffered stdout and stderr (i.e. they are flushed to terminal immediately)
1313
ENV PYTHONUNBUFFERED 1

azure-pipelines.yml

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -203,11 +203,11 @@ jobs:
203203
python_architecture: x64
204204
test_suites:
205205
click_versions: |
206-
for clk_ver in 8.1.3 8.1.2 8.1.1 8.1.0 8.0.4 8.0.3 8.0.2 8.0.1 7.1.2 7.1.1 7.1 6.7;
206+
for clk_ver in 8.1.3 8.1.2 8.1.1 8.1.0 8.0.4 8.0.3 8.0.2 8.0.1 7.1.2 7.1.1 7.1 6.7;
207207
do
208208
venv/bin/pip install click==$clk_ver;
209-
venv/bin/scancode -i samples/ -n3 --json foo.json;
210-
venv/bin/scancode -i --verbose samples/ -n3 --json foo.json;
209+
venv/bin/scancode -i samples/ -n3 --json foo.json;
210+
venv/bin/scancode -i --verbose samples/ -n3 --json foo.json;
211211
done
212212
213213
@@ -230,7 +230,7 @@ jobs:
230230
python_versions: ['3.9', '3.10', '3.11', '3.12']
231231
test_suites:
232232
all: venv/bin/pip install --upgrade-strategy eager --force-reinstall --upgrade -e .[testing] && venv/bin/pytest -n 2 -vvs tests/scancode/test_cli.py
233-
233+
234234
- template: etc/ci/azure-posix.yml
235235
parameters:
236236
job_name: macos12_cpython_latest_from_pip
@@ -263,3 +263,12 @@ jobs:
263263
test_suites:
264264
all: venv\Scripts\pip install --upgrade-strategy eager --force-reinstall --upgrade -e .[testing] && venv\Scripts\pytest -n 2 -vvs tests\scancode\test_cli.py
265265

266+
267+
################################################################################
268+
# Test container build
269+
################################################################################
270+
271+
- template: etc/ci/azure-posix-docker.yml
272+
parameters:
273+
job_name: ubuntu22_build_container
274+
image_name: ubuntu-22.04

etc/ci/azure-posix-docker.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
parameters:
2+
job_name: ''
3+
image_name: ''
4+
5+
jobs:
6+
- job: ${{ parameters.job_name }}
7+
8+
pool:
9+
vmImage: ${{ parameters.image_name }}
10+
11+
steps:
12+
- checkout: self
13+
fetchDepth: 10
14+
15+
- task: Docker@2
16+
inputs:
17+
command: 'build'
18+
Dockerfile: '**/Dockerfile'
19+
arguments: '--tag scancode'
20+
displayName: 'Build scancode-toolkit container'
21+
22+
- script: |
23+
docker run scancode --help
24+
displayName: 'Run scancode --help'

0 commit comments

Comments
 (0)