I have teamcity and octopus deploy working together. for the past few days i noticed one thing that octopus deploy is getting nuget package which was created in last teamcity build. Here is an example. Lets suppose i have a project with name XXX. I have created three build steps for it in teamcity. first for build , second to create octopus release package , this is to deploy package. I clean up both team city and octopus deploy so both are empty.
When i run the first build in Teamcity , it build (1.0.1) the code successfully and when it comes to create octopus release it throw error by saying
"Could not find any packages with ID XXX in the feed http://localhost:888/httpAuth/app/nuget/v1/FeedService.svc/. During build it create the nuget package XXX.1.0.1.nupkg. If i re-run the build this time everything will run successfully but in octopus deploy its using XXX.1.0.1.nupkg instead of XXX.1.0.2.nupkg. XXX.1.0.2.nupkg is most latest package.
Thanks for getting in touch! I am very sorry about the delay in getting back to you, I just found this trapped in our spam filter.
The answer to your question (if you have not already found the solution) is that Team City does not release packages to its own repository until after all build steps are completed.
So your create release build step needs to be in its own build configuration.
We have a video that explains this in more detail: http://octopusdeploy.com/learn/videos
Under Team city the video “TeamCity in-built feed” is the correct one.
I can’t see anything wrong with the information that you have provided.
Are you able to supply for me the create-release command you are using, and a screenshot of your project process (showing feed name and package name).
Please feel free to obscure the server name and API key. Those details I don’t need to see just everything else in the create-release line.
The image just does not have your full command with project name and any other variables, I need to see the whole command. The image is both cut off and doesn’t give the detail I need.
I also need the screenshot of your projects process.
I’m having somewhat of a similar issue. I build my project in TeamCity and I’m using the TeamCity Nuget feed. Octopus was at one point last week showing the latest package in the feed when I go to create a release. If I click on search for a specific release, it shows up.
Why is the Latest release column in Octopus now showing any values? See attache screenshot.
We don’t really cache anything in this case. When you view the feed in the library tab, and test the feed, is it ever slow to results?
Is your TC server on the same server as OD, or could there be any connectivity issues between either?
UPDATE - Ok I found the issue for why those resources were not found. Those process steps were configured to look at a different NuGet feed and not at TeamCity. This was a recent change. After fixing them, everything shows up correctly.
I’ having the same issue again. I’ve run the fix raven db command from the server. I’ve also restarted the TeamCity and Octopus services. Finally I restarted the machine. No effect, same issue.
I’ve attached screenshots highlighting the issue. When I go do create my release, it tells me it can’t find the latest release, but the previous release is the same version.
Selecting the previous version (which is the same as the latest release) and then proceeding, the next step tells me it still can’t find the resource.
Finally I go to the Tasks area and click on the feeds and test the TeamCity Feed and instantly I get the results I expect.
I was also having issues similar to getting latest package, but related to version number using API. I can’t figure out why Octopus Deploy API is getting the wrong VersionNumber, i already specified no-cache HTTP request headers, and even called twice to make sure it won’t get the previous value, but to no avail.
The inconsistencies happen when Octopus Deploy started the Promote Release from TeamCity. I first call the API to get the latest version number, since we need realtime information coming from Octopus Deploy. This first step already has an issue with the retrieval of VersionNumber, as compared to the dashboard telling us. How can we resolve this issue?
I believe when we call API, it should return the most-recent values, and not the previous value. I attached a screenshot for this matter.
To add more context, the version taken by Octopus Deploy was done was last 4 deployment action from TeamCity. I was wondering if this is related to the scheduled deployment we setup? Apparently, we have a 2-hour interval for scheduled deployment to DEV, it uses the same package if there are no changes made since last deployment. You will notice that we got 2 instances of deployed 126.96.36.19964. Maybe the API is recognizing this instead of the most-recent deployed? See screenshot attached for the deployment history for DEV.
It looks like your TeamCity script is calling promote-release with some arguments. But two important arguments are missing:
A project name should be getting passed
A from environment and to environment should be passed
The promote-release task is pretty simple - it takes the latest deployed release of project A in environment X, and deploys it to environment Y. Without these arguments I’m not sure why.
Since you have a specific version number, you should probably use the “Deploy release” runner instead of “Promote release” - the “Deploy release” runner lets you specify the specific version to deploy.
I agree, however, I’m talking about the API dashboard not getting the latest package. Promote-Release task was having the correct parameters. Yes, there are cases that Promote-Release not promoting the latest package from previous environment (possibly because the current deployment for the previous environment was not yet done or still in progress).
We used Promote-Release to prevent deploying the “in-progress” latest deployment from the previous environment.
Here’s the sample API dashboard URL I used to call to get the information I need:
I recalled reading your product documentation that RavenDB may not get the latest information after finishing deployments. Are there ways to get the latest information via API? (See my first post regarding this.)