From 2b861aa868a9764b775a4ee6ee7cf02bb93e202a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Mathieu?= Date: Thu, 8 Aug 2024 13:06:34 +0200 Subject: [PATCH] fix: use containerImage istead of DEFAULT_IMAGE when no image in options --- .../src/main/java/io/kestra/plugin/scripts/julia/Commands.java | 2 +- .../src/main/java/io/kestra/plugin/scripts/julia/Script.java | 2 +- .../src/main/java/io/kestra/plugin/scripts/node/Commands.java | 2 +- .../src/main/java/io/kestra/plugin/scripts/node/Script.java | 2 +- .../main/java/io/kestra/plugin/scripts/powershell/Commands.java | 2 +- .../main/java/io/kestra/plugin/scripts/powershell/Script.java | 2 +- .../src/main/java/io/kestra/plugin/scripts/python/Commands.java | 2 +- .../src/main/java/io/kestra/plugin/scripts/python/Script.java | 2 +- .../src/main/java/io/kestra/plugin/scripts/r/Commands.java | 2 +- .../src/main/java/io/kestra/plugin/scripts/r/Script.java | 2 +- .../src/main/java/io/kestra/plugin/scripts/ruby/Commands.java | 2 +- .../src/main/java/io/kestra/plugin/scripts/ruby/Script.java | 2 +- .../src/main/java/io/kestra/plugin/scripts/shell/Commands.java | 2 +- .../src/main/java/io/kestra/plugin/scripts/shell/Script.java | 2 +- 14 files changed, 14 insertions(+), 14 deletions(-) diff --git a/plugin-script-julia/src/main/java/io/kestra/plugin/scripts/julia/Commands.java b/plugin-script-julia/src/main/java/io/kestra/plugin/scripts/julia/Commands.java index 2a96f11..b311427 100644 --- a/plugin-script-julia/src/main/java/io/kestra/plugin/scripts/julia/Commands.java +++ b/plugin-script-julia/src/main/java/io/kestra/plugin/scripts/julia/Commands.java @@ -65,7 +65,7 @@ public class Commands extends AbstractExecScript { protected DockerOptions injectDefaults(DockerOptions original) { var builder = original.toBuilder(); if (original.getImage() == null) { - builder.image(DEFAULT_IMAGE); + builder.image(this.getContainerImage()); } return builder.build(); diff --git a/plugin-script-julia/src/main/java/io/kestra/plugin/scripts/julia/Script.java b/plugin-script-julia/src/main/java/io/kestra/plugin/scripts/julia/Script.java index f2e5f90..87bb0c3 100644 --- a/plugin-script-julia/src/main/java/io/kestra/plugin/scripts/julia/Script.java +++ b/plugin-script-julia/src/main/java/io/kestra/plugin/scripts/julia/Script.java @@ -69,7 +69,7 @@ public class Script extends AbstractExecScript { protected DockerOptions injectDefaults(DockerOptions original) { var builder = original.toBuilder(); if (original.getImage() == null) { - builder.image(DEFAULT_IMAGE); + builder.image(this.getContainerImage()); } return builder.build(); diff --git a/plugin-script-node/src/main/java/io/kestra/plugin/scripts/node/Commands.java b/plugin-script-node/src/main/java/io/kestra/plugin/scripts/node/Commands.java index 06a3c1e..500f543 100644 --- a/plugin-script-node/src/main/java/io/kestra/plugin/scripts/node/Commands.java +++ b/plugin-script-node/src/main/java/io/kestra/plugin/scripts/node/Commands.java @@ -62,7 +62,7 @@ public class Commands extends AbstractExecScript { protected DockerOptions injectDefaults(DockerOptions original) { var builder = original.toBuilder(); if (original.getImage() == null) { - builder.image(DEFAULT_IMAGE); + builder.image(this.getContainerImage()); } return builder.build(); diff --git a/plugin-script-node/src/main/java/io/kestra/plugin/scripts/node/Script.java b/plugin-script-node/src/main/java/io/kestra/plugin/scripts/node/Script.java index 2a3be1c..651e409 100644 --- a/plugin-script-node/src/main/java/io/kestra/plugin/scripts/node/Script.java +++ b/plugin-script-node/src/main/java/io/kestra/plugin/scripts/node/Script.java @@ -127,7 +127,7 @@ public class Script extends AbstractExecScript { protected DockerOptions injectDefaults(DockerOptions original) { var builder = original.toBuilder(); if (original.getImage() == null) { - builder.image(DEFAULT_IMAGE); + builder.image(this.getContainerImage()); } return builder.build(); diff --git a/plugin-script-powershell/src/main/java/io/kestra/plugin/scripts/powershell/Commands.java b/plugin-script-powershell/src/main/java/io/kestra/plugin/scripts/powershell/Commands.java index c698f75..faa5ba9 100644 --- a/plugin-script-powershell/src/main/java/io/kestra/plugin/scripts/powershell/Commands.java +++ b/plugin-script-powershell/src/main/java/io/kestra/plugin/scripts/powershell/Commands.java @@ -67,7 +67,7 @@ public class Commands extends AbstractExecScript { protected DockerOptions injectDefaults(DockerOptions original) { var builder = original.toBuilder(); if (original.getImage() == null) { - builder.image(DEFAULT_IMAGE); + builder.image(this.getContainerImage()); } if (original.getEntryPoint() == null) { builder.entryPoint(Collections.emptyList()); diff --git a/plugin-script-powershell/src/main/java/io/kestra/plugin/scripts/powershell/Script.java b/plugin-script-powershell/src/main/java/io/kestra/plugin/scripts/powershell/Script.java index e7e8703..7c936e9 100644 --- a/plugin-script-powershell/src/main/java/io/kestra/plugin/scripts/powershell/Script.java +++ b/plugin-script-powershell/src/main/java/io/kestra/plugin/scripts/powershell/Script.java @@ -80,7 +80,7 @@ public class Script extends AbstractExecScript { protected DockerOptions injectDefaults(DockerOptions original) { var builder = original.toBuilder(); if (original.getImage() == null) { - builder.image(DEFAULT_IMAGE); + builder.image(this.getContainerImage()); } return builder.build(); diff --git a/plugin-script-python/src/main/java/io/kestra/plugin/scripts/python/Commands.java b/plugin-script-python/src/main/java/io/kestra/plugin/scripts/python/Commands.java index 6ba1d90..a5790b4 100644 --- a/plugin-script-python/src/main/java/io/kestra/plugin/scripts/python/Commands.java +++ b/plugin-script-python/src/main/java/io/kestra/plugin/scripts/python/Commands.java @@ -245,7 +245,7 @@ public class Commands extends AbstractExecScript { protected DockerOptions injectDefaults(DockerOptions original) { var builder = original.toBuilder(); if (original.getImage() == null) { - builder.image(DEFAULT_IMAGE); + builder.image(this.getContainerImage()); } return builder.build(); diff --git a/plugin-script-python/src/main/java/io/kestra/plugin/scripts/python/Script.java b/plugin-script-python/src/main/java/io/kestra/plugin/scripts/python/Script.java index bc0faed..36bc648 100644 --- a/plugin-script-python/src/main/java/io/kestra/plugin/scripts/python/Script.java +++ b/plugin-script-python/src/main/java/io/kestra/plugin/scripts/python/Script.java @@ -116,7 +116,7 @@ public class Script extends AbstractExecScript { protected DockerOptions injectDefaults(DockerOptions original) { var builder = original.toBuilder(); if (original.getImage() == null) { - builder.image(DEFAULT_IMAGE); + builder.image(this.getContainerImage()); } return builder.build(); diff --git a/plugin-script-r/src/main/java/io/kestra/plugin/scripts/r/Commands.java b/plugin-script-r/src/main/java/io/kestra/plugin/scripts/r/Commands.java index 95b3832..c6ca7e1 100644 --- a/plugin-script-r/src/main/java/io/kestra/plugin/scripts/r/Commands.java +++ b/plugin-script-r/src/main/java/io/kestra/plugin/scripts/r/Commands.java @@ -63,7 +63,7 @@ public class Commands extends AbstractExecScript { protected DockerOptions injectDefaults(DockerOptions original) { var builder = original.toBuilder(); if (original.getImage() == null) { - builder.image(DEFAULT_IMAGE); + builder.image(this.getContainerImage()); } return builder.build(); diff --git a/plugin-script-r/src/main/java/io/kestra/plugin/scripts/r/Script.java b/plugin-script-r/src/main/java/io/kestra/plugin/scripts/r/Script.java index c1edf5f..101ab60 100644 --- a/plugin-script-r/src/main/java/io/kestra/plugin/scripts/r/Script.java +++ b/plugin-script-r/src/main/java/io/kestra/plugin/scripts/r/Script.java @@ -119,7 +119,7 @@ public class Script extends AbstractExecScript { protected DockerOptions injectDefaults(DockerOptions original) { var builder = original.toBuilder(); if (original.getImage() == null) { - builder.image(DEFAULT_IMAGE); + builder.image(this.getContainerImage()); } return builder.build(); diff --git a/plugin-script-ruby/src/main/java/io/kestra/plugin/scripts/ruby/Commands.java b/plugin-script-ruby/src/main/java/io/kestra/plugin/scripts/ruby/Commands.java index 1d3b680..fb7416d 100644 --- a/plugin-script-ruby/src/main/java/io/kestra/plugin/scripts/ruby/Commands.java +++ b/plugin-script-ruby/src/main/java/io/kestra/plugin/scripts/ruby/Commands.java @@ -98,7 +98,7 @@ public class Commands extends AbstractExecScript { protected DockerOptions injectDefaults(DockerOptions original) { var builder = original.toBuilder(); if (original.getImage() == null) { - builder.image(DEFAULT_IMAGE); + builder.image(this.getContainerImage()); } return builder.build(); diff --git a/plugin-script-ruby/src/main/java/io/kestra/plugin/scripts/ruby/Script.java b/plugin-script-ruby/src/main/java/io/kestra/plugin/scripts/ruby/Script.java index 8ced53b..90e6b94 100644 --- a/plugin-script-ruby/src/main/java/io/kestra/plugin/scripts/ruby/Script.java +++ b/plugin-script-ruby/src/main/java/io/kestra/plugin/scripts/ruby/Script.java @@ -104,7 +104,7 @@ public class Script extends AbstractExecScript { protected DockerOptions injectDefaults(DockerOptions original) { var builder = original.toBuilder(); if (original.getImage() == null) { - builder.image(DEFAULT_IMAGE); + builder.image(this.getContainerImage()); } return builder.build(); diff --git a/plugin-script-shell/src/main/java/io/kestra/plugin/scripts/shell/Commands.java b/plugin-script-shell/src/main/java/io/kestra/plugin/scripts/shell/Commands.java index d007067..ca9bd5d 100644 --- a/plugin-script-shell/src/main/java/io/kestra/plugin/scripts/shell/Commands.java +++ b/plugin-script-shell/src/main/java/io/kestra/plugin/scripts/shell/Commands.java @@ -109,7 +109,7 @@ public class Commands extends AbstractExecScript { protected DockerOptions injectDefaults(DockerOptions original) { var builder = original.toBuilder(); if (original.getImage() == null) { - builder.image(DEFAULT_IMAGE); + builder.image(this.getContainerImage()); } return builder.build(); diff --git a/plugin-script-shell/src/main/java/io/kestra/plugin/scripts/shell/Script.java b/plugin-script-shell/src/main/java/io/kestra/plugin/scripts/shell/Script.java index 947349a..72b4da6 100644 --- a/plugin-script-shell/src/main/java/io/kestra/plugin/scripts/shell/Script.java +++ b/plugin-script-shell/src/main/java/io/kestra/plugin/scripts/shell/Script.java @@ -83,7 +83,7 @@ public class Script extends AbstractExecScript { protected DockerOptions injectDefaults(DockerOptions original) { var builder = original.toBuilder(); if (original.getImage() == null) { - builder.image(DEFAULT_IMAGE); + builder.image(this.getContainerImage()); } return builder.build();