Commit fa684440 authored by SWE CI's avatar SWE CI

Merge branch 'release/v0.1.6'

parents e26cf4d6 5a4febfb
Pipeline #29499 passed with stage
in 19 seconds
......@@ -15,6 +15,9 @@
package cmd
import (
"fmt"
"strings"
"git.psu.edu/k8s/devtool/config"
"git.psu.edu/k8s/devtool/environment"
"github.com/fatih/color"
......@@ -79,8 +82,14 @@ func buildCiDocker(config config.Config) error {
dockerImage := dockerRegistry + "/" + dockerRegistryNamespace + "/" + image
dockerTag := dockerImage + ":" + imageTag
dockerRootDir := "."
if idx := strings.LastIndex(dockerfile, "/"); idx != -1 {
dockerRootDir = dockerfile[:idx]
fmt.Println(dockerRootDir)
}
color.New(color.FgGreen).Printf("Building: %s\n", dockerTag)
err := environment.Run(true, "docker", "build", "-t", dockerTag, "-f", dockerfile, ".")
err := environment.Run(true, "docker", "build", "-t", dockerTag, "-f", dockerfile, dockerRootDir)
if err != nil {
return err
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment