|
1 | 1 | #l "docker-variables.cake"
|
2 |
| -#l "lib-octopusdeploy.cake" |
3 | 2 |
|
4 | 3 | #addin "nuget:?package=Cake.Docker&version=1.3.0"
|
5 | 4 |
|
@@ -311,9 +310,6 @@ public class DockerImagesProcessor : ProcessorBase
|
311 | 310 | var dockerRegistryUserName = GetDockerRegistryUserName(dockerImage);
|
312 | 311 | var dockerRegistryPassword = GetDockerRegistryPassword(dockerImage);
|
313 | 312 | 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); |
317 | 313 |
|
318 | 314 | if (string.IsNullOrWhiteSpace(dockerRegistryUrl))
|
319 | 315 | {
|
@@ -347,44 +343,7 @@ public class DockerImagesProcessor : ProcessorBase
|
347 | 343 |
|
348 | 344 | CakeContext.DockerPush(dockerImagePushSettings, dockerImageTag);
|
349 | 345 |
|
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); |
388 | 347 | }
|
389 | 348 | }
|
390 | 349 | finally
|
|
0 commit comments