"The resource 'Release '1.0.0.10' for project 'projects-1'' was not found."

Hello,

We are evaluating Octopus Deploy for use together with TeamCity. We have reached the step when TeamCity server successfully creates a NuGet package for the component (using OctoPack), but deployment to the server (with a tentacle installed) fails. Here what happens:

  1. The name of the Web service project to be deployed is NRK.DsIts.Host.
  2. I can see that the project build output contains NRK.DsIts.Host.1.0.0.10.nupkg file, and the version number 1.0.0.10 corresponds to the one generated by TeamCity.
  3. The Octopus Deploy project name is DsIts.
  4. Here’s the build output:

[12:43:17][Octopus Deploy] Running command: octo.exe deploy-release --server https://mabuild01:8443 --apikey SECRET --project DsIts --enableservicemessages --version 1.0.0.10 --deployto Dev
[12:43:17][Octopus Deploy] Promoting Octopus Deploy release
[12:43:17][Octopus Deploy] Octopus Deploy Command Line Tool, version 2.0.8.22
[12:43:17][Octopus Deploy]
[12:43:17][Octopus Deploy] Handshaking with Octopus server: https://mabuild01:8443
[12:43:20][Octopus Deploy] Handshake successful. Octopus version: 2.0.9.1020; API version: 3.0.0
[12:43:20][Octopus Deploy] Finding project: DsIts
[12:43:20][Octopus Deploy] Finding release: 1.0.0.10
[12:43:20][Octopus Deploy] Error from Octopus server (HTTP 404): The resource ‘Release ‘1.0.0.10’ for project ‘projects-1’’ was not found.
[12:43:20][Octopus Deploy] Exit code: -7
[12:43:20][Octopus Deploy] Octo.exe exit code: -7

What is strange here is the text “The resource 'Release ‘1.0.0.10’ for project ‘projects-1’”. What is “projects-1”? The only project we have is DsIts.

Also, if I go to Releases section of the project, I see text “This project hasn’t had any releases yet. To create the first release, use the button in the upper-right tools area.”, but I don’t see any button in the upper-right tools area.

Any ideas of what can go wrong here?
Thanks in advance

Vagif

To add more information: I haven’t set up NuGet feed for the projects because I was under impression that TeamCity plugin should handle it. I guess I misunderstood this. Does this mean that in addition to OctopusDeploy build step I have to create a another build step to copy NuGet package to file share that Octopus will be using?

I have now set up NuGet field in Octopus server, so I can see that there is a package published by TeamCity. Still the same error (see below). Can it be that there is a mismatch between package Id and project name?

Here’s the most recent package:
NRK.DsIts.Host.1.0.0.17.nupkg

And here’s the deployment log:
Running command: octo.exe deploy-release --server https://mabuild01:8443 --apikey SECRET --project DsIts --enableservicemessages --version 1.0.0.17 --deployto Dev

Handshaking with Octopus server: https://mabuild01:8443
Handshake successful. Octopus version: 2.0.9.1020; API version: 3.0.0
Finding project: DsIts
Finding release: 1.0.0.17
Error from Octopus server (HTTP 404): The resource ‘Release ‘1.0.0.17’ for project ‘projects-1’’ was not found.

… to give even more insight: manual deployment from Octopus Web site works fine. It’s just deployment from TeamCity that fails.

Hi Vagif,

I beleive the octo.exe create-release command is the one you need. If you’re using the TC plug-in, the “OctopusDeploy: Release” action should invoke this (it looks like the output above is from “OctopusDeploy: Promote”).

Hope this helps,
Nick

Hi Nicholas,

Thank you for the hint. Yes, that was it. I thought Release action only builds releases while Promote builds and promotes. I was wrong :slight_smile:

Vagif

I just ran into this as well. We had inadvertently chosen “deploy release” instead of “create release”. I have two suggestions:

  1. Improve the error message to suggest as a corrective action to switch the plugin selection to “create release”.
  2. When switching between create, deploy, and promote, though the form fields are largely the same, they already entered values are wiped. This is super annoying and particularly problematic if the user does not have access to generate a new api key hash.

Thank you david , your comment helped me to solve my problem

Had the same Problem… The error message seams not yet improved!?!

This was the cause of 2 days spent head scratching!

I had the same problem and changing it to create release resolved the “Error from Octopus server (HTTP 404): The resource ‘Release ‘1.0.0.17’ for project ‘projects-1’’ was not found.” error.

But for some reason Team City is creating two NuGet packages. The first package seems to be based off of one subfolder in the project, not the whole project. The second package includes the whole project. But Octopus is only deploying the first package.

I wonder if the octopus package was installed into the project twice somehow.

An alternative to CREATE release is to use the “Automatic Release” option in the process tab of your project.

“Create a release when a package is pushed to the built-in package repository”

Octopus will create the release when TC pushes the packages…

Solved my problem, the youtube deployment video was showing simply Release as the runner type.