Skip to content
Snippets Groups Projects
Commit 1c530865 authored by Andy Cobaugh's avatar Andy Cobaugh
Browse files

ci: move image-tag back up to the ci subcommand, mark as required for build and deploy subcommands

parent 387c86a6
No related branches found
No related tags found
No related merge requests found
Pipeline #106281 waiting for manual action
......@@ -54,6 +54,7 @@ func init() {
// and all subcommands, e.g.:
// configCmd.PersistentFlags().String("foo", "", "A help for foo")
ciCmd.PersistentFlags().StringVarP(&environmentSuffix, "environment", "e", "", "environment suffix to append to helm release name")
ciCmd.PersistentFlags().StringVarP(&imageTag, "image-tag", "i", "", "image tag for docker")
// Cobra supports local flags which will only run when this command
// is called directly, e.g.:
......
......@@ -82,7 +82,6 @@ func init() {
panic("invalid arg")
}
ciBuildCmd.PersistentFlags().StringVarP(&imageTag, "image-tag", "i", "", "image tag for docker")
err = ciBuildCmd.MarkPersistentFlagRequired("image-tag")
if err != nil {
panic("invalid arg")
......
......@@ -40,17 +40,12 @@ var ciDeployCmd = &cobra.Command{
}
func init() {
ciCmd.AddCommand(ciDeployCmd)
// Here you will define your flags and configuration settings.
// Cobra supports Persistent Flags which will work for this command
// and all subcommands, e.g.:
// buildCmd.PersistentFlags().String("foo", "", "A help for foo")
err := ciDeployCmd.MarkPersistentFlagRequired("image-tag")
if err != nil {
panic("invalid arg")
}
// 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")
ciCmd.AddCommand(ciDeployCmd)
}
func fluxDeployCi(config config.Config) error {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment