build

package
v0.77.4 Latest Latest
Warning

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

Go to latest
Published: Sep 24, 2024 License: Apache-2.0 Imports: 13 Imported by: 0

README

Build service

Deprecated, please use inline workflow instead.

Service Id Action Description Request Response
build load load BuildMeta for the supplied resource LoadMetaRequest LoadMetaResponse
build register register BuildMeta in service repo RegisterMetaRequest RegisterMetaResponse
build build Run build for provided specification Request Response

Documentation

Index

Constants

View Source
const (
	//ServiceID represent build service id
	ServiceID = "build"
)

deprecated - it is schedule to be removed from the service list, use inline workflow instead

Variables

This section is empty.

Functions

func New

func New() endly.Service

New creates a new build service

Types

type Goal

type Goal struct {
	Name          string               `required:"true"`
	InitTransfers *storage.CopyRequest `description:"files transfer before build command"`
	Run           *exec.ExtractRequest `required:"true"  description:"build command"`
	PostTransfers *storage.CopyRequest `description:"files transfer after build command"`
	Verify        *exec.ExtractRequest
}

Goal builds goal represents a build goal

type LoadMetaRequest

type LoadMetaRequest struct {
	Source *location.Resource `required:"true" description:"URL with build meta JSON"`
}

LoadMetaRequest represents a loading Meta request

func (*LoadMetaRequest) Validate

func (r *LoadMetaRequest) Validate() error

Validate checks if request is valid

type LoadMetaResponse

type LoadMetaResponse struct {
	Meta *Meta //url to size
}

LoadMetaResponse represents build meta response.

type Meta

type Meta struct {
	Name         string               `required:"true" description:"name of build system"`
	Goals        []*Goal              `required:"true" description:"build goals"`
	Dependencies []*deploy.Dependency `description:"deployment dependencies"`
	// contains filtered or unexported fields
}

Meta build meta provides instruction how to build an app

func (*Meta) Validate

func (m *Meta) Validate() error

Validate validates build meta.

type Request

type Request struct {
	MetaURL   string             `description:"build meta URL"`
	BuildSpec *Spec              `required:"true" description:"build specification" `
	Secrets   secret.Secrets     `` /* 178-byte string literal not displayed */
	Env       map[string]string  `description:"environmental variables"`
	Target    *location.Resource `required:"true" description:"build location, host and path" `
}

ServiceRequest represents a build request.

func (*Request) Init

func (r *Request) Init() error

Init initialises request

func (*Request) Messages

func (r *Request) Messages() []*msg.Message

Items returns tag messages

func (*Request) Validate

func (r *Request) Validate() error

Validate validates if request is valid

type Response

type Response struct {
	CommandInfo *exec.RunResponse
}

Response represents a build response.

type Spec

type Spec struct {
	Name       string `required:"true" description:"build system name, i.e go, mvn, node, yarn, build system meta is defined in meta/build/XXX"`
	Version    string `required:"true" description:"build system version"`
	Goal       string `required:"true" description:"build goal to be matched with build meta goal"`
	BuildGoal  string `required:"true" description:"actual build target, like clean, test"`
	Args       string `required:"true" description:"additional build arguments , that can be expanded with $build.args in build meta"`
	Sdk        string
	SdkVersion string
}

Spec represents build specification.

Jump to

Keyboard shortcuts

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