gitlab.com/sparetimecoders/build-tools@v0.1.0/pkg/ci/teamcity.go (about) 1 package ci 2 3 type TeamCity struct { 4 *Common 5 CICommit string `env:"BUILD_VCS_NUMBER"` 6 CIBuildName string `env:"TEAMCITY_PROJECT_NAME"` 7 CIBranchName string `env:"BUILD_VCS_BRANCH"` 8 } 9 10 var _ CI = &TeamCity{} 11 12 func (c TeamCity) Name() string { 13 return "TeamCity" 14 } 15 16 func (c TeamCity) BranchReplaceSlash() string { 17 return branchReplaceSlash(c.Branch()) 18 } 19 20 func (c TeamCity) BuildName() string { 21 return c.Common.BuildName(c.CIBuildName) 22 } 23 24 func (c TeamCity) Branch() string { 25 return c.Common.Branch(c.CIBranchName) 26 } 27 28 func (c TeamCity) Commit() string { 29 return c.Common.Commit(c.CICommit) 30 } 31 32 func (c TeamCity) Configured() bool { 33 return c.CIBuildName != "" 34 }