Documentation ¶
Index ¶
- Constants
- func ErrorNotSupportedReference(reference string) error
- func GetReferencePrefix(reference string) (string, error)
- func IsDevelop(branch string) bool
- func IsFeature(branch string) bool
- func IsHotfix(branch string) bool
- func IsMaster(branch string) bool
- func IsRelease(branch string) bool
- func IsReleaseTag(tag string) bool
- func IsSupport(branch string) bool
- func IsValid(reference string) bool
- func IsValidBranchWorkspace(rules []apistructs.ValidBranch, expectWorkspace apistructs.DiceWorkspace) (validWorkspace, validArtifactWorkspace bool)
- type PrefixAndBranch
Constants ¶
View Source
const ( MASTER = "master" HOTFIX = "hotfix/" HOTFIX_WITHOUT_SLASH = "hotfix" SUPPORT = "support/" SUPPORT_WITHOUT_SLASH = "support" RELEASE = "release/" RELEASE_WITHOUT_SLASH = "release" DEVELOP = "develop" FEATURE = "feature/" FEATURE_WITHOUT_SLASH = "feature" DEFAULT = "default" )
View Source
const ( DefaultWorkspace string = "DEFAULT" // DevWorkspace 开发环境 DevWorkspace string = "DEV" // TestWorkspace 测试环境 TestWorkspace string = "TEST" // StagingWorkspace 预发环境 StagingWorkspace string = "STAGING" // ProdWorkspace 生产环境 ProdWorkspace string = "PROD" )
DiceWorkspace dice 部署环境:DEV、TEST、STAGING、PROD
Variables ¶
This section is empty.
Functions ¶
func GetReferencePrefix ¶
func IsReleaseTag ¶
func IsValidBranchWorkspace ¶
func IsValidBranchWorkspace(rules []apistructs.ValidBranch, expectWorkspace apistructs.DiceWorkspace) (validWorkspace, validArtifactWorkspace bool)
IsValidBranchWorkspace return if expectWorkspace is valid workspace & artifactWorkspace
Types ¶
type PrefixAndBranch ¶
map:
key: prefix with slash value: prefix with mock
func ListAllBranchPrefix ¶
func ListAllBranchPrefix() []PrefixAndBranch
Click to show internal directories.
Click to hide internal directories.