deploy

package
v0.0.0-...-8f5bff0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 27, 2019 License: MIT Imports: 4 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// DeployCmd represents the deploy command
	DeployCmd = &cobra.Command{
		Use:   "deploy",
		Short: "Deploys the stack to AWS using serverless framework",
		RunE: func(cmd *cobra.Command, args []string) error {
			c, err := models.ReadDQLConfig()
			if err != nil {
				return err
			}

			if test {
				os.Setenv("GRAPH_DYNAMO_MODE", "test")

				err = helpers.CreateLambdaNetwork()
				if err != nil {
					return err
				}

				err = helpers.StartLocalDynamoDB()
				if err != nil {
					return err
				}

				c.CreateResourceTables(force)
			}

			c.MakeBuild(test)

			slsArgs := []string{"deploy", "--stage " + stage}
			if len(profile) > 0 {
				slsArgs = append(slsArgs, "--aws-profile "+profile)
			}
			return helpers.RunCmd("sls", slsArgs...)
		},
	}
)

Functions

This section is empty.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL