You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
TeamCity: Add project for testing the provider functions feature branch (#10088)
* Add ability to use non-default versions of Terraform in TeamCity builds
* Add function to enable making build configs for single packages at a time
* Add new sub project that contains 2 builds for testing provider functions
the 2 builds:
1) only pulls code from the feature branch on the downstream hashicorp/terraform-provider-google repo
2) only pulls code from the feature branch on the downstream hashicorp/terraform-provider-google-beta repo
These builds both use an alpha release of TF 1.8.0
* Add builds for testing auto generated branches in the MM upstream repos
These re-use existing VCR Roots.
* Make the builds that test the `FEATURE-BRANCH-provider-functions branches in the downstream repos run every night at the default time
* Fix defect in 'Download Terraform' build step definition
* Update build step to solve bug
* Update build_configuration_per_package.kt
// BuildConfigurationsForPackages accepts a map containing details of multiple packages in a provider and returns a list of build configurations for them all.
19
+
// Intended to be used in projects where we're testing all packages, e.g. the nightly test projects
Copy file name to clipboardExpand all lines: mmv1/third_party/terraform/.teamcity/components/builds/build_parameters.kt
+11-3
Original file line number
Diff line number
Diff line change
@@ -252,12 +252,20 @@ fun ParametrizedWithType.readOnlySettings() {
252
252
}
253
253
254
254
// ParametrizedWithType.terraformCoreBinaryTesting sets environment variables that control what Terraform version is downloaded
255
-
// and ensures the testing framework uses that downloaded version
256
-
fun ParametrizedWithType.terraformCoreBinaryTesting() {
257
-
text("env.TERRAFORM_CORE_VERSION", DefaultTerraformCoreVersion, "The version of Terraform Core which should be used for testing")
255
+
// and ensures the testing framework uses that downloaded version. The default Terraform core version is used if no argument is supplied.
256
+
fun ParametrizedWithType.terraformCoreBinaryTesting(tfVersion:String = DefaultTerraformCoreVersion) {
257
+
text("env.TERRAFORM_CORE_VERSION", tfVersion, "The version of Terraform Core which should be used for testing")
258
258
hiddenVariable("env.TF_ACC_TERRAFORM_PATH", "%system.teamcity.build.checkoutDir%/tools/terraform", "The path where the Terraform Binary is located. Used by the testing framework.")
259
259
}
260
260
261
+
// BuildType.overrideTerraformCoreVersion is used to override the value of TERRAFORM_CORE_VERSION in special cases where we're testing new features
262
+
// that rely on a specific version of Terraform we might not want to be used for all our tests in TeamCity.
263
+
fun BuildType.overrideTerraformCoreVersion(tfVersion:String){
264
+
params {
265
+
terraformCoreBinaryTesting(tfVersion)
266
+
}
267
+
}
268
+
261
269
fun ParametrizedWithType.terraformShouldPanicForSchemaErrors() {
262
270
hiddenVariable("env.TF_SCHEMA_PANIC_ON_ERROR", "1", "Panic if unknown/unmatched fields are set into the state")
0 commit comments