11variable "TAG_PREFIX" {
2- default = " docker.io/polymathrobotics/pulumi-python "
2+ default = " docker.io/polymathrobotics"
33}
44
55variable "VERSION" {
6- default = " 3.186.0"
6+ default = " 3.192.0"
7+ }
8+
9+ # Explicitly define the latest Python version used for the consolidated image
10+ variable "LATEST_PYTHON" {
11+ default = " 3.13"
712}
813
914# There's no darwin-based Docker, so if we're running on macOS, change the platform to linux
1015variable "LOCAL_PLATFORM" {
1116 default = regex_replace (" ${ BAKE_LOCAL_PLATFORM } " , " ^(darwin)" , " linux" )
1217}
1318
19+ variable "IMAGES" {
20+ default = [
21+ " pulumi-python-3.9" ,
22+ " pulumi-python-3.10" ,
23+ " pulumi-python-3.11" ,
24+ " pulumi-python-3.12" ,
25+ " pulumi-python-3.13"
26+ ]
27+ }
28+
1429target "_common" {
1530 args = {
1631 PULUMI_VERSION = " ${ VERSION } "
17- CINC_AUDITOR_URL_AMD64 = " https://ftp.osuosl.org/pub/cinc/files/stable/cinc-auditor/6.8.24/ubuntu/24.04/cinc-auditor_6.8.24-1_amd64.deb"
18- CINC_AUDITOR_SHA256_AMD64 = " 13907518ae88cc12d85fb09e2bca5c6f48d9ced75fe1dad61285d1d884cda9c7"
19- CINC_AUDITOR_URL_ARM64 = " https://ftp.osuosl.org/pub/cinc/files/stable/cinc-auditor/6.8.24/ubuntu/24.04/cinc-auditor_6.8.24-1_arm64.deb"
20- CINC_AUDITOR_SHA256_ARM64 = " 7453d58358cc158ddfe7a92a4557966c1e4b472e207e6097cf2490b323bd2616"
2132 }
2233 dockerfile = " Containerfile"
23- tags = [
24- " ${ TAG_PREFIX } :${ VERSION } " ,
25- " ${ TAG_PREFIX } :latest"
26- ]
2734 labels = {
2835 " org.opencontainers.image.source" = " https://github.com/polymathrobotics/oci"
2936 " org.opencontainers.image.licenses" = " Apache-2.0"
3037 " org.opencontainers.image.description" = " Pulumi CLI container for python."
31- " org.opencontainers.image.title" = " ${ TAG_PREFIX } "
38+ " org.opencontainers.image.title" = " ${ TAG_PREFIX } /pulumi-python "
3239 " org.opencontainers.image.created" = " ${ timestamp ()} "
3340 " dev.polymathrobotics.image.readme-filepath" = " pulumi/README.md"
3441 }
3542}
3643
37- target "local" {
44+ target "local-matrix" {
45+ # replace `.` with `-` for the expanded image_name
46+ name = " local-${ regex_replace (" ${ image_name } " , " \\ ." , " -" )} "
3847 inherits = [" _common" ]
48+ matrix = {
49+ image_name = IMAGES
50+ }
51+ platforms = [" ${ LOCAL_PLATFORM } " ]
52+ tags = [
53+ " ${ TAG_PREFIX } /${ image_name } :${ VERSION } " ,
54+ " ${ TAG_PREFIX } /${ image_name } :${ VERSION } -noble" ,
55+ " ${ TAG_PREFIX } /${ image_name } :latest"
56+ ]
57+ args = {
58+ LANGUAGE_VERSION = " ${ regex_replace (" ${ image_name } " , " ^.*-" , " " )} "
59+ }
60+ }
61+
62+ group "local" {
63+ targets = [
64+ " local-matrix" , # all expanded matrix targets
65+ " local-pulumi-python-latest"
66+ ]
67+ }
68+
69+ target "local-pulumi-python-latest" {
70+ inherits = [" _common" ]
3971 platforms = [" ${ LOCAL_PLATFORM } " ]
72+ tags = [
73+ " ${ TAG_PREFIX } /pulumi-python:${ VERSION } " ,
74+ " ${ TAG_PREFIX } /pulumi-python:${ VERSION } -noble" ,
75+ " ${ TAG_PREFIX } /pulumi-python:latest" ,
76+ ]
77+ args = {
78+ LANGUAGE_VERSION = " ${ LATEST_PYTHON } "
79+ }
4080}
4181
42- target "default" {
82+ target "default-matrix" {
83+ # replace `.` with `-` for the expanded image_name
84+ name = " default-${ regex_replace (" ${ image_name } " , " \\ ." , " -" )} "
4385 inherits = [" _common" ]
86+ matrix = {
87+ image_name = IMAGES
88+ }
89+ # target = image_name
90+ platforms = [" linux/amd64" , " linux/arm64/v8" ]
91+ tags = [
92+ " ${ TAG_PREFIX } /${ image_name } :${ VERSION } " ,
93+ " ${ TAG_PREFIX } /${ image_name } :${ VERSION } -noble" ,
94+ " ${ TAG_PREFIX } /${ image_name } :latest"
95+ ]
96+ args = {
97+ LANGUAGE_VERSION = " ${ regex_replace (" ${ image_name } " , " ^.*-" , " " )} "
98+ }
99+ }
100+
101+ target "default-pulumi-python-latest" {
102+ inherits = [" _common" ]
44103 platforms = [" linux/amd64" , " linux/arm64/v8" ]
104+ tags = [
105+ " ${ TAG_PREFIX } /pulumi-python:${ VERSION } " ,
106+ " ${ TAG_PREFIX } /pulumi-python:${ VERSION } -noble" ,
107+ " ${ TAG_PREFIX } /pulumi-python:latest" ,
108+ ]
109+ args = {
110+ LANGUAGE_VERSION = " ${ LATEST_PYTHON } "
111+ }
45112}
113+
114+ group "default" {
115+ targets = [
116+ " default-matrix" , # all expanded matrix targets
117+ " default-pulumi-python-latest"
118+ ]
119+ }
0 commit comments