@@ -29,7 +29,7 @@ fun BuildConfigurationsForPackages(packages: Map<String, Map<String, String>>, p
2929 val displayName: String = info.getValue(" displayName" ).toString()
3030
3131 val pkg = PackageDetails (packageName, displayName, providerName, parentProjectName, releaseDiffTest)
32- val buildConfig = pkg.buildConfiguration(path, vcsRoot, sharedResources, environmentVariables, testPrefix = testPrefix)
32+ val buildConfig = pkg.buildConfiguration(path, vcsRoot, sharedResources, environmentVariables, testPrefix = testPrefix, releaseDiffTest = releaseDiffTest )
3333 list.add(buildConfig)
3434 }
3535
@@ -39,15 +39,15 @@ fun BuildConfigurationsForPackages(packages: Map<String, Map<String, String>>, p
3939// BuildConfigurationForSinglePackage accepts details of a single package in a provider and returns a build configuration for it
4040// Intended to be used in short-lived projects where we're testing specific packages, e.g. feature branch testing
4141fun BuildConfigurationForSinglePackage (packageName : String , packagePath : String , packageDisplayName : String , providerName : String , parentProjectName : String , vcsRoot : GitVcsRoot , sharedResources : List <String >, environmentVariables : AccTestConfiguration , testPrefix : String = "TestAcc ", releaseDiffTest : String = "false"): BuildType {
42- val pkg = PackageDetails (packageName, packageDisplayName, providerName, parentProjectName, releaseDiffTest)
43- return pkg.buildConfiguration(packagePath, vcsRoot, sharedResources, environmentVariables, testPrefix = testPrefix)
42+ val pkg = PackageDetails (packageName, packageDisplayName, providerName, parentProjectName, releaseDiffTest = releaseDiffTest )
43+ return pkg.buildConfiguration(packagePath, vcsRoot, sharedResources, environmentVariables, testPrefix = testPrefix, releaseDiffTest = releaseDiffTest )
4444}
4545
4646class PackageDetails (private val packageName : String , private val displayName : String , private val providerName : String , private val parentProjectName : String , private val releaseDiffTest : String ) {
4747
4848 // buildConfiguration returns a BuildType for a service package
4949 // For BuildType docs, see https://teamcity.jetbrains.com/app/dsl-documentation/root/build-type/index.html
50- fun buildConfiguration (path : String , vcsRoot : GitVcsRoot , sharedResources : List <String >, environmentVariables : AccTestConfiguration , buildTimeout : Int = DefaultBuildTimeoutDuration , testPrefix : String ): BuildType {
50+ fun buildConfiguration (path : String , vcsRoot : GitVcsRoot , sharedResources : List <String >, environmentVariables : AccTestConfiguration , buildTimeout : Int = DefaultBuildTimeoutDuration , testPrefix : String , releaseDiffTest : String ): BuildType {
5151 val testPrefix = " TestAcc"
5252 val testTimeout = " 12"
5353
@@ -72,7 +72,11 @@ class PackageDetails(private val packageName: String, private val displayName: S
7272 tagBuildToIndicateTriggerMethod()
7373 configureGoEnv()
7474 downloadTerraformBinary()
75- runAcceptanceTests()
75+ if (releaseDiffTest.toBoolean()) {
76+ runDiffTests()
77+ } else {
78+ runAcceptanceTests()
79+ }
7680 saveArtifactsToGCS()
7781 archiveArtifactsIfOverLimit() // Must be after push to GCS step, as this step impacts debug log files
7882 }
0 commit comments