Commit 42f3d28d authored by Christopher Harm's avatar Christopher Harm

Changing inputs to fluxhelmrelease deploy command

parent 4d87115b
Pipeline #29297 passed with stages
in 52 seconds
......@@ -42,12 +42,12 @@ func init() {
// 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", "i", "", "image tag for docker")
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")
ciCmd.MarkPersistentFlagRequired("image-tag")
// Cobra supports local flags which will only run when this command
// is called directly, e.g.:
......
......@@ -63,8 +63,7 @@ func fluxDeployCi(config config.Config) error {
for _, deployable := range config.Deployables {
image := deployable.Name
dockerImage := dockerRegistry + "/" + dockerRegistryNamespace + "/" + image
dockerTag := dockerImage + ":" + imageTag
dockerImageTag := image + ":" + imageTag
var releaseName string
if environmentSuffix == "" {
......@@ -75,7 +74,7 @@ func fluxDeployCi(config config.Config) error {
color.Blue("Updating Flux Release:", releaseName)
os.Setenv("KUBE_SERVICE_NAME", releaseName)
os.Setenv("DOCKER_IMAGE_TAG", dockerTag)
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