Documentation ¶
Overview ¶
Package publish defines the publish object and utilities to create daisy workflows from a publish object.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Image ¶
type Image struct { // Prefix for the image, image naming format is '${ImagePrefix}-${ImageVersion}'. // This prefix is used for source image lookup and publish image name. Prefix string `json:",omitempty"` // Image family to set for the image. Family string `json:",omitempty"` // Image description to set for the image. Description string `json:",omitempty"` // Architecture to set for the image. Architecture string `json:",omitempty"` // Licenses to add to the image. Licenses []string `json:",omitempty"` // GuestOsFeatures to add to the image. GuestOsFeatures []string `json:",omitempty"` // Ignores license validation if 403/forbidden returned IgnoreLicenseValidationIfForbidden bool `json:",omitempty"` // Optional DeprecationStatus.Obsolete entry for the image (RFC 3339). ObsoleteDate *time.Time `json:",omitempty"` // Optional ShieldedInstanceInitialState entry for secure-boot feature. ShieldedInstanceInitialState *computeAlpha.InitialStateConfig `json:",omitempty"` // RolloutPolicy entry for the image rollout policy. RolloutPolicy *computeAlpha.RolloutPolicy `json:",omitempty"` }
Image is a metadata holder for the image to be published/rollback
type Publish ¶
type Publish struct { // Name for this publish workflow, passed to Daisy as workflow name. Name string `json:",omitempty"` // Project to perform the work in, passed to Daisy as workflow project. WorkProject string `json:",omitempty"` // Project to source images from, should not be used with SourceGCSPath. SourceProject string `json:",omitempty"` // GCS path to source images from, should not be used with SourceProject. SourceGCSPath string `json:",omitempty"` // Project to publish images to. PublishProject string `json:",omitempty"` // Optional compute endpoint override ComputeEndpoint string `json:",omitempty"` // Optional period of time to keep images, any images with an create time // older than this period will be deleted. // Format consists of 2 sections, the first must parsable by // https://golang.org/pkg/time/#ParseDuration, the second is a multiplier // separated by '*'. // 24h = 1 day // 24h*7 = 1 week // 24h*7*4 = ~1 month // 24h*365 = ~1 year DeleteAfter string `json:",omitempty"` // Images to Images []*Image `json:",omitempty"` // contains filtered or unexported fields }
Publish holds info to create a daisy workflow for gce_image_publish
func CreatePublish ¶
func CreatePublish(sourceVersion, publishVersion, workProject, publishProject, sourceGCS, sourceProject, ce, path string, varMap map[string]string, imagesCache map[string][]*computeAlpha.Image) (*Publish, error)
CreatePublish creates a publish object
func CreatePublishWithTemplate ¶
func CreatePublishWithTemplate(sourceVersion, publishVersion, workProject, publishProject, sourceGCS, sourceProject, ce, template string, varMap map[string]string, imagesCache map[string][]*computeAlpha.Image) (*Publish, error)
CreatePublishWithTemplate creates a publish object without reading a template file
func (*Publish) CreateWorkflows ¶
func (p *Publish) CreateWorkflows(ctx context.Context, varMap map[string]string, regex *regexp.Regexp, rollback, skipDup, replace, noRoot bool, oauth string, rolloutStartTime time.Time, rolloutRate int, clientOptions ...option.ClientOption) ([]*daisy.Workflow, error)
CreateWorkflows creates a list of daisy workflows from the publish object
Click to show internal directories.
Click to hide internal directories.