targets

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Sep 11, 2020 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Bootstrap

func Bootstrap(ctx context.Context) error

Bootstrap installs any required tooling/setup enabling a user to build and deploy Cape locally for development and testing.

func Check

func Check(ctx context.Context) error

Check checks whether or not the environment contains all of the required dependencies to bootstrap, test, build, and deploy Cape locally.

func Clean

func Clean(ctx context.Context) error

Clean removes any installed tools, modules, or build artifacts created by any targets.

This command will remove 'Magefile' which will need to be installed again if you run it multiple times via the bootstrap.go command.

Types

type Build

type Build mg.Namespace

func (Build) Binary

func (b Build) Binary(ctx context.Context) error

Binary builds the Cape binary and makes it available for a use locally or to be packaged up for a release.

Set the GOOS and GOARCH environment variables to change the target platform of the built artifact.

func (Build) Docker

func (b Build) Docker(ctx context.Context) error

Docker builds all of the cape docker containers

func (Build) Generate

func (b Build) Generate(ctx context.Context) error

Generate generates any required files to build the binary (GraphQL, gRPC, Protobuf)

type Local

type Local mg.Namespace

func (Local) Create

func (l Local) Create(ctx context.Context) error

Create creates a local kubernetes cluster, builds the required docker images, and then deploys their subsequent helm packages into the cluster.

func (Local) Deploy

func (l Local) Deploy(ctx context.Context) error

Deploy builds and deploys cape from your local repository to the local kubernetes cluster. If a cluster is not running one will be created.

func (Local) Destroy

func (l Local) Destroy(ctx context.Context) error

Destroy deletes the kubernetes clusters and any managed volumes completely erasing anything related to the local deployment

func (Local) DestroyAll

func (l Local) DestroyAll(ctx context.Context) error

DestroyAll destroys everything in destroy (i.e. kind) plus the docker registry

func (Local) Push

func (l Local) Push(ctx context.Context) error

Push builds and pushes new docker containers

func (Local) Setup

func (l Local) Setup(ctx context.Context) error

Setup deploys the cluster and then configures it

func (Local) Status

func (l Local) Status(ctx context.Context) error

Status returns the current status of the kubernetes cluster, services, and jobs that are deployed by cape into the local cape cluster.

type Test

type Test mg.Namespace

func (Test) All

func (t Test) All(ctx context.Context) error

All runs the entire test suite (lint, unit and integration tests)

func (Test) CI

func (t Test) CI(ctx context.Context) error

CI runs the full test suite that is run during continuous integration

func (Test) Integration

func (t Test) Integration(ctx context.Context) error

Integration runs the integration portion of the test suite (requires Postgres)

func (Test) Lint

func (t Test) Lint(ctx context.Context) error

Lint runs only the code linting portion of the test suite

func (Test) Tidy

func (t Test) Tidy(ctx context.Context) error

Tidy runs `go mod tidy` and then checks for changes in `go.mod` and `go.sum` to ensure that go.mod and go.sum are up to date.

func (Test) Unit

func (t Test) Unit(ctx context.Context) error

Unit runs the unit test portion of the test suite (does not require Postgres)

Jump to

Keyboard shortcuts

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