Hi all,
I’m trying to create a release using the Octopus CLI version 9.1.7
(the current latest), but I’m hitting an error when using the following command.
dotnet-octo create-release --space Spaces-182 --project Projects-3884 --version 1.0.8-INF-2382.6-b1e2 --defaultPackageVersion 1.0.8-INF-2382.6-b1e2 --gitRef INF-2382 --ignoreExisting
To confirm…
- The server URL and API key are provided via environment variables
OCTOPUS_CLI_SERVER
andOCTOPUS_CLI_API_KEY
. - The GitHub branch
INF-2382
exists. - The package at version
1.0.8-INF-2382.6-b1e2
required by the process exists and can be found when testing in Octopus. - The space
Spaces-182
exists. - The project
Projects-3884
exists.
When creating a release in the UI using the same GitHub branch and package version, everything works as expected.
Are you able to shed any light on the source of my issue?
The error
System.ArgumentNullException: Value cannot be null. (Parameter 'source')
at System.Linq.ThrowHelper.ThrowArgumentNullException(ExceptionArgument argument)
at System.Linq.Enumerable.Select[TSource,TResult](IEnumerable`1 source, Func`2 selector)
at Octopus.Client.Exceptions.OctopusValidationException..ctor(Int32 httpStatusCode, String message, ICollection`1 errors)
at CallSite.Target(Closure , CallSite , Type , Int32 , String , String[] , Object )
at System.Dynamic.UpdateDelegates.UpdateAndExecute5[T0,T1,T2,T3,T4,TRet](CallSite site, T0 arg0, T1 arg1, T2 arg2, T3 arg3, T4 arg4)
at Octopus.Client.Exceptions.OctopusExceptionFactory.CreateException(Int32 statusCode, String body)
at Octopus.Client.Exceptions.OctopusExceptionFactory.CreateException(HttpResponseMessage response)
at Octopus.Client.OctopusAsyncClient.DispatchRequest[TResponseResource](OctopusRequest request, Boolean readResponse, CancellationToken cancellationToken)
at Octopus.Client.OctopusAsyncClient.Get[TResource](String path, Object pathParameters)
at Octopus.Client.Repositories.Async.BasicRepository`1.Get(String idOrHref)
at Octopus.Cli.Util.RepositoryExtensions.FindByNameOrIdOrFail[T,TResource](T repository, Func`2 findByNameFunc, String resourceTypeIdPrefix, String resourceTypeDisplayName, String nameOrId, String enclosingContextDescription, Boolean skipLog) in D:\a\OctopusCLI\OctopusCLI\source\Octopus.Cli\Util\RepositoryExtensions.cs:line 36
at Octopus.Cli.Commands.ApiCommand.Execute(String[] commandLineArguments) in D:\a\OctopusCLI\OctopusCLI\source\Octopus.Cli\Commands\ApiCommand.cs:line 156
at Octopus.Cli.CliProgram.Run(String[] args) in D:\a\OctopusCLI\OctopusCLI\source\Octopus.Cli\CliProgram.cs:line 47
Installation
This is how I installed the tool.
foo@bar:~$ dotnet tool search Octopus.DotNet.Cli
Package ID Latest Version Authors Downloads Verified
---------------------------------------------------------------------------------------
octopus.dotnet.cli 9.1.7 Octopus Deploy 2123756 x
foo@bar:~$ dotnet tool update --global Octopus.DotNet.Cli --version 9.1.7
Tool 'octopus.dotnet.cli' was reinstalled with the latest stable version (version '9.1.7').
Thanks,
David