This is an automated email from the ASF dual-hosted git repository.

pcongiusti pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel-k.git


The following commit(s) were added to refs/heads/main by this push:
     new 1937e7654 rm unused arg in RunImageArgs func and update comment
1937e7654 is described below

commit 1937e7654463378123279c18aa1be4a9e9a50a46
Author: tsukasaI <[email protected]>
AuthorDate: Thu Mar 23 23:02:38 2023 +0900

    rm unused arg in RunImageArgs func and update comment
    
    Signed-off-by: tsukasaI <[email protected]>
---
 pkg/util/docker/docker.go      | 5 +----
 pkg/util/docker/docker_base.go | 4 ++--
 2 files changed, 3 insertions(+), 6 deletions(-)

diff --git a/pkg/util/docker/docker.go b/pkg/util/docker/docker.go
index 0fdf3518b..ef212a5a4 100644
--- a/pkg/util/docker/docker.go
+++ b/pkg/util/docker/docker.go
@@ -94,7 +94,6 @@ func CreateIntegrationImageDockerFile(integrationRunCmd 
*exec.Cmd, startsFromLoc
 // BuildBaseImageArgs constructs the docker command:
 //
 // docker build -f <BaseWorkingDirectory>/Dockerfile -t 
<dockerRegistry>/<BaseImageName> <BaseWorkingDirectory>.
-//
 func BuildBaseImageArgs() []string {
        return BuildImageArgs(BaseWorkingDirectory, GetBaseImagePath(), 
BaseWorkingDirectory)
 }
@@ -102,7 +101,6 @@ func BuildBaseImageArgs() []string {
 // BuildIntegrationImageArgs constructs the docker command:
 //
 // docker build -f <BaseWorkingDirectory>/Dockerfile -t <imagePath> 
<mavenWorkingDirectory>.
-//
 func BuildIntegrationImageArgs(imagePath string, mavenWorkingDirectory string) 
[]string {
        return BuildImageArgs(IntegrationWorkingDirectory, imagePath, 
mavenWorkingDirectory)
 }
@@ -110,9 +108,8 @@ func BuildIntegrationImageArgs(imagePath string, 
mavenWorkingDirectory string) [
 // RunIntegrationImageArgs constructs the docker command:
 //
 // docker run --network=<network-name> --env LAZY_ENV_VAR=value 
<dockerRegistry>/<ImageName>.
-//
 func RunIntegrationImageArgs(imagePath string) ([]string, error) {
-       return RunImageArgs(imagePath, latestTag)
+       return RunImageArgs(imagePath)
 }
 
 // GetContainerWorkspaceDir -- directory inside the container where all the 
integration files are copied.
diff --git a/pkg/util/docker/docker_base.go b/pkg/util/docker/docker_base.go
index ce4dd95ad..f297aa05b 100644
--- a/pkg/util/docker/docker_base.go
+++ b/pkg/util/docker/docker_base.go
@@ -70,10 +70,10 @@ func BuildImageArgs(dockerFileDir string, imageName string, 
sourceDir string) []
 }
 
 // RunImageArgs -- standard docker run arguments.
-func RunImageArgs(imagePath string, imageTag string) ([]string, error) {
+func RunImageArgs(imagePath string) ([]string, error) {
        // Construct the docker command:
        //
-       // docker run --network=<network-name> <image-name>:<tag>
+       // docker run --network=<network-name> --env=<env-var> 
<image-name>:latest
        //
        args := make([]string, 0)
        args = append(args, "run")

Reply via email to