specs

package
v0.55.0 Latest Latest
Warning

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

Go to latest
Published: Jan 5, 2021 License: Apache-2.0 Imports: 30 Imported by: 1

Documentation

Index

Constants

View Source
const (
	UpstreamVersionToken = "_latest_"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type ContentProcessor added in v0.47.0

type ContentProcessor struct {
	Logger        log.Logger
	FS            afero.Afero
	AppResolver   replicatedapp.Resolver
	GitHubFetcher githubclient.GitHubFetcher
	// contains filtered or unexported fields
}

func NewContentProcessor added in v0.47.0

func NewContentProcessor(v *viper.Viper) (*ContentProcessor, error)

func (*ContentProcessor) MaybeResolveVersionedUpstream added in v0.47.0

func (c *ContentProcessor) MaybeResolveVersionedUpstream(ctx context.Context, upstream string, existingState state.State) (string, error)

MaybeResolveVersionedUpstream returns an upstream with the UpstreamVersionToken replaced with the latest version fetched from github unless the latest version is unable to be fetched or if the version stored in state is greater than the latest version. All other upstreams will be returned unmodified.

func (*ContentProcessor) ReadContentSHAForWatch added in v0.47.0

func (c *ContentProcessor) ReadContentSHAForWatch(ctx context.Context, upstream string) (string, error)

read the content sha without writing anything to state

func (*ContentProcessor) RemoveAll added in v0.47.0

func (c *ContentProcessor) RemoveAll() error

func (*ContentProcessor) ResolveBaseMetadata added in v0.47.0

func (c *ContentProcessor) ResolveBaseMetadata(upstream string, localPath string) (*api.ShipAppMetadata, error)

ResolveBaseMetadata resolves URL, ContentSHA, and Readme for the resource

type IDPatcher

type IDPatcher struct {
	Logger log.Logger
}

func NewIDPatcher

func NewIDPatcher(logger log.Logger) *IDPatcher

func (*IDPatcher) EnsureAllStepsHaveUniqueIDs

func (p *IDPatcher) EnsureAllStepsHaveUniqueIDs(lc api.Lifecycle) api.Lifecycle

type Resolver

type Resolver struct {
	Logger        log.Logger
	Client        *replicatedapp.GraphQLClient
	StateManager  state.Manager
	FS            afero.Afero
	AppResolver   replicatedapp.Resolver
	GitHubFetcher githubclient.GitHubFetcher

	Viper   *viper.Viper
	NoOutro bool
	// contains filtered or unexported fields
}

A Resolver resolves specs

func NewResolver

func NewResolver(
	v *viper.Viper,
	logger log.Logger,
	fs afero.Afero,
	graphql *replicatedapp.GraphQLClient,
	stateManager state.Manager,
	ui cli.Ui,
	determiner apptype.Inspector,
	appresolver replicatedapp.Resolver,
	github *githubclient.GithubClient,
) *Resolver

func (*Resolver) DefaultHelmRelease added in v0.20.0

func (r *Resolver) DefaultHelmRelease(chartPath string, upstream string) api.Spec

func (*Resolver) DefaultHelmUnforkRelease added in v0.27.0

func (r *Resolver) DefaultHelmUnforkRelease(upstreamAsset api.Asset, forkedAsset api.Asset) api.Spec

func (*Resolver) DefaultRawRelease added in v0.20.0

func (r *Resolver) DefaultRawRelease(basePath string) api.Spec

func (*Resolver) NewContentProcessor added in v0.47.0

func (r *Resolver) NewContentProcessor() *ContentProcessor

func (*Resolver) ResolveRelease

func (r *Resolver) ResolveRelease(ctx context.Context, upstream string) (*api.Release, error)

A resolver turns a target string into a release.

A "target string" is something like

github.com/helm/charts/stable/nginx-ingress
replicated.app/cool-ci-tool?customer_id=...&installation_id=...
file::/home/bob/apps/ship.yaml
file::/home/luke/my-charts/proton-torpedoes

func (*Resolver) ResolveUnforkRelease added in v0.27.0

func (r *Resolver) ResolveUnforkRelease(ctx context.Context, upstream string, forked string) (*api.Release, error)

Directories

Path Synopsis
local.go has methods for resolving a local ship.yaml file, and patching in api.Release info that would usually be returned by pg.replicated.com
local.go has methods for resolving a local ship.yaml file, and patching in api.Release info that would usually be returned by pg.replicated.com

Jump to

Keyboard shortcuts

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