Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Downstream merge #61

Closed
wants to merge 11 commits into from
Prev Previous commit
Next Next commit
#32998 Downstream merge added to TeamCity configuration.
  • Loading branch information
prochan2 committed May 29, 2023
commit e662ef02e44fab848fb2fe696eaa68554e088a70
19 changes: 15 additions & 4 deletions src/PostSharp.Engineering.BuildTools/Build/Model/Product.cs
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ public string ProductName

public static ConfigurationSpecific<BuildConfigurationInfo> DefaultConfigurations { get; }
= new(
debug: new BuildConfigurationInfo( MSBuildName: "Debug", BuildTriggers: new IBuildTrigger[] { new SourceBuildTrigger() } ),
debug: new BuildConfigurationInfo( MSBuildName: "Debug" ), // The SourceBuildTrigger is not set here, because this configuration gets triggered as a dependency of DownstreamMerge configuration.
release: new BuildConfigurationInfo( MSBuildName: "Release", RequiresSigning: true, ExportsToTeamCityBuild: false ),
@public: new BuildConfigurationInfo(
MSBuildName: "Release",
Expand Down Expand Up @@ -1931,9 +1931,7 @@ public bool GenerateTeamcityConfiguration( BuildContext context )
}

// Create a TeamCity configuration for Swap.
if (
buildTeamCityConfiguration != null
&& configurationInfo is { Swappers: { }, SwapAfterPublishing: false } )
if ( configurationInfo is { Swappers: { }, SwapAfterPublishing: false } )
{
var swapDependencies = new List<TeamCitySnapshotDependency>();

Expand Down Expand Up @@ -1970,6 +1968,19 @@ public bool GenerateTeamcityConfiguration( BuildContext context )
}
}

teamCityBuildConfigurations.Add(
new TeamCityBuildConfiguration(
this,
"DownstreamMerge",
"Downstream Merge",
"merge-downstream",
this.BuildAgentType )
{
IsDeployment = true,
Dependencies = new[] { new TeamCitySnapshotDependency( $"{BuildConfiguration.Debug}Build", true ) },
BuildTriggers = new IBuildTrigger[] { new SourceBuildTrigger() }
} );

// Add from extensions.
foreach ( var extension in this.Extensions )
{
Expand Down