Skip to content

Commit

Permalink
Merge pull request #3957 from aboutcode-org/3955-update-Dockerfile
Browse files Browse the repository at this point in the history
3955 update dockerfile
  • Loading branch information
AyanSinhaMahapatra authored Oct 24, 2024
2 parents 6e42937 + 1a255a8 commit bc78721
Show file tree
Hide file tree
Showing 4 changed files with 41 additions and 5 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,9 @@ v33.0.0 (next next, roadmap)
of these in other summary plugins.
See https://github.com/nexB/scancode-toolkit/issues/1745

- Update Dockerfile and test container build.
See https://github.com/aboutcode-org/scancode-toolkit/issues/3955

v32.3.0 - 2024-10-21
--------------------

Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
# See https://aboutcode.org for more information about nexB OSS projects.
#

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

# Python settings: Force unbuffered stdout and stderr (i.e. they are flushed to terminal immediately)
ENV PYTHONUNBUFFERED 1
Expand Down
17 changes: 13 additions & 4 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -203,11 +203,11 @@ jobs:
python_architecture: x64
test_suites:
click_versions: |
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;
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;
do
venv/bin/pip install click==$clk_ver;
venv/bin/scancode -i samples/ -n3 --json foo.json;
venv/bin/scancode -i --verbose samples/ -n3 --json foo.json;
venv/bin/scancode -i samples/ -n3 --json foo.json;
venv/bin/scancode -i --verbose samples/ -n3 --json foo.json;
done
Expand All @@ -230,7 +230,7 @@ jobs:
python_versions: ['3.9', '3.10', '3.11', '3.12']
test_suites:
all: venv/bin/pip install --upgrade-strategy eager --force-reinstall --upgrade -e .[testing] && venv/bin/pytest -n 2 -vvs tests/scancode/test_cli.py

- template: etc/ci/azure-posix.yml
parameters:
job_name: macos12_cpython_latest_from_pip
Expand Down Expand Up @@ -263,3 +263,12 @@ jobs:
test_suites:
all: venv\Scripts\pip install --upgrade-strategy eager --force-reinstall --upgrade -e .[testing] && venv\Scripts\pytest -n 2 -vvs tests\scancode\test_cli.py


################################################################################
# Test container build
################################################################################

- template: etc/ci/azure-posix-docker.yml
parameters:
job_name: ubuntu22_build_container
image_name: ubuntu-22.04
24 changes: 24 additions & 0 deletions etc/ci/azure-posix-docker.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
parameters:
job_name: ''
image_name: ''

jobs:
- job: ${{ parameters.job_name }}

pool:
vmImage: ${{ parameters.image_name }}

steps:
- checkout: self
fetchDepth: 10

- task: Docker@2
inputs:
command: 'build'
Dockerfile: '**/Dockerfile'
arguments: '--tag scancode'
displayName: 'Build scancode-toolkit container'

- script: |
docker run scancode --help
displayName: 'Run scancode --help'

0 comments on commit bc78721

Please sign in to comment.