Skip to content

Commit c40d175

Browse files
authoredFeb 12, 2025··
Merge pull request #897 from WildGums/GitHubSync/20250212-120704
GitHubSync update
2 parents d6424a6 + ae026b1 commit c40d175

7 files changed

+2
-356
lines changed
 

‎deployment/cake/apps-web-tasks.cake

-207
This file was deleted.

‎deployment/cake/apps-web-variables.cake

-49
This file was deleted.

‎deployment/cake/docker-tasks.cake

+1-42
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
#l "docker-variables.cake"
2-
#l "lib-octopusdeploy.cake"
32

43
#addin "nuget:?package=Cake.Docker&version=1.3.0"
54

@@ -311,9 +310,6 @@ public class DockerImagesProcessor : ProcessorBase
311310
var dockerRegistryUserName = GetDockerRegistryUserName(dockerImage);
312311
var dockerRegistryPassword = GetDockerRegistryPassword(dockerImage);
313312
var dockerImageName = GetDockerImageName(dockerImage);
314-
var octopusRepositoryUrl = BuildContext.OctopusDeploy.GetRepositoryUrl(dockerImage);
315-
var octopusRepositoryApiKey = BuildContext.OctopusDeploy.GetRepositoryApiKey(dockerImage);
316-
var octopusDeploymentTarget = BuildContext.OctopusDeploy.GetDeploymentTarget(dockerImage);
317313

318314
if (string.IsNullOrWhiteSpace(dockerRegistryUrl))
319315
{
@@ -347,44 +343,7 @@ public class DockerImagesProcessor : ProcessorBase
347343

348344
CakeContext.DockerPush(dockerImagePushSettings, dockerImageTag);
349345

350-
if (string.IsNullOrWhiteSpace(octopusRepositoryUrl))
351-
{
352-
CakeContext.Warning("Octopus Deploy url is not specified, skipping deployment to Octopus Deploy");
353-
continue;
354-
}
355-
356-
var imageVersion = BuildContext.General.Version.NuGet;
357-
358-
CakeContext.Information("Creating release '{0}' in Octopus Deploy", imageVersion);
359-
360-
CakeContext.OctoCreateRelease(dockerImage, new CreateReleaseSettings
361-
{
362-
Server = octopusRepositoryUrl,
363-
ApiKey = octopusRepositoryApiKey,
364-
ReleaseNumber = imageVersion,
365-
DefaultPackageVersion = imageVersion,
366-
IgnoreExisting = true,
367-
Packages = new Dictionary<string, string>
368-
{
369-
{ dockerImageName, imageVersion }
370-
}
371-
});
372-
373-
CakeContext.Information("Deploying release '{0}' via Octopus Deploy", imageVersion);
374-
375-
CakeContext.OctoDeployRelease(octopusRepositoryUrl, octopusRepositoryApiKey, dockerImage, octopusDeploymentTarget,
376-
imageVersion, new OctopusDeployReleaseDeploymentSettings
377-
{
378-
ShowProgress = true,
379-
WaitForDeployment = true,
380-
DeploymentTimeout = TimeSpan.FromMinutes(5),
381-
CancelOnTimeout = true,
382-
GuidedFailure = true,
383-
Force = true,
384-
NoRawLog = true,
385-
});
386-
387-
await BuildContext.Notifications.NotifyAsync(dockerImage, string.Format("Deployed to Octopus Deploy"), TargetType.DockerImage);
346+
await BuildContext.Notifications.NotifyAsync(dockerImage, string.Format("Deployed to Docker"), TargetType.DockerImage);
388347
}
389348
}
390349
finally

‎deployment/cake/lib-generic.cake

-8
Original file line numberDiff line numberDiff line change
@@ -200,8 +200,6 @@ public enum TargetType
200200

201201
VsExtension,
202202

203-
WebApp,
204-
205203
WpfApp
206204
}
207205

@@ -847,12 +845,6 @@ private static bool IsOnlyDependencyProject(BuildContext buildContext, string pr
847845
return false;
848846
}
849847

850-
if (buildContext.Web.Items.Contains(projectName))
851-
{
852-
buildContext.CakeContext.Information($"Project is list of web apps, assuming not dependency only");
853-
return false;
854-
}
855-
856848
if (buildContext.Wpf.Items.Contains(projectName))
857849
{
858850
buildContext.CakeContext.Information($"Project is list of WPF apps, assuming not dependency only");

‎deployment/cake/lib-msbuild.cake

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#addin "nuget:?package=Cake.Issues&version=5.5.0"
22
#addin "nuget:?package=Cake.Issues.MsBuild&version=5.5.0"
3-
#addin "nuget:?package=System.Configuration.ConfigurationManager&version=9.0.1"
3+
#addin "nuget:?package=System.Configuration.ConfigurationManager&version=9.0.2"
44

55
#tool "nuget:?package=MSBuild.Extension.Pack&version=1.9.1"
66

‎deployment/cake/lib-octopusdeploy.cake

-40
This file was deleted.

‎deployment/cake/tasks.cake

-9
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
#l "notifications.cake"
1313
#l "generic-tasks.cake"
1414
#l "apps-uwp-tasks.cake"
15-
#l "apps-web-tasks.cake"
1615
#l "apps-wpf-tasks.cake"
1716
#l "codesigning-tasks.cake"
1817
#l "components-tasks.cake"
@@ -91,7 +90,6 @@ public class BuildContext : BuildContextBase
9190
public InstallerIntegration Installer { get; set; }
9291
public NotificationsIntegration Notifications { get; set; }
9392
public SourceControlIntegration SourceControl { get; set; }
94-
public OctopusDeployIntegration OctopusDeploy { get; set; }
9593

9694
// Contexts
9795
public GeneralContext General { get; set; }
@@ -106,7 +104,6 @@ public class BuildContext : BuildContextBase
106104
public ToolsContext Tools { get; set; }
107105
public UwpContext Uwp { get; set; }
108106
public VsExtensionsContext VsExtensions { get; set; }
109-
public WebContext Web { get; set; }
110107
public WpfContext Wpf { get; set; }
111108

112109
public List<string> AllProjects { get; private set; }
@@ -154,14 +151,12 @@ Setup<BuildContext>(setupContext =>
154151
buildContext.Tools = InitializeToolsContext(buildContext, buildContext);
155152
buildContext.Uwp = InitializeUwpContext(buildContext, buildContext);
156153
buildContext.VsExtensions = InitializeVsExtensionsContext(buildContext, buildContext);
157-
buildContext.Web = InitializeWebContext(buildContext, buildContext);
158154
buildContext.Wpf = InitializeWpfContext(buildContext, buildContext);
159155

160156
// Other integrations last
161157
buildContext.IssueTracker = new IssueTrackerIntegration(buildContext);
162158
buildContext.Installer = new InstallerIntegration(buildContext);
163159
buildContext.Notifications = new NotificationsIntegration(buildContext);
164-
buildContext.OctopusDeploy = new OctopusDeployIntegration(buildContext);
165160
buildContext.SourceControl = new SourceControlIntegration(buildContext);
166161

167162
setupContext.LogSeparator("Validating build context");
@@ -179,7 +174,6 @@ Setup<BuildContext>(setupContext =>
179174
buildContext.Processors.Add(new ToolsProcessor(buildContext));
180175
buildContext.Processors.Add(new UwpProcessor(buildContext));
181176
buildContext.Processors.Add(new VsExtensionsProcessor(buildContext));
182-
buildContext.Processors.Add(new WebProcessor(buildContext));
183177
buildContext.Processors.Add(new WpfProcessor(buildContext));
184178
// !!! Note: we add test projects *after* preparing all the other processors, see Prepare task !!!
185179

@@ -249,7 +243,6 @@ Task("Prepare")
249243
buildContext.RegisteredProjects.AddRange(buildContext.Tools.Items);
250244
buildContext.RegisteredProjects.AddRange(buildContext.Uwp.Items);
251245
buildContext.RegisteredProjects.AddRange(buildContext.VsExtensions.Items);
252-
buildContext.RegisteredProjects.AddRange(buildContext.Web.Items);
253246
buildContext.RegisteredProjects.AddRange(buildContext.Wpf.Items);
254247

255248
await buildContext.BuildServer.BeforePrepareAsync();
@@ -272,7 +265,6 @@ Task("Prepare")
272265
buildContext.AllProjects.AddRange(buildContext.Tools.Items);
273266
buildContext.AllProjects.AddRange(buildContext.Uwp.Items);
274267
buildContext.AllProjects.AddRange(buildContext.VsExtensions.Items);
275-
buildContext.AllProjects.AddRange(buildContext.Web.Items);
276268
buildContext.AllProjects.AddRange(buildContext.Wpf.Items);
277269

278270
buildContext.CakeContext.LogSeparator("Final check which test projects should be included (1/2)");
@@ -795,7 +787,6 @@ Task("TestNotifications")
795787
await buildContext.Notifications.NotifyAsync("MyProject", "This is a generic test");
796788
await buildContext.Notifications.NotifyAsync("MyProject", "This is a component test", TargetType.Component);
797789
await buildContext.Notifications.NotifyAsync("MyProject", "This is a docker image test", TargetType.DockerImage);
798-
await buildContext.Notifications.NotifyAsync("MyProject", "This is a web app test", TargetType.WebApp);
799790
await buildContext.Notifications.NotifyAsync("MyProject", "This is a wpf app test", TargetType.WpfApp);
800791
await buildContext.Notifications.NotifyErrorAsync("MyProject", "This is an error");
801792
});

0 commit comments

Comments
 (0)
Please sign in to comment.