Skip to content

Commit 7fc1a40

Browse files
committed
ci: add docker labels
1 parent 8896f60 commit 7fc1a40

1 file changed

Lines changed: 11 additions & 8 deletions

File tree

Jenkinsfile

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -440,12 +440,14 @@ pipeline {
440440
unstash 'PYTHON_PACKAGES'
441441
if(['linux', 'windows'].contains(entry.OS) && params.containsKey("INCLUDE_${entry.OS}-${entry.ARCHITECTURE}".toUpperCase()) && params["INCLUDE_${entry.OS}-${entry.ARCHITECTURE}".toUpperCase()]){
442442
docker.image(isUnix() ? 'ghcr.io/astral-sh/uv:debian' :'python')
443-
.inside(
444-
isUnix() ?
445-
'--mount source=tripwire_cache,target=/tmp --tmpfs /.local/share:exec --tmpfs /.local/bin:exec' :
446-
"--mount type=volume,source=uv_python_cache_dir,target=C:\\Users\\ContainerUser\\Documents\\cache\\uvpython \
447-
--mount type=volume,source=pipcache,target=C:\\Users\\ContainerUser\\Documents\\cache\\pipcache \
448-
--mount type=volume,source=uv_cache_dir,target=C:\\Users\\ContainerUser\\Documents\\cache\\uvcache"
443+
.inside("--label=purpose=ci --label \"JOB_NAME=\$JOB_NAME\" --label \"absoluteUrl=${currentBuild.absoluteUrl}\" --label \"BUILD_NUMBER=${currentBuild.number}\" " +
444+
(
445+
isUnix() ?
446+
'--mount source=tripwire_cache,target=/tmp --tmpfs /.local/share:exec --tmpfs /.local/bin:exec'
447+
:
448+
"--mount type=volume,source=uv_python_cache_dir,target=C:\\Users\\ContainerUser\\Documents\\cache\\uvpython \
449+
--mount type=volume,source=pipcache,target=C:\\Users\\ContainerUser\\Documents\\cache\\pipcache \
450+
--mount type=volume,source=uv_cache_dir,target=C:\\Users\\ContainerUser\\Documents\\cache\\uvcache")
449451
){
450452
if(isUnix()){
451453
withEnv([
@@ -668,7 +670,7 @@ pipeline {
668670
docker{
669671
image 'python'
670672
label 'windows && docker && x86_64'
671-
args '--mount source=uv_python_cache_dir,target=C:\\Users\\ContainerUser\\Documents\\uvpython'
673+
args "--label=purpose=ci --label \"JOB_NAME=\$JOB_NAME\" --label \"absoluteUrl=${currentBuild.absoluteUrl}\" --label \"BUILD_NUMBER=${currentBuild.number}\" --mount source=uv_python_cache_dir,target=C:\\Users\\ContainerUser\\Documents\\uvpython"
672674
}
673675
}
674676
steps{
@@ -699,6 +701,7 @@ pipeline {
699701
docker {
700702
image 'mcr.microsoft.com/windows/servercore:ltsc2025'
701703
label 'windows && docker && x86_64'
704+
args "--label=purpose=ci --label \"JOB_NAME=\$JOB_NAME\" --label \"absoluteUrl=${currentBuild.absoluteUrl}\" --label \"BUILD_NUMBER=${currentBuild.number}\""
702705
}
703706
}
704707
options {
@@ -749,7 +752,7 @@ pipeline {
749752
docker{
750753
image 'ghcr.io/astral-sh/uv:debian'
751754
label 'docker && linux'
752-
args '--mount source=uv_python_cache_dir,target=/tmp/uvpython '
755+
args "--label=purpose=ci --label \"JOB_NAME=\$JOB_NAME\" --label \"absoluteUrl=${currentBuild.absoluteUrl}\" --label \"BUILD_NUMBER=${currentBuild.number}\" --mount source=uv_python_cache_dir,target=/tmp/uvpython"
753756
}
754757
}
755758
when{

0 commit comments

Comments
 (0)