starlark

package
v1.8.0 Latest Latest
Warning

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

Go to latest
Published: Sep 19, 2023 License: Apache-2.0 Imports: 11 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Command = cli.Command{
	Name:      "starlark",
	Usage:     "generate .drone.yml from starlark",
	ArgsUsage: "[path/to/.drone.star]",
	Action: func(c *cli.Context) {
		if err := generate(c); err != nil {
			if err, ok := err.(*starlark.EvalError); ok {
				log.Fatalf("starlark evaluation error:\n%s", err.Backtrace())
			}
			log.Fatalln(err)
		}
	},
	Flags: []cli.Flag{
		cli.StringFlag{
			Name:  "source",
			Usage: "Source file",
			Value: ".drone.star",
		},
		cli.StringFlag{
			Name:  "target",
			Usage: "target file",
			Value: ".drone.yml",
		},
		cli.BoolFlag{
			Name:  "format",
			Usage: "Write output as formatted YAML",
		},
		cli.BoolFlag{
			Name:  "stdout",
			Usage: "Write output to stdout",
		},
		cli.Uint64Flag{
			Name:  "max-execution-steps",
			Usage: "maximum number of execution steps",
			Value: 50000,
		},

		cli.StringFlag{
			Name:  "repo.name",
			Usage: "repository name",
		},
		cli.StringFlag{
			Name:  "repo.namespace",
			Usage: "repository namespace",
		},
		cli.StringFlag{
			Name:  "repo.slug",
			Usage: "repository slug",
		},

		cli.StringFlag{
			Name:  "build.event",
			Usage: "build event",
			Value: "push",
		},
		cli.StringFlag{
			Name:  "build.branch",
			Usage: "build branch",
			Value: "master",
		},
		cli.StringFlag{
			Name:  "build.source",
			Usage: "build source branch",
			Value: "master",
		},
		cli.StringFlag{
			Name:  "build.source_repo",
			Usage: "repo slug of source repository",
		},
		cli.StringFlag{
			Name:  "build.target",
			Usage: "build target branch",
			Value: "master",
		},
		cli.StringFlag{
			Name:  "build.ref",
			Usage: "build ref",
			Value: "refs/heads/master",
		},
		cli.StringFlag{
			Name:  "build.commit",
			Usage: "build commit sha",
		},
		cli.StringFlag{
			Name:  "build.message",
			Usage: "build commit message",
		},
		cli.StringFlag{
			Name:  "build.title",
			Usage: "build title",
		},
		cli.StringFlag{
			Name:  "build.link",
			Usage: "build link",
		},
		cli.StringFlag{
			Name:  "build.environment",
			Usage: "build environment",
		},
		cli.BoolTFlag{
			Name:  "build.debug",
			Usage: "debug build",
		},
	},
}

Command exports the jsonnet command.

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