Commit d29774c3 authored by SWE CI's avatar SWE CI

Merge branch 'release/v0.4.0'

parents e12ee2d3 84be71d3
Pipeline #56612 passed with stage
in 25 seconds
......@@ -132,6 +132,8 @@ func build(config config.Config) error {
color.Blue("Building Application")
switch lang := config.Language; lang {
case "none":
return nil
case "java":
args := []string{"clean", "install", "-Ddependency-check.skip=true"}
if !viper.GetBool("build.runTests") {
......
......@@ -74,6 +74,14 @@ func init() {
if err != nil {
panic("invalid arg")
}
ciBuildCmd.Flags().Bool("push-only", false, "skip the build step and just push")
viper.SetDefault("push.only", false)
err = viper.BindPFlag("push.only", ciBuildCmd.Flags().Lookup("push-only"))
if err != nil {
panic("invalid arg")
}
}
func buildCiDocker(config config.Config) error {
......@@ -97,10 +105,12 @@ func buildCiDocker(config config.Config) error {
fmt.Println(dockerRootDir)
}
color.New(color.FgGreen).Printf("Building: %s\n", dockerTag)
err := environment.Run(true, "docker", "build", "-t", dockerTag, "-f", dockerfile, dockerRootDir)
if err != nil {
return err
if !viper.GetBool("push.only") {
color.New(color.FgGreen).Printf("Building: %s\n", dockerTag)
err := environment.Run(true, "docker", "build", "-t", dockerTag, "-f", dockerfile, dockerRootDir)
if err != nil {
return err
}
}
if viper.GetBool("tag.latest") {
......@@ -112,7 +122,7 @@ func buildCiDocker(config config.Config) error {
}
color.New(color.FgGreen).Printf("Pushing Docker image: %s\n", dockerTag)
err = environment.Run(true, "docker", "push", dockerImage)
err := environment.Run(true, "docker", "push", dockerImage)
if err != nil {
return err
}
......
......@@ -92,9 +92,9 @@ func initConfig() {
// If a config file is found, read it in.
if err := viper.ReadInConfig(); err == nil {
fmt.Println("Using config file:", viper.ConfigFileUsed())
// fmt.Println("Using config file:", viper.ConfigFileUsed())
} else {
color.Red(err.Error())
// color.Red(err.Error())
}
}
......
......@@ -79,6 +79,7 @@ func start(memory, cpu string) {
return
}
environment.RunRequired(true, "helm", "init", "--client-only")
environment.RunRequired(true, "helm", "repo", "add", "cm", "https://cm.qa.k8s.psu.edu")
color.Blue("Setting up Minikube environment.")
......
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