airshipctl/cmd/document/pull.go
Ian H. Pittwood 7437bb2972 [#13] Add document pull command
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
2020-02-12 11:01:11 -06:00

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
}