Skip to content

Commit 2a43dc5

Browse files
committed
build: smaller dockerfile for windows
1 parent 2a9f2e0 commit 2a43dc5

File tree

3 files changed

+13
-11
lines changed

3 files changed

+13
-11
lines changed

Jenkinsfile

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1272,15 +1272,17 @@ pipeline {
12721272
lock("docker build-${env.NODE_NAME}"){
12731273
dockerImage = docker.build(dockerImageName, '-f ci/docker/windows/tox/Dockerfile --build-arg PIP_EXTRA_INDEX_URL --build-arg PIP_INDEX_URL --build-arg CHOCOLATEY_SOURCE --build-arg chocolateyVersion --build-arg PIP_DOWNLOAD_CACHE=c:/users/ContainerUser/appdata/local/pip --build-arg UV_INDEX_URL --build-arg UV_EXTRA_INDEX_URL --build-arg UV_CACHE_DIR=c:/users/ContainerUser/appdata/local/uv' + (env.DEFAULT_DOCKER_DOTNET_SDK_BASE_IMAGE ? " --build-arg FROM_IMAGE=${env.DEFAULT_DOCKER_DOTNET_SDK_BASE_IMAGE} ": ' ') + '.')
12741274
}
1275-
dockerImage.inside('--mount type=volume,source=uv_python_install_dir,target=C:\\Users\\ContainerUser\\Documents\\uvpython'){
1276-
unstash 'python sdist'
1277-
findFiles(glob: 'dist/*.tar.gz').each{
1278-
bat(
1279-
label: 'Running Tox',
1280-
script: """uvx --with-requirements requirements-dev.txt --with tox-uv tox run --workdir %TEMP%\\.tox --installpkg ${it.path} -e py${pythonVersion.replace('.', '')} -vv
1281-
rmdir /S /Q dist
1282-
"""
1283-
)
1275+
withEnv(['UV_PYTHON_INSTALL_DIR=C:\\Users\\ContainerUser\\Documents\\uvpython']){
1276+
dockerImage.inside('--mount type=volume,source=uv_python_install_dir,target=$UV_PYTHON_INSTALL_DIR'){
1277+
unstash 'python sdist'
1278+
findFiles(glob: 'dist/*.tar.gz').each{
1279+
bat(
1280+
label: 'Running Tox',
1281+
script: """uvx --with-requirements requirements-dev.txt --with tox-uv tox run --workdir %TEMP%\\.tox --installpkg ${it.path} -e py${pythonVersion.replace('.', '')} -vv
1282+
rmdir /S /Q dist
1283+
"""
1284+
)
1285+
}
12841286
}
12851287
}
12861288
} finally {

ci/docker/windows/tox/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ COPY conanfile.py c:/temp/conanfile.py
7373
COPY ci/docker/windows/tox/conan/profile.ini ${CONAN_USER_HOME}/.conan/profiles/default
7474
SHELL ["cmd", "/S", "/C" ]
7575
RUN uvx --with-requirements requirements-dev.txt --index-strategy=unsafe-best-match conan config home && `
76-
uvx --with-requirements requirements-dev.txt --index-strategy=unsafe-best-match conan install c:/temp/ --build missing --build openjpeg --no-import -pr:b=default && `
76+
uvx --with-requirements requirements-dev.txt --index-strategy=unsafe-best-match conan install c:/temp/ --build missing --no-import -pr:b=default && `
7777
uvx --with-requirements requirements-dev.txt --index-strategy=unsafe-best-match conan remove "*" -b --src -f && `
7878
uvx --with-requirements requirements-dev.txt --index-strategy=unsafe-best-match conan remove --lock && `
7979
uv cache clean --no-progress

ci/docker/windows/tox/conan/profile.ini

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ arch_build=x86_64
44
build_type=Release
55
compiler=Visual Studio
66
compiler.runtime=MD
7-
compiler.toolset=v143
7+
compiler.toolset=v142
88
compiler.version=14
99
os=Windows
1010
os_build=Windows

0 commit comments

Comments
 (0)