From 98f8b61b671604cc9ef946f1aab245c63d83d33c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jaime=20Mu=C3=B1oz=20Redondo?= <105782439+JaimeSeqLabs@users.noreply.github.com> Date: Wed, 11 Sep 2024 09:50:58 +0200 Subject: [PATCH] Allow setting the service account email when creating a Google Batch CE (#426) --- .sdkmanrc | 2 +- .../computeenvs/platforms/GoogleBatchPlatform.java | 13 +++++++++---- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/.sdkmanrc b/.sdkmanrc index ad28a808..d31a9537 100644 --- a/.sdkmanrc +++ b/.sdkmanrc @@ -1,3 +1,3 @@ # Enable auto-env through the sdkman_auto_env config # Add key=value pairs of SDKs to use below -java=17.0.8-graalce +java=21.0.4-graal diff --git a/src/main/java/io/seqera/tower/cli/commands/computeenvs/platforms/GoogleBatchPlatform.java b/src/main/java/io/seqera/tower/cli/commands/computeenvs/platforms/GoogleBatchPlatform.java index 0b9d9ecb..750e3664 100644 --- a/src/main/java/io/seqera/tower/cli/commands/computeenvs/platforms/GoogleBatchPlatform.java +++ b/src/main/java/io/seqera/tower/cli/commands/computeenvs/platforms/GoogleBatchPlatform.java @@ -66,10 +66,11 @@ public GoogleBatchConfig computeConfig() throws ApiException, IOException { // Advanced if (adv != null) { config - .usePrivateAddress(adv.usePrivateAddress) - .bootDiskSizeGb(adv.bootDiskSizeGb) - .headJobCpus(adv.headJobCpus) - .headJobMemoryMb(adv.headJobMemoryMb); + .usePrivateAddress(adv.usePrivateAddress) + .bootDiskSizeGb(adv.bootDiskSizeGb) + .headJobCpus(adv.headJobCpus) + .headJobMemoryMb(adv.headJobMemoryMb) + .serviceAccount(adv.serviceAccountEmail); } return config; @@ -87,5 +88,9 @@ public static class AdvancedOptions { @Option(names = {"--head-job-memory"}, description = "The number of MiB of memory reserved for the Nextflow runner job (value should be a multiple of 256MiB and from 0.5 GB to 8 GB per CPU).") public Integer headJobMemoryMb; + + @Option(names = {"--service-account-email"}, description = "The service account email address used when deploying pipeline executions with this compute environment.") + public String serviceAccountEmail; + } }