7437bb2972
Adds `airshipctl document pull` command that will check the current manifest specified by the config and download it to the config specified target path. Change-Id: I493564c056225ff1e19f5d1aecb8c187683529ec
23 lines
626 B
Go
23 lines
626 B
Go
package document
|
|
|
|
import (
|
|
"github.com/spf13/cobra"
|
|
|
|
"opendev.org/airship/airshipctl/pkg/document/pull"
|
|
"opendev.org/airship/airshipctl/pkg/environment"
|
|
)
|
|
|
|
// NewDocumentPullCommand creates a new command for pulling airship document repositories
|
|
func NewDocumentPullCommand(rootSettings *environment.AirshipCTLSettings) *cobra.Command {
|
|
settings := pull.Settings{AirshipCTLSettings: rootSettings}
|
|
documentPullCmd := &cobra.Command{
|
|
Use: "pull",
|
|
Short: "pulls documents from remote git repository",
|
|
RunE: func(cmd *cobra.Command, args []string) error {
|
|
return settings.Pull()
|
|
},
|
|
}
|
|
|
|
return documentPullCmd
|
|
}
|