Documentation ¶
Index ¶
- Variables
- func ArtifactCommitMessage(service, artifactID, author string) string
- func BranchFromHead(ctx context.Context, repo *git.Repository, artifactFileName, svc string) (string, error)
- func BranchName(modifiedFiles []string, artifactFileName, svc string) (string, bool)
- func Checkout(r *git.Repository, hash plumbing.Hash) error
- func Clone(ctx context.Context, repoURL, destination, sshPrivateKeyPath string) (*git.Repository, error)
- func CloneDepth(ctx context.Context, repoURL, destination, sshPrivateKeyPath string, depth int) (*git.Repository, error)
- func Commit(ctx context.Context, repo *git.Repository, ...) error
- func CommitterDetails() (string, string, error)
- func LocateArtifact(r *git.Repository, artifactID string) (plumbing.Hash, error)
- func LocateRelease(r *git.Repository, artifactID string) (plumbing.Hash, error)
- func LocateServiceRelease(r *git.Repository, env, service string) (plumbing.Hash, error)
- func LocateServiceReleaseRollbackSkip(r *git.Repository, env, service string, n uint) (plumbing.Hash, error)
- func PolicyUpdateApplyCommitMessage(env, service, branch, policy string) string
- func PolicyUpdateDeleteCommitMessage(service string) string
- func ReleaseCommitMessage(env, service, artifactID string) string
- func RollbackCommitMessage(env, service, oldArtifactID, newArtifactID string) string
Constants ¶
This section is empty.
Variables ¶
Functions ¶
func ArtifactCommitMessage ¶ added in v0.0.4
ArtifactCommitMessage returns an artifact commit message.
func BranchFromHead ¶ added in v0.0.16
func BranchFromHead(ctx context.Context, repo *git.Repository, artifactFileName, svc string) (string, error)
BranchFromHead reutrns the branch name from the current HEAD commit.
It only handles files that originates from a build operation, ie. non-build commits cannot be extracted.
func BranchName ¶ added in v0.0.16
BranchName returns the branch name and a bool indicating one is found from a list of modified file paths.
It only handles files that originates from a build operation, ie. non-build commits cannot be extracted.
func CloneDepth ¶
func CommitterDetails ¶
CommitterDetails returns name and email read for a Git configuration file.
Configuration files are read first in the local git repository (if available) and then read the global Git configuration.
func LocateArtifact ¶ added in v0.0.2
LocateArtifact traverses the git log to find an artifact commit with id artifactID.
It expects the commit to have a commit messages as the one returned by ArtifactCommitMessage.
func LocateRelease ¶
LocateRelease traverses the git log to find a release commit with id artifactID.
It expects the commit to have a commit messages as the one returned by ReleaseCommitMessage.
func LocateServiceRelease ¶ added in v0.0.10
LocateServiceRelease traverses the git log to find a release commit for a specified service and environment.
It expects the commit to have a commit messages as the one returned by ReleaseCommitMessage.
func LocateServiceReleaseRollbackSkip ¶ added in v0.0.10
func LocateServiceReleaseRollbackSkip(r *git.Repository, env, service string, n uint) (plumbing.Hash, error)
LocateServiceReleaseRollbackSkip traverses the git log to find a release or rollback commit for a specified service and environment.
It expects the commit to have a commit messages as the one returned by ReleaseCommitMessage or RollbackCommitMessage.
func PolicyUpdateApplyCommitMessage ¶ added in v0.0.4
PolicyUpdateApplyCommitMessage returns an apply policy commit message.
func PolicyUpdateDeleteCommitMessage ¶ added in v0.0.4
PolicyUpdateDeleteCommitMessage returns a delete policy commit message.
func ReleaseCommitMessage ¶ added in v0.0.4
ReleaseCommitMessage returns an artifact release commit message.
func RollbackCommitMessage ¶ added in v0.0.10
RollbackCommitMessage returns an artifact rollback commit message.
Types ¶
This section is empty.