Automatic Release Creation 3.0 Not Working

The automatic release functionality is not working. Normally we would have a release get automatically deployed when a package was pushed in the built in NuGet repository, but that does not seem to work anymore.

I can see the package being inserted into the NuGet repository and can see the package in the Library, but it is not getting automatically deployed. I have verified that the checkbox is checked to automatically deploy and verified that new package is being created.

Seems like version 3.0 broke more stuff than it fixed. :frowning:

Please help!

I, too, am experiencing this issue. My setup is a bit more elaborate, however -

I have a “Deploy a NuGet package” Step Template where the “NuGet package ID” comes from a Parameter of the template. This Parameter is filled when adding the Step Template to a Project.

Hi,

Thanks for getting in touch. Could you please (both Jesse and ssnead) let us know which Octopus 3.0 version are you running, and if you see any logs in configuration -> Diagnostics when you push the package to the feed?

Regards,

Dalmiro

Hi Dalmiro,

I am using Octopus Deploy 3.0.5.2124 and pushing packages into the built-in NuGet repository using the TeamCity plugin (25.4.35). There is no issues with this process, as I am able to manually create new releases and they are deployed just fine.

I do see the following entry in the Audit log, but it is the only one related to the package being published:

  • Package “PackageName” version 1.2.35 was pushed to the builtin feed

A System Administrator API key is in use, so there’s no chance for a permission issue.

Edit - Configuration -> Diagnostics details

Sorry, I confused the Diagnostics and Audit pages. Here’s what I see at a regular interval and at the same time that the NuGet packages are published:

While trying to retrieve the authorization groups, an error (5) occurred. System.DirectoryServices.AccountManagement.PrincipalOperationException: While trying to retrieve the authorization groups, an error (5) occurred.
  at System.DirectoryServices.AccountManagement.AuthZSet..ctor(Byte[] userSid, NetCred credentials, ContextOptions contextOptions, String flatUserAuthority, StoreCtx userStoreCtx, Object userCtxBase)
  at System.DirectoryServices.AccountManagement.ADStoreCtx.GetGroupsMemberOfAZ(Principal p)
  at System.DirectoryServices.AccountManagement.UserPrincipal.GetAuthorizationGroupsHelper()
  at Octopus.Server.Web.Infrastructure.Authentication.ActiveDirectoryMembership.GetMemberExternalSecurityGroupIds(String username) in y:\work\refs\heads\master\source\Octopus.Server\Web\Infrastructure\Authentication\ActiveDirectoryMembership.cs:line 124

Hi Jesse,

That error indicates a problem when trying to search a security group in Active Directory. Usually related to the account running the Octopus Service not having enough permissions to browse your Directory. You will need to make an account in your AD for Octopus to run under, and you will also need to follow the directions on the following MS article: http://support2.microsoft.com/kb/331951

Let me know how that goes

Dalmiro

We are using 3.04, the error we get is below:
nhandled error on request: https://deploy.smoothfusion.com/nuget/packages/ by SFAdmin@smoothfusion.com : Object reference not set to an instance of an object.
System.NullReferenceException: Object reference not set to an instance of an object.
at Octopus.Server.Communications.Packages.PackageEvaluator.Evaluate(String packageId, String packageVersion) in y:\work\refs\heads\master\source\Octopus.Server\Communications\Packages\PackageEvaluator.cs:line 61
at Octopus.Server.Web.Api.NuGet.NuGetPackagePushActionBase1.Execute() in y:\work\refs\heads\master\source\Octopus.Server\Web\Api\NuGet\NuGetPackagePushActionBase.cs:line 81 at Octopus.Server.Web.Infrastructure.Api.Responder1.Respond(TDescriptor options, NancyContext context) in y:\work\refs\heads\master\source\Octopus.Server\Web\Infrastructure\Api\Responder.cs:line 162
at System.Dynamic.UpdateDelegates.UpdateAndExecute3[T0,T1,T2,TRet](CallSite site, T0 arg0, T1 arg1, T2 arg2)
at CallSite.Target(Closure , CallSite , Object , Object , NancyContext )
at Octopus.Server.Web.Api.OctopusRestApiModule.<>c__DisplayClass5.<.ctor>b__2(Object o) in y:\work\refs\heads\master\source\Octopus.Server\Web\Api\OctopusRestApiModule.cs:line 46
at CallSite.Target(Closure , CallSite , Func`2 , Object )
at Nancy.Routing.Route.<>c__DisplayClass4.b__3(Object parameters, CancellationToken context)

We have setup and selected to automatically deploy the package to Dev, so once a package is pushed into OctopusDeploy it will automatically send that package/release to Dev. This used to work before we upgraded to 3.0

Same problem here, but nothing in the diagnostics.

All,

It looks like this is caused by a missing DeploymentProcess for a Project.

This issue could be caused by importing a 2.6 Project that included an FTP Step or an Azure Step. We have a change coming in the next 3.0.x release (today hopefully) where the Migrator will handle these deprecated steps more gracefully without breaking the Project.

If you look in the Migrator log, do you see an Error that it says should be corrected before importing?

Separately we will fix the issue of it failing to autocreate releases when such a broken project is present. You can track that fix here: https://github.com/OctopusDeploy/Issues/issues/1799

Ian

Ian,

I have a fresh install of 3.0.5 with everything created from scratch in the new install - there was no setting or deployment or anything carried over from a prior install, and the issue is occurring as described above.

Regards,
Jesse

Jesse,

Sorry, you are right, the exception you posted is likely not helped by the release that just went out today (3.0.7).

The error “System.DirectoryServices.AccountManagement.PrincipalOperationException: While trying to retrieve the authorization groups, an error (5) occurred” may be related to the account Octopus Deploy Server is running under not having sufficient privileges to query active directory. Can you check that?

Also, could you please provide more of the logging around this … showing the package being pushed to the internal feed up to an exception occurring? Thanks.

Ian