forked from GoogleCloudPlatform/magic-modules
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
TeamCity v6.0.0 feature branch testing (GoogleCloudPlatform#11104)
- Loading branch information
1 parent
32eebe8
commit 60f7267
Showing
10 changed files
with
145 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
103 changes: 103 additions & 0 deletions
103
...form/.teamcity/components/projects/feature_branches/FEATURE-BRANCH-major-release-6.0.0.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,103 @@ | ||
/* | ||
* Copyright (c) HashiCorp, Inc. | ||
* SPDX-License-Identifier: MPL-2.0 | ||
*/ | ||
|
||
// This file is controlled by MMv1, any changes made here will be overwritten | ||
|
||
package projects.feature_branches | ||
|
||
import ProviderNameBeta | ||
import ProviderNameGa | ||
import builds.* | ||
import jetbrains.buildServer.configs.kotlin.Project | ||
import jetbrains.buildServer.configs.kotlin.vcs.GitVcsRoot | ||
import projects.reused.nightlyTests | ||
import replaceCharsId | ||
|
||
const val branchName = "FEATURE-BRANCH-major-release-6.0.0" | ||
|
||
// VCS Roots specifically for pulling code from the feature branches in the downstream repos | ||
|
||
object HashicorpVCSRootGa_featureBranchMajorRelease600: GitVcsRoot({ | ||
name = "VCS root for the hashicorp/terraform-provider-${ProviderNameGa} repo @ refs/heads/${branchName}" | ||
url = "https://github.com/hashicorp/terraform-provider-${ProviderNameGa}" | ||
branch = "refs/heads/${branchName}" | ||
branchSpec = """ | ||
+:FEATURE-BRANCH-major-release-6* | ||
""".trimIndent() | ||
}) | ||
|
||
object HashicorpVCSRootBeta_featureBranchMajorRelease600: GitVcsRoot({ | ||
name = "VCS root for the hashicorp/terraform-provider-${ProviderNameBeta} repo @ refs/heads/${branchName}" | ||
url = "https://github.com/hashicorp/terraform-provider-${ProviderNameBeta}" | ||
branch = "refs/heads/${branchName}" | ||
branchSpec = """ | ||
+:FEATURE-BRANCH-major-release-6* | ||
""".trimIndent() | ||
}) | ||
|
||
fun featureBranchMajorRelease600_Project(allConfig: AllContextParameters): Project { | ||
|
||
val projectId = replaceCharsId(branchName) | ||
val gaProjectId = replaceCharsId(projectId + "_GA") | ||
val betaProjectId= replaceCharsId(projectId + "_BETA") | ||
|
||
// Get config for using the GA and Beta identities | ||
val gaConfig = getGaAcceptanceTestConfig(allConfig) | ||
val betaConfig = getBetaAcceptanceTestConfig(allConfig) | ||
|
||
return Project{ | ||
id(projectId) | ||
name = "6.0.0 Major Release Testing" | ||
description = "Subproject for testing feature branch $branchName" | ||
|
||
// Register feature branch-specific VCS roots in the project | ||
vcsRoot(HashicorpVCSRootGa_featureBranchMajorRelease600) | ||
vcsRoot(HashicorpVCSRootBeta_featureBranchMajorRelease600) | ||
|
||
// Nested Nightly Test project that uses hashicorp/terraform-provider-google | ||
subProject( | ||
Project{ | ||
id(gaProjectId) | ||
name = "Google" | ||
subProject( | ||
nightlyTests( | ||
gaProjectId, | ||
ProviderNameGa, | ||
HashicorpVCSRootGa_featureBranchMajorRelease600, | ||
gaConfig, | ||
NightlyTriggerConfiguration( | ||
branch = branchName, // Make triggered builds use the feature branch | ||
daysOfWeek = "5" // Thursday for GA, TeamCity numbers days Sun=1...Sat=7 | ||
), | ||
) | ||
) | ||
} | ||
) | ||
|
||
// Nested Nightly Test project that uses hashicorp/terraform-provider-google-beta | ||
subProject( | ||
Project { | ||
id(betaProjectId) | ||
name = "Google Beta" | ||
subProject( | ||
nightlyTests( | ||
betaProjectId, | ||
ProviderNameBeta, | ||
HashicorpVCSRootBeta_featureBranchMajorRelease600, | ||
betaConfig, | ||
NightlyTriggerConfiguration( | ||
branch = branchName, // Make triggered builds use the feature branch | ||
daysOfWeek="6" // Friday for Beta, TeamCity numbers days Sun=1...Sat=7 | ||
), | ||
) | ||
) | ||
} | ||
) | ||
|
||
params { | ||
readOnlySettings() | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters