Skip to content

Commit

Permalink
Merge pull request #32386 from hashicorp/b-fix-teamcity
Browse files Browse the repository at this point in the history
Fix TeamCity configuration
  • Loading branch information
gdavison authored Jul 6, 2023
2 parents 531666a + 3c158a3 commit 92310fc
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 8 deletions.
9 changes: 5 additions & 4 deletions .teamcity/components/service_build_config.kt
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import jetbrains.buildServer.configs.kotlin.AbsoluteId
import jetbrains.buildServer.configs.kotlin.BuildSteps
import jetbrains.buildServer.configs.kotlin.BuildType
import jetbrains.buildServer.configs.kotlin.DslContext
import jetbrains.buildServer.configs.kotlin.ParameterDisplay
Expand Down Expand Up @@ -53,7 +54,7 @@ class Service(name: String, spec: ServiceSpec) {

val serviceDir = "./internal/service/$packageName"
steps {
configureGoEnv()
ConfigureGoEnv()
script {
name = "Compile Test Binary"
workingDir = serviceDir
Expand Down Expand Up @@ -104,9 +105,9 @@ class Service(name: String, spec: ServiceSpec) {
}
}

fun configureGoEnv(): ScriptBuildStep {
return ScriptBuildStep {
fun BuildSteps.ConfigureGoEnv() {
step(ScriptBuildStep {
name = "Configure GOENV"
scriptContent = File("./scripts/configure_goenv.sh").readText()
}
})
}
8 changes: 4 additions & 4 deletions .teamcity/settings.kts
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ object PullRequest : BuildType({

val accTestRoleARN = DslContext.getParameter("aws_account.role_arn", "")
steps {
configureGoEnv()
ConfigureGoEnv()
script {
name = "Run Tests"
scriptContent = File("./scripts/pullrequest_tests/tests.sh").readText()
Expand Down Expand Up @@ -304,7 +304,7 @@ object SetUp : BuildType({
}

steps {
configureGoEnv()
ConfigureGoEnv()
script {
name = "Run provider unit tests"
scriptContent = File("./scripts/provider_tests/unit_tests.sh").readText()
Expand Down Expand Up @@ -397,7 +397,7 @@ object CleanUp : BuildType({
}

steps {
configureGoEnv()
ConfigureGoEnv()
script {
name = "Post-Sweeper"
enabled = false
Expand All @@ -416,7 +416,7 @@ object Sweeper : BuildType({
}

steps {
configureGoEnv()
ConfigureGoEnv()
script {
name = "Sweeper"
scriptContent = File("./scripts/sweeper.sh").readText()
Expand Down

0 comments on commit 92310fc

Please sign in to comment.