ci

package
v0.39.3 Latest Latest
Warning

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

Go to latest
Published: May 2, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// KafkaImage is the image used for kafka.
	KafkaImage = "bitnami/kafka:3.5.1"
	// GolangImage is the image used for golang execution.
	GolangImage = "golang:1.21.4"
	// LinterImage is the image used for linter.
	LinterImage = "golangci/golangci-lint:v1.55"
	// NATSImage is the image used for NATS.
	NATSImage = "nats:2.10"
)
View Source
const (
	// DockerImageName is the name of the docker image.
	DockerImageName = "lerenn/asyncapi-codegen"
)

Variables

View Source
var (
	// DefaultRunnerType is the default runner type to use in case of doubt.
	DefaultRunnerType = RunnerType{
		OS:              "linux",
		Arch:            "amd64",
		BuildBaseImage:  "golang:alpine",
		TargetBaseImage: "alpine",
	}
)

Functions

func BindBrokers

func BindBrokers(brokers map[string]*dagger.Service) func(r *dagger.Container) *dagger.Container

BindBrokers is used as a helper to bind brokers to a container.

func BrokerKafka

func BrokerKafka(client *dagger.Client) *dagger.Service

BrokerKafka returns a service for the Kafka broker.

func BrokerKafkaSecure added in v0.36.0

func BrokerKafkaSecure(client *dagger.Client) *dagger.Service

BrokerKafkaSecure returns a service for the Kafka broker secured with TLS.

func BrokerKafkaSecureBasicAuth added in v0.36.0

func BrokerKafkaSecureBasicAuth(client *dagger.Client) *dagger.Service

BrokerKafkaSecureBasicAuth returns a service for the Kafka broker secured with TLS and basic auth.

func BrokerNATS

func BrokerNATS(client *dagger.Client) *dagger.Service

BrokerNATS returns a service for the NATS broker.

func BrokerNATSJetstream

func BrokerNATSJetstream(client *dagger.Client) *dagger.Service

BrokerNATSJetstream returns a service for the NATS broker.

func BrokerNATSJetstreamSecure added in v0.36.0

func BrokerNATSJetstreamSecure(client *dagger.Client) *dagger.Service

BrokerNATSJetstreamSecure returns a service for the NATS broker secured with TLS.

func BrokerNATSJetstreamSecureBasicAuth added in v0.36.0

func BrokerNATSJetstreamSecureBasicAuth(client *dagger.Client) *dagger.Service

BrokerNATSJetstreamSecureBasicAuth returns a service for the NATS broker secured with TLS and basic auth user: user password: password.

func BrokerNATSSecure added in v0.36.0

func BrokerNATSSecure(client *dagger.Client) *dagger.Service

BrokerNATSSecure returns a service for the NATS broker secured with TLS.

func BrokerNATSSecureBasicAuth added in v0.36.0

func BrokerNATSSecureBasicAuth(client *dagger.Client) *dagger.Service

BrokerNATSSecureBasicAuth returns a service for the NATS broker secured with TLS and basic auth user: user password: password.

func Brokers

func Brokers(client *dagger.Client) map[string]*dagger.Service

Brokers returns a map of containers for each broker as service.

func Examples

func Examples(client *dagger.Client, brokers map[string]*dagger.Service) map[string]*dagger.Container

Examples returns a container that runs all examples.

func Generator

func Generator(client *dagger.Client) func(ctx context.Context) error

Generator returns a container that generates code.

func Linter

func Linter(client *dagger.Client) *dagger.Container

Linter returns a container that runs the linter.

func Publish

func Publish(ctx context.Context, client *dagger.Client, tag string) error

Publish should publish tag on git repository and docker image(s) on Docker Hub Note: if this is not 'main' branch, then it will just push docker image with git tag.

func RunnerFromDockerfile

func RunnerFromDockerfile(client *dagger.Client, rt RunnerType) *dagger.Container

RunnerFromDockerfile returns a dagger container based on the repository Dockerfile.

func Tests

func Tests(client *dagger.Client, brokers map[string]*dagger.Service, path string) *dagger.Container

Tests returns containers for all tests.

Types

type RunnerType added in v0.33.6

type RunnerType struct {
	OS              string
	Arch            string
	BuildBaseImage  string
	TargetBaseImage string
}

RunnerType represents the type of runner based on various info.

Jump to

Keyboard shortcuts

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