Commit b40f81b5 authored by SWE CI's avatar SWE CI

Merge branch 'release/v0.1.3'

parents 69f144b2 c57b15ef
Pipeline #29330 passed with stage
in 19 seconds
......@@ -18,8 +18,6 @@ import (
"github.com/spf13/cobra"
)
var dockerRegistry string
var dockerRegistryNamespace string
var imageTag string
var environmentSuffix string
......@@ -40,13 +38,9 @@ func init() {
// Cobra supports Persistent Flags which will work for this command
// and all subcommands, e.g.:
// configCmd.PersistentFlags().String("foo", "", "A help for foo")
ciCmd.PersistentFlags().StringVarP(&dockerRegistry, "registry", "r", "", "url of the docker registry")
ciCmd.PersistentFlags().StringVarP(&dockerRegistryNamespace, "registry-namespace", "n", "", "namespace in the docker registry")
ciCmd.PersistentFlags().StringVarP(&imageTag, "image-tag", "i", "", "image tag for docker")
ciCmd.PersistentFlags().StringVarP(&environmentSuffix, "environment", "e", "", "environment suffix to append to helm release name")
ciCmd.MarkPersistentFlagRequired("registry")
ciCmd.MarkPersistentFlagRequired("registry-namespace")
ciCmd.MarkPersistentFlagRequired("image-tag")
// Cobra supports local flags which will only run when this command
......
......@@ -21,6 +21,9 @@ import (
"github.com/spf13/cobra"
)
var dockerRegistry string
var dockerRegistryNamespace string
// buildCmd represents the build command
var ciBuildCmd = &cobra.Command{
Use: "build",
......@@ -53,7 +56,11 @@ func init() {
// Cobra supports local flags which will only run when this command
// is called directly, e.g.:
// buildCmd.Flags().BoolP("toggle", "t", false, "Help message for toggle")
ciBuildCmd.Flags().StringVarP(&dockerRegistry, "registry", "r", "", "url of the docker registry")
ciBuildCmd.Flags().StringVarP(&dockerRegistryNamespace, "registry-namespace", "n", "", "namespace in the docker registry")
ciBuildCmd.MarkFlagRequired("registry")
ciBuildCmd.MarkFlagRequired("registry-namespace")
}
func buildCiDocker(config config.Config) error {
......
......@@ -63,8 +63,6 @@ func fluxDeployCi(config config.Config) error {
for _, deployable := range config.Deployables {
image := deployable.Name
dockerImageTag := image + ":" + imageTag
var releaseName string
if environmentSuffix == "" {
releaseName = deployable.Name
......@@ -74,7 +72,6 @@ func fluxDeployCi(config config.Config) error {
color.Blue("Updating Flux Release:", releaseName)
os.Setenv("KUBE_SERVICE_NAME", releaseName)
os.Setenv("DOCKER_IMAGE_TAG", dockerImageTag)
os.Setenv("CI_PROJECT_NAME", image)
err := environment.Run(true, "fluxhelmrelease")
......
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