Can we use octo.exe to create a release for a package created in msbuild with the OctoPackAppendToPackageId parm?

We’re looking for a way to create “personal” releases (and deployments). We obtain the developer’s username up front.

We successfully create a set of nuget packages using msbuild with the following command:

&$msbuildExe "${solutionFolder}\${solutionFile}", '/p:RunOctoPack=true', `
  "/p:Configuration=$publishEnviron", "/p:OutputPath=${tempOutputPath}", `
  "/p:OctoPackPackageVersion=${version}", `
  "/p:OctoPackAppendToPackageId=${username}", '/fl', `
  "/flp:logfile=${tempOutputPath}\msbuild.log", `
  '/clp:ErrorsOnly;Verbosity=minimal', '/m', '/nologo'

We push the code to the nuget server with the following command:

&"D:\Program Files\Nuget\nuget.exe" 'push', $_.FullName, '-Source', $nugetSourceServer, `
  '-NonInteractive', '-Verbosity', 'quiet'

(Note that previously, the user has stored his API key for the nugetSourceServer in %AppData%\NuGet\NuGet.config.)

What we’re trying to do next is use octo.exe to create a “personal” release, but can’t figure out how to indicate to octo.exe that the release has the username appended to the package id.

When we try

&$octoExe 'create-release', '--project', $projectName, "--version=${version}", `
  "--packageversion=${version}", '--releasenotes', $releaseNotes, '--server', `
  $octopusServer, '--deployto', $publishEnviron, '--waitfordeployment', '--force'

we get a Failed: Acquire packages message.

Can you suggest a way to do this?

Thank you!

Hi Kirk,

Thanks for getting in touch! You aren’t going to be able to use the Package ID in this way, you could however add it to the version ie:#{version}-${usename} and then add that to the packageversion call when using create-release.

Let me know if this suits.
Vanessa

Vanessa,

That worked. Thanks!