From 5c8640d1a861e0500c01c362312930e6365e7350 Mon Sep 17 00:00:00 2001 From: Paolo Di Tommaso Date: Fri, 5 Dec 2025 14:41:08 +0100 Subject: [PATCH 1/6] Add wave.build.template config option MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Add support for specifying build templates in Wave container builds. This allows users to select optimized multi-stage build templates like `conda/pixi/v1` or `conda/micromamba/v2` for smaller container images. Supported templates: - conda/pixi/v1: Pixi package manager with multi-stage builds - conda/micromamba/v2: Micromamba 2.x with multi-stage builds - cran/installr/v1: R/CRAN packages using installr 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- docs/reference/config.md | 9 ++++++ docs/wave.md | 32 +++++++++++++++++++ .../plugin/SubmitContainerTokenRequest.groovy | 5 +++ .../io/seqera/wave/plugin/WaveClient.groovy | 6 ++-- .../wave/plugin/config/WaveConfig.groovy | 9 ++++++ .../wave/plugin/config/WaveConfigTest.groovy | 14 +++++++- 6 files changed, 72 insertions(+), 3 deletions(-) diff --git a/docs/reference/config.md b/docs/reference/config.md index f8e678fa45..92b1d00ae9 100644 --- a/docs/reference/config.md +++ b/docs/reference/config.md @@ -1600,6 +1600,15 @@ The following settings are available: : The container repository where images built by Wave are uploaded. : The corresponding credentials must be provided in your Seqera Platform account. +`wave.build.template` +: :::{versionadded} 25.12.0-edge + ::: +: The build template to use for container builds. Supported values: +: - `conda/pixi/v1`: Pixi package manager with multi-stage builds for optimized image sizes. +: - `conda/micromamba/v2`: Micromamba 2.x with multi-stage builds. +: - `cran/installr/v1`: R/CRAN packages using installr. +: Multi-stage templates produce smaller images by excluding build tools from the final image. + `wave.httpClient.connectTimeout` : :::{versionadded} 22.06.0-edge ::: diff --git a/docs/wave.md b/docs/wave.md index 8b53cfa772..31783d6620 100644 --- a/docs/wave.md +++ b/docs/wave.md @@ -92,6 +92,38 @@ conda.channels = 'conda-forge,bioconda' Packages from the [Python Package Index](https://pypi.org/) can also be added to a Conda `environment.yml` file. See {ref}`Conda and PyPI ` for more information. +(wave-build-templates)= + +### Build templates + +:::{versionadded} 25.12.0-edge +::: + +Wave supports different build templates for creating container images from Conda packages. Build templates control how packages are installed and how the final container image is structured. + +Multi-stage build templates (`conda/pixi/v1` and `conda/micromamba/v2`) offer several advantages: + +- **Smaller images**: Build tools and package managers are excluded from the final image (30-50% size reduction typical). +- **Reproducibility**: Lock files are generated for exact package version tracking. +- **Security**: Fewer binaries in the final image reduces the attack surface. + +To use a specific build template, add the following to your configuration: + +```groovy +wave.enabled = true +wave.strategy = ['conda'] +wave.build.template = 'conda/pixi/v1' +``` + +Available templates: + +| Template | Description | +|----------|-------------| +| (default) | Standard Micromamba v1 single-stage build. The final image includes the package manager. | +| `conda/micromamba/v2` | Multi-stage build using Micromamba 2.x. Produces smaller images without the package manager. | +| `conda/pixi/v1` | Multi-stage build using [Pixi](https://pixi.sh/) package manager. Produces smaller images with faster dependency resolution. | +| `cran/installr/v1` | Build template for R/CRAN packages using installr. | + (wave-singularity)= ### Build Singularity native images diff --git a/plugins/nf-wave/src/main/io/seqera/wave/plugin/SubmitContainerTokenRequest.groovy b/plugins/nf-wave/src/main/io/seqera/wave/plugin/SubmitContainerTokenRequest.groovy index c0d66d22fa..409f3a97de 100644 --- a/plugins/nf-wave/src/main/io/seqera/wave/plugin/SubmitContainerTokenRequest.groovy +++ b/plugins/nf-wave/src/main/io/seqera/wave/plugin/SubmitContainerTokenRequest.groovy @@ -154,4 +154,9 @@ class SubmitContainerTokenRequest { */ BuildCompression buildCompression + /** + * The build template to use for container builds + */ + String buildTemplate + } diff --git a/plugins/nf-wave/src/main/io/seqera/wave/plugin/WaveClient.groovy b/plugins/nf-wave/src/main/io/seqera/wave/plugin/WaveClient.groovy index e6f88161b5..e0b7ac5934 100644 --- a/plugins/nf-wave/src/main/io/seqera/wave/plugin/WaveClient.groovy +++ b/plugins/nf-wave/src/main/io/seqera/wave/plugin/WaveClient.groovy @@ -226,7 +226,8 @@ class WaveClient { mirror: config.mirrorMode(), scanMode: config.scanMode(), scanLevels: config.scanAllowedLevels(), - buildCompression: config.buildCompression() + buildCompression: config.buildCompression(), + buildTemplate: config.buildTemplate() ) } @@ -254,7 +255,8 @@ class WaveClient { mirror: config.mirrorMode(), scanMode: config.scanMode(), scanLevels: config.scanAllowedLevels(), - buildCompression: config.buildCompression() + buildCompression: config.buildCompression(), + buildTemplate: config.buildTemplate() ) return sendRequest(request) } diff --git a/plugins/nf-wave/src/main/io/seqera/wave/plugin/config/WaveConfig.groovy b/plugins/nf-wave/src/main/io/seqera/wave/plugin/config/WaveConfig.groovy index 7e070fd2be..bd130b1b89 100644 --- a/plugins/nf-wave/src/main/io/seqera/wave/plugin/config/WaveConfig.groovy +++ b/plugins/nf-wave/src/main/io/seqera/wave/plugin/config/WaveConfig.groovy @@ -139,6 +139,8 @@ class WaveConfig implements ConfigScope { String cacheRepository() { build.cacheRepository } + String buildTemplate() { build.template } + Duration buildMaxDuration() { build.maxDuration } BuildCompression buildCompression() { build.compression } @@ -275,6 +277,12 @@ class BuildOpts implements ConfigScope { """) final String cacheRepository + @ConfigOption + @Description(""" + The build template to use for container builds. Supported values: `conda/pixi/v1` (Pixi with multi-stage builds), `conda/micromamba/v2` (Micromamba 2.x with multi-stage builds), `cran/installr/v1` (R/CRAN packages). Default: standard conda/micromamba v1 template. + """) + final String template + final CondaOpts conda final BuildCompression compression @@ -287,6 +295,7 @@ class BuildOpts implements ConfigScope { BuildOpts(Map opts) { repository = opts.repository cacheRepository = opts.cacheRepository + template = opts.template conda = new CondaOpts(opts.conda as Map ?: Collections.emptyMap()) compression = parseCompression(opts.compression as Map) maxDuration = opts.maxDuration as Duration ?: Duration.of('40m') diff --git a/plugins/nf-wave/src/test/io/seqera/wave/plugin/config/WaveConfigTest.groovy b/plugins/nf-wave/src/test/io/seqera/wave/plugin/config/WaveConfigTest.groovy index 011ad42e04..b37207d118 100644 --- a/plugins/nf-wave/src/test/io/seqera/wave/plugin/config/WaveConfigTest.groovy +++ b/plugins/nf-wave/src/test/io/seqera/wave/plugin/config/WaveConfigTest.groovy @@ -113,6 +113,18 @@ class WaveConfigTest extends Specification { opts.cacheRepository() == 'some/cache' } + def 'should get build template' () { + when: + def opts = new WaveConfig([:]) + then: + opts.buildTemplate() == null + + when: + opts = new WaveConfig([build:[template:'conda/pixi/v1']]) + then: + opts.buildTemplate() == 'conda/pixi/v1' + } + @Unroll def 'should set strategy' () { when: @@ -185,7 +197,7 @@ class WaveConfigTest extends Specification { given: def config = new WaveConfig([enabled: true]) expect: - config.toString() == 'WaveConfig(build:BuildOpts(repository:null, cacheRepository:null, conda:CondaOpts(mambaImage=mambaorg/micromamba:1.5.10-noble; basePackages=conda-forge::procps-ng, commands=null), compression:null, maxDuration:40m), enabled:true, endpoint:https://wave.seqera.io, freeze:false, httpClient:HttpOpts(), mirror:false, retryPolicy:RetryOpts(delay:450ms, maxDelay:1m 30s, maxAttempts:5, jitter:0.25, multiplier:2.0, delayAsDuration:PT0.45S, maxDelayAsDuration:PT1M30S), scan:ScanOpts(allowedLevels:null, mode:null), strategy:[container, dockerfile, conda], bundleProjectResources:null, containerConfigUrl:[], preserveFileTimestamp:null, tokensCacheMaxDuration:30m)' + config.toString() == 'WaveConfig(build:BuildOpts(repository:null, cacheRepository:null, template:null, conda:CondaOpts(mambaImage=mambaorg/micromamba:1.5.10-noble; basePackages=conda-forge::procps-ng, commands=null), compression:null, maxDuration:40m), enabled:true, endpoint:https://wave.seqera.io, freeze:false, httpClient:HttpOpts(), mirror:false, retryPolicy:RetryOpts(delay:450ms, maxDelay:1m 30s, maxAttempts:5, jitter:0.25, multiplier:2.0, delayAsDuration:PT0.45S, maxDelayAsDuration:PT1M30S), scan:ScanOpts(allowedLevels:null, mode:null), strategy:[container, dockerfile, conda], bundleProjectResources:null, containerConfigUrl:[], preserveFileTimestamp:null, tokensCacheMaxDuration:30m)' } def 'should not allow invalid setting' () { From 6a8e47604bb8a1a47ec05161d1ac8f36933e7dd6 Mon Sep 17 00:00:00 2001 From: Paolo Di Tommaso Date: Fri, 5 Dec 2025 15:08:38 +0100 Subject: [PATCH 2/6] Clarify default build template is conda/micromamba/v1 [ci skip] --- docs/reference/config.md | 5 +++-- docs/wave.md | 4 +++- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/docs/reference/config.md b/docs/reference/config.md index 92b1d00ae9..41e47e40d3 100644 --- a/docs/reference/config.md +++ b/docs/reference/config.md @@ -1603,9 +1603,10 @@ The following settings are available: `wave.build.template` : :::{versionadded} 25.12.0-edge ::: -: The build template to use for container builds. Supported values: -: - `conda/pixi/v1`: Pixi package manager with multi-stage builds for optimized image sizes. +: The build template to use for container builds (default: `conda/micromamba/v1`). Supported values: +: - `conda/micromamba/v1`: Standard Micromamba 1.x single-stage build (default when unspecified). : - `conda/micromamba/v2`: Micromamba 2.x with multi-stage builds. +: - `conda/pixi/v1`: Pixi package manager with multi-stage builds for optimized image sizes. : - `cran/installr/v1`: R/CRAN packages using installr. : Multi-stage templates produce smaller images by excluding build tools from the final image. diff --git a/docs/wave.md b/docs/wave.md index 31783d6620..e4b51dcd29 100644 --- a/docs/wave.md +++ b/docs/wave.md @@ -119,11 +119,13 @@ Available templates: | Template | Description | |----------|-------------| -| (default) | Standard Micromamba v1 single-stage build. The final image includes the package manager. | +| `conda/micromamba/v1` | Standard Micromamba 1.x single-stage build (default when unspecified). The final image includes the package manager. | | `conda/micromamba/v2` | Multi-stage build using Micromamba 2.x. Produces smaller images without the package manager. | | `conda/pixi/v1` | Multi-stage build using [Pixi](https://pixi.sh/) package manager. Produces smaller images with faster dependency resolution. | | `cran/installr/v1` | Build template for R/CRAN packages using installr. | +When `wave.build.template` is not specified, Wave uses the standard `conda/micromamba/v1` template. + (wave-singularity)= ### Build Singularity native images From 866b35b9afc4dc93e88329cb5f567f4cb769354d Mon Sep 17 00:00:00 2001 From: Paolo Di Tommaso Date: Fri, 5 Dec 2025 15:12:05 +0100 Subject: [PATCH 3/6] Update docs/reference/config.md [ci skip] Co-authored-by: Chris Hakkaart Signed-off-by: Paolo Di Tommaso --- docs/reference/config.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/reference/config.md b/docs/reference/config.md index 41e47e40d3..360f0ded11 100644 --- a/docs/reference/config.md +++ b/docs/reference/config.md @@ -1604,7 +1604,7 @@ The following settings are available: : :::{versionadded} 25.12.0-edge ::: : The build template to use for container builds (default: `conda/micromamba/v1`). Supported values: -: - `conda/micromamba/v1`: Standard Micromamba 1.x single-stage build (default when unspecified). +: - `conda/micromamba/v1`: Standard Micromamba 1.x single-stage build. Default when unspecified. : - `conda/micromamba/v2`: Micromamba 2.x with multi-stage builds. : - `conda/pixi/v1`: Pixi package manager with multi-stage builds for optimized image sizes. : - `cran/installr/v1`: R/CRAN packages using installr. From 241529424c252a5501bc7e3f785d2477651312a0 Mon Sep 17 00:00:00 2001 From: Paolo Di Tommaso Date: Fri, 5 Dec 2025 15:12:15 +0100 Subject: [PATCH 4/6] Update docs/wave.md [ci skip] Co-authored-by: Chris Hakkaart Signed-off-by: Paolo Di Tommaso --- docs/wave.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/wave.md b/docs/wave.md index e4b51dcd29..47d93b034a 100644 --- a/docs/wave.md +++ b/docs/wave.md @@ -119,7 +119,7 @@ Available templates: | Template | Description | |----------|-------------| -| `conda/micromamba/v1` | Standard Micromamba 1.x single-stage build (default when unspecified). The final image includes the package manager. | +| `conda/micromamba/v1` | Standard Micromamba 1.x single-stage build. The final image includes the package manager. Default when unspecified. | | `conda/micromamba/v2` | Multi-stage build using Micromamba 2.x. Produces smaller images without the package manager. | | `conda/pixi/v1` | Multi-stage build using [Pixi](https://pixi.sh/) package manager. Produces smaller images with faster dependency resolution. | | `cran/installr/v1` | Build template for R/CRAN packages using installr. | From 90f979bf14b6ec678dedbff9f6331c46d1b35ae4 Mon Sep 17 00:00:00 2001 From: Paolo Di Tommaso Date: Wed, 10 Dec 2025 16:47:48 +0100 Subject: [PATCH 5/6] Fix wave.build.template format to use colon separator MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Update build template syntax from `//` to `/:` to match the Wave API specification. Examples: - conda/pixi:v1 - conda/micromamba:v1 - conda/micromamba:v2 - cran/installr:v1 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 Signed-off-by: Paolo Di Tommaso --- docs/reference/config.md | 10 +++++----- docs/wave.md | 14 +++++++------- .../io/seqera/wave/plugin/config/WaveConfig.groovy | 2 +- .../wave/plugin/config/WaveConfigTest.groovy | 4 ++-- validation/wave-tests/example6/nextflow.config | 4 ++++ 5 files changed, 19 insertions(+), 15 deletions(-) diff --git a/docs/reference/config.md b/docs/reference/config.md index 360f0ded11..623cacd51f 100644 --- a/docs/reference/config.md +++ b/docs/reference/config.md @@ -1603,11 +1603,11 @@ The following settings are available: `wave.build.template` : :::{versionadded} 25.12.0-edge ::: -: The build template to use for container builds (default: `conda/micromamba/v1`). Supported values: -: - `conda/micromamba/v1`: Standard Micromamba 1.x single-stage build. Default when unspecified. -: - `conda/micromamba/v2`: Micromamba 2.x with multi-stage builds. -: - `conda/pixi/v1`: Pixi package manager with multi-stage builds for optimized image sizes. -: - `cran/installr/v1`: R/CRAN packages using installr. +: The build template to use for container builds (default: `conda/micromamba:v1`). Supported values: +: - `conda/micromamba:v1`: Standard Micromamba 1.x single-stage build. Default when unspecified. +: - `conda/micromamba:v2`: Micromamba 2.x with multi-stage builds. +: - `conda/pixi:v1`: Pixi package manager with multi-stage builds for optimized image sizes. +: - `cran/installr:v1`: R/CRAN packages using installr. : Multi-stage templates produce smaller images by excluding build tools from the final image. `wave.httpClient.connectTimeout` diff --git a/docs/wave.md b/docs/wave.md index 47d93b034a..a4b2bd874f 100644 --- a/docs/wave.md +++ b/docs/wave.md @@ -101,7 +101,7 @@ Packages from the [Python Package Index](https://pypi.org/) can also be added to Wave supports different build templates for creating container images from Conda packages. Build templates control how packages are installed and how the final container image is structured. -Multi-stage build templates (`conda/pixi/v1` and `conda/micromamba/v2`) offer several advantages: +Multi-stage build templates (`conda/pixi:v1` and `conda/micromamba:v2`) offer several advantages: - **Smaller images**: Build tools and package managers are excluded from the final image (30-50% size reduction typical). - **Reproducibility**: Lock files are generated for exact package version tracking. @@ -112,19 +112,19 @@ To use a specific build template, add the following to your configuration: ```groovy wave.enabled = true wave.strategy = ['conda'] -wave.build.template = 'conda/pixi/v1' +wave.build.template = 'conda/pixi:v1' ``` Available templates: | Template | Description | |----------|-------------| -| `conda/micromamba/v1` | Standard Micromamba 1.x single-stage build. The final image includes the package manager. Default when unspecified. | -| `conda/micromamba/v2` | Multi-stage build using Micromamba 2.x. Produces smaller images without the package manager. | -| `conda/pixi/v1` | Multi-stage build using [Pixi](https://pixi.sh/) package manager. Produces smaller images with faster dependency resolution. | -| `cran/installr/v1` | Build template for R/CRAN packages using installr. | +| `conda/micromamba:v1` | Standard Micromamba 1.x single-stage build. The final image includes the package manager. Default when unspecified. | +| `conda/micromamba:v2` | Multi-stage build using Micromamba 2.x. Produces smaller images without the package manager. | +| `conda/pixi:v1` | Multi-stage build using [Pixi](https://pixi.sh/) package manager. Produces smaller images with faster dependency resolution. | +| `cran/installr:v1` | Build template for R/CRAN packages using installr. | -When `wave.build.template` is not specified, Wave uses the standard `conda/micromamba/v1` template. +When `wave.build.template` is not specified, Wave uses the standard `conda/micromamba:v1` template. (wave-singularity)= diff --git a/plugins/nf-wave/src/main/io/seqera/wave/plugin/config/WaveConfig.groovy b/plugins/nf-wave/src/main/io/seqera/wave/plugin/config/WaveConfig.groovy index bd130b1b89..786c999ac8 100644 --- a/plugins/nf-wave/src/main/io/seqera/wave/plugin/config/WaveConfig.groovy +++ b/plugins/nf-wave/src/main/io/seqera/wave/plugin/config/WaveConfig.groovy @@ -279,7 +279,7 @@ class BuildOpts implements ConfigScope { @ConfigOption @Description(""" - The build template to use for container builds. Supported values: `conda/pixi/v1` (Pixi with multi-stage builds), `conda/micromamba/v2` (Micromamba 2.x with multi-stage builds), `cran/installr/v1` (R/CRAN packages). Default: standard conda/micromamba v1 template. + The build template to use for container builds. Supported values: `conda/pixi:v1` (Pixi with multi-stage builds), `conda/micromamba:v2` (Micromamba 2.x with multi-stage builds), `cran/installr:v1` (R/CRAN packages). Default: standard conda/micromamba:v1 template. """) final String template diff --git a/plugins/nf-wave/src/test/io/seqera/wave/plugin/config/WaveConfigTest.groovy b/plugins/nf-wave/src/test/io/seqera/wave/plugin/config/WaveConfigTest.groovy index b37207d118..cea4fcb7f0 100644 --- a/plugins/nf-wave/src/test/io/seqera/wave/plugin/config/WaveConfigTest.groovy +++ b/plugins/nf-wave/src/test/io/seqera/wave/plugin/config/WaveConfigTest.groovy @@ -120,9 +120,9 @@ class WaveConfigTest extends Specification { opts.buildTemplate() == null when: - opts = new WaveConfig([build:[template:'conda/pixi/v1']]) + opts = new WaveConfig([build:[template:'conda/pixi:v1']]) then: - opts.buildTemplate() == 'conda/pixi/v1' + opts.buildTemplate() == 'conda/pixi:v1' } @Unroll diff --git a/validation/wave-tests/example6/nextflow.config b/validation/wave-tests/example6/nextflow.config index c757b3bb7b..b203bbe466 100644 --- a/validation/wave-tests/example6/nextflow.config +++ b/validation/wave-tests/example6/nextflow.config @@ -7,3 +7,7 @@ fusion { enabled = true } +wave { + build.template = 'conda/pixi:v1' +} + From 75a56da220931830a3beb60239c5b55707d92423 Mon Sep 17 00:00:00 2001 From: Paolo Di Tommaso Date: Wed, 10 Dec 2025 18:34:35 +0100 Subject: [PATCH 6/6] Add wave.build.conda.baseImage config option MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Paolo Di Tommaso 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 Signed-off-by: Paolo Di Tommaso --- docs/reference/config.md | 5 +++++ plugins/nf-wave/build.gradle | 4 ++-- .../seqera/wave/plugin/config/WaveConfigTest.groovy | 11 +++++++++-- 3 files changed, 16 insertions(+), 4 deletions(-) diff --git a/docs/reference/config.md b/docs/reference/config.md index 623cacd51f..bc9e7757d5 100644 --- a/docs/reference/config.md +++ b/docs/reference/config.md @@ -1587,6 +1587,11 @@ The following settings are available: ::: : Forcefully apply compression option to all layers, including already existing layers (default: `false`). +`wave.build.conda.baseImage` +: :::{versionadded} 25.12.0-edge + ::: +: The base image for the final stage in multi-stage Conda container builds (default: `ubuntu:24.04`). This option only applies when using `wave.build.template` set to `conda/micromamba:v2` or `conda/pixi:v1`. + `wave.build.conda.basePackages` : One or more Conda packages to be always added in the resulting container (default: `conda-forge::procps-ng`). diff --git a/plugins/nf-wave/build.gradle b/plugins/nf-wave/build.gradle index bf517d02d8..541c38f4e6 100644 --- a/plugins/nf-wave/build.gradle +++ b/plugins/nf-wave/build.gradle @@ -56,8 +56,8 @@ dependencies { api 'org.apache.commons:commons-compress:1.26.1' api 'com.google.code.gson:gson:2.13.1' api 'org.yaml:snakeyaml:2.2' - api 'io.seqera:wave-api:0.16.0' - api 'io.seqera:wave-utils:0.15.1' + api 'io.seqera:wave-api:1.31.1' + api 'io.seqera:wave-utils:1.31.1' testImplementation(testFixtures(project(":nextflow"))) testImplementation "org.apache.groovy:groovy:4.0.29" diff --git a/plugins/nf-wave/src/test/io/seqera/wave/plugin/config/WaveConfigTest.groovy b/plugins/nf-wave/src/test/io/seqera/wave/plugin/config/WaveConfigTest.groovy index cea4fcb7f0..e6940ac764 100644 --- a/plugins/nf-wave/src/test/io/seqera/wave/plugin/config/WaveConfigTest.groovy +++ b/plugins/nf-wave/src/test/io/seqera/wave/plugin/config/WaveConfigTest.groovy @@ -89,6 +89,7 @@ class WaveConfigTest extends Specification { def opts = new WaveConfig([:]) then: opts.condaOpts().mambaImage == 'mambaorg/micromamba:1.5.10-noble' + opts.condaOpts().baseImage == 'ubuntu:24.04' opts.condaOpts().commands == null when: @@ -96,7 +97,13 @@ class WaveConfigTest extends Specification { then: opts.condaOpts().mambaImage == 'mambaorg/foo:1' opts.condaOpts().commands == ['USER hola'] - + + when: + opts = new WaveConfig([build:[conda:[baseImage:'debian:12', mambaImage:'mambaorg/micromamba:2-amazon2023']]]) + then: + opts.condaOpts().baseImage == 'debian:12' + opts.condaOpts().mambaImage == 'mambaorg/micromamba:2-amazon2023' + } def 'should get build and cache repos' () { @@ -197,7 +204,7 @@ class WaveConfigTest extends Specification { given: def config = new WaveConfig([enabled: true]) expect: - config.toString() == 'WaveConfig(build:BuildOpts(repository:null, cacheRepository:null, template:null, conda:CondaOpts(mambaImage=mambaorg/micromamba:1.5.10-noble; basePackages=conda-forge::procps-ng, commands=null), compression:null, maxDuration:40m), enabled:true, endpoint:https://wave.seqera.io, freeze:false, httpClient:HttpOpts(), mirror:false, retryPolicy:RetryOpts(delay:450ms, maxDelay:1m 30s, maxAttempts:5, jitter:0.25, multiplier:2.0, delayAsDuration:PT0.45S, maxDelayAsDuration:PT1M30S), scan:ScanOpts(allowedLevels:null, mode:null), strategy:[container, dockerfile, conda], bundleProjectResources:null, containerConfigUrl:[], preserveFileTimestamp:null, tokensCacheMaxDuration:30m)' + config.toString() == 'WaveConfig(build:BuildOpts(repository:null, cacheRepository:null, template:null, conda:CondaOpts(mambaImage=mambaorg/micromamba:1.5.10-noble; basePackages=conda-forge::procps-ng, commands=null, baseImage=ubuntu:24.04), compression:null, maxDuration:40m), enabled:true, endpoint:https://wave.seqera.io, freeze:false, httpClient:HttpOpts(), mirror:false, retryPolicy:RetryOpts(delay:450ms, maxDelay:1m 30s, maxAttempts:5, jitter:0.25, multiplier:2.0, delayAsDuration:PT0.45S, maxDelayAsDuration:PT1M30S), scan:ScanOpts(allowedLevels:null, mode:null), strategy:[container, dockerfile, conda], bundleProjectResources:null, containerConfigUrl:[], preserveFileTimestamp:null, tokensCacheMaxDuration:30m)' } def 'should not allow invalid setting' () {