Documentation ¶
Index ¶
- Constants
- type AppOrInfraRepoTarget
- type AppRepoTarget
- type Application
- type ApplicationTemplate
- type File
- type GitCredential
- type InfraRepoLocalDir
- func (m InfraRepoLocalDir) BaseDir() string
- func (m InfraRepoLocalDir) CommitMsgDeletion(ra ReviewApp) string
- func (m InfraRepoLocalDir) CommitMsgUpdate(ra ReviewApp) string
- func (m InfraRepoLocalDir) LatestCommitHash() string
- func (m InfraRepoLocalDir) SetLatestCommitHash(latestCommitHash string) InfraRepoLocalDir
- type InfraRepoTarget
- type JobTemplate
- type Manifests
- type ManifestsTemplate
- type PullRequest
- type PullRequests
- type ReviewApp
- func (m ReviewApp) AppRepoConfig() dreamkastv1alpha1.ReviewAppManagerSpecAppConfig
- func (m ReviewApp) AppRepoTarget() AppRepoTarget
- func (m ReviewApp) AtFilepath() string
- func (m ReviewApp) GetStatus() ReviewAppStatus
- func (m ReviewApp) HasMessageAlreadyBeenSent() bool
- func (m ReviewApp) HavingPreStopJob() bool
- func (m ReviewApp) InfraRepoConfig() dreamkastv1alpha1.ReviewAppManagerSpecInfraConfig
- func (m ReviewApp) InfraRepoTarget() InfraRepoTarget
- func (m ReviewApp) MtDirpath() string
- func (m ReviewApp) NamespaceName() types.NamespacedName
- func (m ReviewApp) PrNum() int
- func (m ReviewApp) ToReviewAppCR() *dreamkastv1alpha1.ReviewApp
- func (m ReviewApp) Variables() []string
- type ReviewAppManager
- func (m ReviewAppManager) AppRepoConfig() dreamkastv1alpha1.ReviewAppManagerSpecAppConfig
- func (m ReviewAppManager) AppRepoTarget() AppRepoTarget
- func (m ReviewAppManager) GenerateReviewApp(pr PullRequest, v Templator, f *utils.DatetimeFactory) (ReviewApp, error)
- func (m ReviewAppManager) InfraRepoConfig() dreamkastv1alpha1.ReviewAppManagerSpecInfraConfig
- func (m ReviewAppManager) InfraRepoTarget() InfraRepoTarget
- func (m ReviewAppManager) IsPullRequestAlreadySynced(pr PullRequest) bool
- func (m ReviewAppManager) ListOutOfSyncReviewAppName(prs []PullRequest) []string
- func (m ReviewAppManager) NamespaceName() types.NamespacedName
- func (m ReviewAppManager) ReviewAppName(pr PullRequest) string
- func (m ReviewAppManager) ToReviewAppCR() *dreamkastv1alpha1.ReviewAppManager
- func (m ReviewAppManager) Variables() []string
- type ReviewAppOrReviewAppManager
- type ReviewAppStatus
- func (m ReviewAppStatus) HasApplicationBeenUpdated(hash string) bool
- func (m ReviewAppStatus) UpdateStatusOfAppRepo(pr PullRequest) (ReviewAppStatus, bool)
- func (m ReviewAppStatus) UpdateStatusOfApplication(application Application) (ReviewAppStatus, bool, error)
- func (m ReviewAppStatus) WasManifestsUpdated(manifests Manifests) bool
- type Templator
Constants ¶
View Source
const ( AnnotationAppOrgNameForArgoCDApplication = "dreamkast.cloudnativedays.jp/app-organization" AnnotationAppRepoNameForArgoCDApplication = "dreamkast.cloudnativedays.jp/app-repository" AnnotationAppCommitHashForArgoCDApplication = "dreamkast.cloudnativedays.jp/app-commit-hash" )
View Source
const (
LabelReviewAppNameForJob = "dreamkast.cloudnativedays.jp/parent-reviewapp"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AppOrInfraRepoTarget ¶
type AppOrInfraRepoTarget interface {
GitSecretSelector() (*corev1.SecretKeySelector, error)
}
type AppRepoTarget ¶
type AppRepoTarget dreamkastv1alpha1.ReviewAppManagerSpecAppTarget
func (AppRepoTarget) GitSecretSelector ¶
func (m AppRepoTarget) GitSecretSelector() (*corev1.SecretKeySelector, error)
type Application ¶
type Application string
func (Application) Annotation ¶
func (m Application) Annotation(annotationKey string) (string, error)
func (Application) NamespacedName ¶
func (m Application) NamespacedName() (types.NamespacedName, error)
func (Application) SetSomeAnnotations ¶
func (m Application) SetSomeAnnotations(ra ReviewApp) (Application, error)
type ApplicationTemplate ¶
type ApplicationTemplate dreamkastv1alpha1.ApplicationTemplate
func (ApplicationTemplate) CandidateStr ¶
func (m ApplicationTemplate) CandidateStr() string
func (ApplicationTemplate) GenerateApplication ¶
func (m ApplicationTemplate) GenerateApplication(pr PullRequest, v Templator) (Application, error)
func (ApplicationTemplate) StableStr ¶
func (m ApplicationTemplate) StableStr() string
type File ¶
func NewFileFromApplication ¶
func NewFileFromApplication(ra ReviewApp, application Application, pr PullRequest, l InfraRepoLocalDir) File
func NewFileFromName ¶
func NewFileFromName(l InfraRepoLocalDir, filename string) File
func NewFilesFromManifests ¶
func NewFilesFromManifests(ra ReviewApp, manifests Manifests, pr PullRequest, l InfraRepoLocalDir) []File
type GitCredential ¶
type GitCredential struct {
// contains filtered or unexported fields
}
func NewGitCredential ¶
func NewGitCredential(username, token string) GitCredential
func (GitCredential) Token ¶
func (m GitCredential) Token() string
func (GitCredential) Username ¶
func (m GitCredential) Username() string
type InfraRepoLocalDir ¶
type InfraRepoLocalDir struct {
// contains filtered or unexported fields
}
func NewInfraRepoLocal ¶
func NewInfraRepoLocal(baseDir string) InfraRepoLocalDir
func (InfraRepoLocalDir) BaseDir ¶
func (m InfraRepoLocalDir) BaseDir() string
func (InfraRepoLocalDir) CommitMsgDeletion ¶
func (m InfraRepoLocalDir) CommitMsgDeletion(ra ReviewApp) string
func (InfraRepoLocalDir) CommitMsgUpdate ¶
func (m InfraRepoLocalDir) CommitMsgUpdate(ra ReviewApp) string
func (InfraRepoLocalDir) LatestCommitHash ¶
func (m InfraRepoLocalDir) LatestCommitHash() string
func (InfraRepoLocalDir) SetLatestCommitHash ¶
func (m InfraRepoLocalDir) SetLatestCommitHash(latestCommitHash string) InfraRepoLocalDir
type InfraRepoTarget ¶
type InfraRepoTarget dreamkastv1alpha1.ReviewAppManagerSpecInfraTarget
func (InfraRepoTarget) GitSecretSelector ¶
func (m InfraRepoTarget) GitSecretSelector() (*corev1.SecretKeySelector, error)
type JobTemplate ¶
type JobTemplate dreamkastv1alpha1.JobTemplate
func (JobTemplate) GenerateJob ¶
func (m JobTemplate) GenerateJob(ra ReviewApp, pr PullRequest, v Templator) (*batchv1.Job, error)
type ManifestsTemplate ¶
type ManifestsTemplate dreamkastv1alpha1.ManifestsTemplate
func (ManifestsTemplate) AppendOrUpdate ¶
func (m ManifestsTemplate) AppendOrUpdate(mt ManifestsTemplate) ManifestsTemplate
func (ManifestsTemplate) CandidateMap ¶
func (m ManifestsTemplate) CandidateMap() map[string]string
func (ManifestsTemplate) GenerateManifests ¶
func (m ManifestsTemplate) GenerateManifests(pr PullRequest, v Templator) (Manifests, error)
func (ManifestsTemplate) StableMap ¶
func (m ManifestsTemplate) StableMap() map[string]string
type PullRequest ¶
type PullRequest struct { Organization string Repository string Branch string Number int LatestCommitHash string Title string Labels []string }
func NewPullRequest ¶
func (PullRequest) IsCandidate ¶
func (m PullRequest) IsCandidate() bool
type PullRequests ¶
type PullRequests []PullRequest
func (PullRequests) ExcludeSpecificPR ¶
func (m PullRequests) ExcludeSpecificPR(ra ReviewAppOrReviewAppManager) PullRequests
type ReviewApp ¶
type ReviewApp dreamkastv1alpha1.ReviewApp
func NewReviewApp ¶
func NewReviewApp(ra *dreamkastv1alpha1.ReviewApp) ReviewApp
func (ReviewApp) AppRepoConfig ¶
func (m ReviewApp) AppRepoConfig() dreamkastv1alpha1.ReviewAppManagerSpecAppConfig
func (ReviewApp) AppRepoTarget ¶
func (m ReviewApp) AppRepoTarget() AppRepoTarget
func (ReviewApp) AtFilepath ¶
func (ReviewApp) GetStatus ¶
func (m ReviewApp) GetStatus() ReviewAppStatus
func (ReviewApp) HasMessageAlreadyBeenSent ¶
func (ReviewApp) HavingPreStopJob ¶
func (ReviewApp) InfraRepoConfig ¶
func (m ReviewApp) InfraRepoConfig() dreamkastv1alpha1.ReviewAppManagerSpecInfraConfig
func (ReviewApp) InfraRepoTarget ¶
func (m ReviewApp) InfraRepoTarget() InfraRepoTarget
func (ReviewApp) NamespaceName ¶
func (m ReviewApp) NamespaceName() types.NamespacedName
func (ReviewApp) ToReviewAppCR ¶
func (m ReviewApp) ToReviewAppCR() *dreamkastv1alpha1.ReviewApp
type ReviewAppManager ¶
type ReviewAppManager dreamkastv1alpha1.ReviewAppManager
func NewReviewAppManager ¶
func NewReviewAppManager(ram dreamkastv1alpha1.ReviewAppManager) ReviewAppManager
func (ReviewAppManager) AppRepoConfig ¶
func (m ReviewAppManager) AppRepoConfig() dreamkastv1alpha1.ReviewAppManagerSpecAppConfig
func (ReviewAppManager) AppRepoTarget ¶
func (m ReviewAppManager) AppRepoTarget() AppRepoTarget
func (ReviewAppManager) GenerateReviewApp ¶
func (m ReviewAppManager) GenerateReviewApp(pr PullRequest, v Templator, f *utils.DatetimeFactory) (ReviewApp, error)
func (ReviewAppManager) InfraRepoConfig ¶
func (m ReviewAppManager) InfraRepoConfig() dreamkastv1alpha1.ReviewAppManagerSpecInfraConfig
func (ReviewAppManager) InfraRepoTarget ¶
func (m ReviewAppManager) InfraRepoTarget() InfraRepoTarget
func (ReviewAppManager) IsPullRequestAlreadySynced ¶
func (m ReviewAppManager) IsPullRequestAlreadySynced(pr PullRequest) bool
func (ReviewAppManager) ListOutOfSyncReviewAppName ¶
func (m ReviewAppManager) ListOutOfSyncReviewAppName(prs []PullRequest) []string
func (ReviewAppManager) NamespaceName ¶
func (m ReviewAppManager) NamespaceName() types.NamespacedName
func (ReviewAppManager) ReviewAppName ¶
func (m ReviewAppManager) ReviewAppName(pr PullRequest) string
func (ReviewAppManager) ToReviewAppCR ¶
func (m ReviewAppManager) ToReviewAppCR() *dreamkastv1alpha1.ReviewAppManager
func (ReviewAppManager) Variables ¶
func (m ReviewAppManager) Variables() []string
type ReviewAppOrReviewAppManager ¶
type ReviewAppOrReviewAppManager interface { NamespaceName() types.NamespacedName AppRepoTarget() AppRepoTarget AppRepoConfig() dreamkastv1alpha1.ReviewAppManagerSpecAppConfig InfraRepoTarget() InfraRepoTarget InfraRepoConfig() dreamkastv1alpha1.ReviewAppManagerSpecInfraConfig Variables() []string }
type ReviewAppStatus ¶
type ReviewAppStatus dreamkastv1alpha1.ReviewAppStatus
func (ReviewAppStatus) HasApplicationBeenUpdated ¶
func (m ReviewAppStatus) HasApplicationBeenUpdated(hash string) bool
func (ReviewAppStatus) UpdateStatusOfAppRepo ¶
func (m ReviewAppStatus) UpdateStatusOfAppRepo(pr PullRequest) (ReviewAppStatus, bool)
func (ReviewAppStatus) UpdateStatusOfApplication ¶
func (m ReviewAppStatus) UpdateStatusOfApplication(application Application) (ReviewAppStatus, bool, error)
func (ReviewAppStatus) WasManifestsUpdated ¶
func (m ReviewAppStatus) WasManifestsUpdated(manifests Manifests) bool
type Templator ¶
type Templator struct { AppRepo templateValueAppRepoInfo InfraRepo templateValueInfraRepoInfo Variables map[string]string }
func NewTemplator ¶
func NewTemplator( m ReviewAppOrReviewAppManager, pr PullRequest, ) Templator
func (Templator) WithAppRepoLatestCommitHash ¶
Click to show internal directories.
Click to hide internal directories.