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

GitHubSync update #664

Merged
merged 1 commit into from
Feb 12, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
207 changes: 0 additions & 207 deletions deployment/cake/apps-web-tasks.cake

This file was deleted.

49 changes: 0 additions & 49 deletions deployment/cake/apps-web-variables.cake

This file was deleted.

43 changes: 1 addition & 42 deletions deployment/cake/docker-tasks.cake
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#l "docker-variables.cake"
#l "lib-octopusdeploy.cake"

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

Expand Down Expand Up @@ -311,9 +310,6 @@ public class DockerImagesProcessor : ProcessorBase
var dockerRegistryUserName = GetDockerRegistryUserName(dockerImage);
var dockerRegistryPassword = GetDockerRegistryPassword(dockerImage);
var dockerImageName = GetDockerImageName(dockerImage);
var octopusRepositoryUrl = BuildContext.OctopusDeploy.GetRepositoryUrl(dockerImage);
var octopusRepositoryApiKey = BuildContext.OctopusDeploy.GetRepositoryApiKey(dockerImage);
var octopusDeploymentTarget = BuildContext.OctopusDeploy.GetDeploymentTarget(dockerImage);

if (string.IsNullOrWhiteSpace(dockerRegistryUrl))
{
Expand Down Expand Up @@ -347,44 +343,7 @@ public class DockerImagesProcessor : ProcessorBase

CakeContext.DockerPush(dockerImagePushSettings, dockerImageTag);

if (string.IsNullOrWhiteSpace(octopusRepositoryUrl))
{
CakeContext.Warning("Octopus Deploy url is not specified, skipping deployment to Octopus Deploy");
continue;
}

var imageVersion = BuildContext.General.Version.NuGet;

CakeContext.Information("Creating release '{0}' in Octopus Deploy", imageVersion);

CakeContext.OctoCreateRelease(dockerImage, new CreateReleaseSettings
{
Server = octopusRepositoryUrl,
ApiKey = octopusRepositoryApiKey,
ReleaseNumber = imageVersion,
DefaultPackageVersion = imageVersion,
IgnoreExisting = true,
Packages = new Dictionary<string, string>
{
{ dockerImageName, imageVersion }
}
});

CakeContext.Information("Deploying release '{0}' via Octopus Deploy", imageVersion);

CakeContext.OctoDeployRelease(octopusRepositoryUrl, octopusRepositoryApiKey, dockerImage, octopusDeploymentTarget,
imageVersion, new OctopusDeployReleaseDeploymentSettings
{
ShowProgress = true,
WaitForDeployment = true,
DeploymentTimeout = TimeSpan.FromMinutes(5),
CancelOnTimeout = true,
GuidedFailure = true,
Force = true,
NoRawLog = true,
});

await BuildContext.Notifications.NotifyAsync(dockerImage, string.Format("Deployed to Octopus Deploy"), TargetType.DockerImage);
await BuildContext.Notifications.NotifyAsync(dockerImage, string.Format("Deployed to Docker"), TargetType.DockerImage);
}
}
finally
Expand Down
8 changes: 0 additions & 8 deletions deployment/cake/lib-generic.cake
Original file line number Diff line number Diff line change
Expand Up @@ -200,8 +200,6 @@ public enum TargetType

VsExtension,

WebApp,

WpfApp
}

Expand Down Expand Up @@ -847,12 +845,6 @@ private static bool IsOnlyDependencyProject(BuildContext buildContext, string pr
return false;
}

if (buildContext.Web.Items.Contains(projectName))
{
buildContext.CakeContext.Information($"Project is list of web apps, assuming not dependency only");
return false;
}

if (buildContext.Wpf.Items.Contains(projectName))
{
buildContext.CakeContext.Information($"Project is list of WPF apps, assuming not dependency only");
Expand Down
2 changes: 1 addition & 1 deletion deployment/cake/lib-msbuild.cake
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#addin "nuget:?package=Cake.Issues&version=5.5.0"
#addin "nuget:?package=Cake.Issues.MsBuild&version=5.5.0"
#addin "nuget:?package=System.Configuration.ConfigurationManager&version=9.0.1"
#addin "nuget:?package=System.Configuration.ConfigurationManager&version=9.0.2"

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

Expand Down
40 changes: 0 additions & 40 deletions deployment/cake/lib-octopusdeploy.cake

This file was deleted.

Loading
Loading