Documentation
¶
Index ¶
- func ApplyPatches(strategicMergePatch string, jsonPatches []Json6902Patch, manifests string) (string, error)
- func CloneChartFromRepo(m *Manifest, token string) (string, error)
- func GetTemplatedManifests(m *Manifest) (string, error)
- func HelmTemplate(m *Manifest) (string, error)
- func RenderCueToManifests(fileContent string) ([]string, error)
- func SplitHelmOutput(input map[string]string) map[string]string
- func TemplateChart(m *Manifest) (string, error)
- type Artifact
- type Chart
- type Cleanup
- type CleanupEvent
- type Deploy
- type GitEvent
- type GitopsStatus
- type Json6902Patch
- type Manifest
- type Release
- type ReleaseRequest
- type ReleaseStatus
- type RollbackRequest
- type Target
- type Version
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ApplyPatches ¶ added in v0.8.0
func ApplyPatches(strategicMergePatch string, jsonPatches []Json6902Patch, manifests string) (string, error)
func CloneChartFromRepo ¶
CloneChartFromRepo returns the chart location of the specified chart
func GetTemplatedManifests ¶ added in v0.8.0
func HelmTemplate ¶
HelmTemplate returns Kubernetes yaml from the Gimlet Manifest format
func RenderCueToManifests ¶ added in v0.8.0
func SplitHelmOutput ¶
SplitHelmOutput splits helm's multifile string output into file paths and their content
func TemplateChart ¶ added in v0.8.0
Types ¶
type Artifact ¶
type Artifact struct { ID string `json:"id,omitempty"` Created int64 `json:"created,omitempty"` // The releasable version Version Version `json:"version,omitempty"` // Arbitrary environment variables from CI Context map[string]string `json:"context,omitempty"` // The complete set of Gimlet environments from the Gimlet environment files Environments []*Manifest `json:"environments,omitempty"` // The complete set of Gimlet environments from the Gimlet environment files CueEnvironments []string `json:"cueEnvironments,omitempty"` // CI job information, test results, Docker image information, etc Items []map[string]interface{} `json:"items,omitempty"` }
Artifact that contains all metadata that can be later used for releasing and auditing
func (*Artifact) CueEnvironmentsToManifests ¶ added in v0.8.0
func (*Artifact) HasCleanupPolicy ¶ added in v0.5.0
type Cleanup ¶ added in v0.5.0
type Cleanup struct { AppToCleanup string `yaml:"app" json:"app"` Event CleanupEvent `yaml:"event" json:"event"` Branch string `yaml:"branch,omitempty" json:"branch,omitempty"` }
type CleanupEvent ¶ added in v0.5.0
type CleanupEvent int
CleanupEvent represents events that cause an app instance cleanup
const ( // BranchDeleted indicates if a git branch is deleted BranchDeleted CleanupEvent = iota )
func (CleanupEvent) MarshalJSON ¶ added in v0.5.0
func (s CleanupEvent) MarshalJSON() ([]byte, error)
MarshalJSON marshals the enum as a quoted json string
func (CleanupEvent) MarshalYAML ¶ added in v0.5.0
func (s CleanupEvent) MarshalYAML() (interface{}, error)
MarshalYAML marshals the enum as a quoted yaml string
func (CleanupEvent) String ¶ added in v0.5.0
func (s CleanupEvent) String() string
func (*CleanupEvent) UnmarshalJSON ¶ added in v0.5.0
func (s *CleanupEvent) UnmarshalJSON(b []byte) error
UnmarshalJSON unmarshalls a quoted json string to the enum value
func (*CleanupEvent) UnmarshalYAML ¶ added in v0.5.0
func (s *CleanupEvent) UnmarshalYAML(n *yaml.Node) error
UnmarshalYAML unmarshalls a quoted yaml string to the enum value
type GitEvent ¶
type GitEvent int
GitEvent represents the git event that produced the artifact
func (GitEvent) MarshalJSON ¶
MarshalJSON marshals the enum as a quoted json string
func (GitEvent) MarshalYAML ¶
MarshalYAML marshals the enum as a quoted yaml string
func (*GitEvent) UnmarshalJSON ¶
UnmarshalJSON unmarshalls a quoted json string to the enum value
func (*GitEvent) UnmarshalYAML ¶
UnmarshalYAML unmarshalls a quoted yaml string to the enum value
type GitopsStatus ¶ added in v0.4.0
type GitopsStatus struct { Hash string `json:"hash,omitempty"` Status string `json:"status,omitempty"` StatusDesc string `json:"statusDesc,omitempty"` }
GitopsStatus holds the gitops references that were created based on an event
type Json6902Patch ¶ added in v0.8.0
type Manifest ¶
type Manifest struct { App string `yaml:"app" json:"app"` Env string `yaml:"env" json:"env"` Namespace string `yaml:"namespace" json:"namespace"` Deploy *Deploy `yaml:"deploy,omitempty" json:"deploy,omitempty"` Cleanup *Cleanup `yaml:"cleanup,omitempty" json:"cleanup,omitempty"` Chart Chart `yaml:"chart" json:"chart"` Values map[string]interface{} `yaml:"values" json:"values"` StrategicMergePatches string `yaml:"strategicMergePatches" json:"strategicMergePatches"` Json6902Patches []Json6902Patch `yaml:"json6902Patches" json:"json6902Patches"` Manifests string `yaml:"manifests" json:"manifests"` }
type Release ¶
type Release struct { App string `json:"app"` Env string `json:"env"` ArtifactID string `json:"artifactId"` TriggeredBy string `json:"triggeredBy"` Version *Version `json:"version"` GitopsRef string `json:"gitopsRef"` GitopsRepo string `json:"gitopsRepo"` Created int64 `json:"created,omitempty"` RolledBack bool `json:"rolledBack,omitempty"` }
Release contains all metadata about a release event
type ReleaseRequest ¶
type ReleaseRequest struct { Env string `json:"env"` App string `json:"app,omitempty"` ArtifactID string `json:"artifactId"` TriggeredBy string `json:"triggeredBy"` }
ReleaseRequest contains all metadata about the release intent
type ReleaseStatus ¶ added in v0.4.0
type ReleaseStatus struct { Status string `json:"status"` StatusDesc string `json:"statusDesc"` GitopsHashes []GitopsStatus `json:"gitopsHashes"` }
type RollbackRequest ¶
type RollbackRequest struct { Env string `json:"env"` App string `json:"app"` TargetSHA string `json:"targetSHA"` TriggeredBy string `json:"triggeredBy"` }
RollbackRequest contains all metadata about the rollback intent
type Version ¶
type Version struct { RepositoryName string `json:"repositoryName,omitempty"` SHA string `json:"sha,omitempty"` Created int64 `json:"created,omitempty"` Branch string `json:"branch,omitempty"` Event GitEvent `json:"event,omitempty"` SourceBranch string `json:"sourceBranch,omitempty"` TargetBranch string `json:"targetBranch,omitempty"` Tag string `json:"tag,omitempty"` AuthorName string `json:"authorName,omitempty"` AuthorEmail string `json:"authorEmail,omitempty"` CommitterName string `json:"committerName,omitempty"` CommitterEmail string `json:"committerEmail,omitempty"` Message string `json:"message,omitempty"` URL string `json:"url,omitempty"` }