I’ve created Environments, added a machine to one of them. I have a release (from TC). I added a couple of steps to the process.
I try to deploy a release to an environment and keep getting this -
There was a problem with your request.
At least one step must be enabled
I am stumped as to why this is happening and the error is not helping (since I don’t see a way to enable/desable steps).
Thanks for reaching out. On the same screen you are seeing that error, you should be able to see a section called Preview that shows all the steps defined on your deployment process. You need to have at least one of those enabled. To enable them just click on the button right next to the step name (see attached screenshot).
Now, if you cannot see any step on the preview section, it means you are trying to deploy to an environment that doesn’t have any step scoped to it. To fix this, go back to your deployment process, open your steps and setup the environment on where you want that step to be executed on the Environment field.
Steps preview was empty.
The step I have I ‘All Environments’. I figured it should’ve worked. I also tried to explicitly set ‘Test’ and that still didn’t work.
You mean under Conditions->Environment when you say Environments field? If not then what do you mean?
One of the things you also need to make sure line up are Roles. If you have a role for a process step, it must also exist on the environment(s) you are hoping to deploy to. We use this because we have several servers in each environment, but don’t want to deploy all code to all servers. Paul in his instructional videos gives examples of a database role and an application role (Those may not be the exact names, it’s been a bit since I’ve watched them, but it should give you an idea. Or go watch the video. ) https://octopusdeploy.com/learn/videos
(Specifically watch the deploy videos).
I’ve watched the videos and also followed step by step on the site. My steps are not appearing in deploy.
The only difference between mine and what’s id docs is that my packages are created from TeamCity (I don’t have nuget tab in configuration so I can’t test manually creating nuget).
I’m attaching some screenshots, maybe I missed something obvious –
Here’s the error –
Process tab –
Machine Settings -
What am I missing here?
Ok, I think there’s an issue with TeamCity plugin.
Here is the output -
[13:49:32]Running command: octo.exe create-release --server http://its --apikey SECRET --project LEAP --enableservicemessages --version 1.1.989
[13:49:32]Creating Octopus Deploy release
[13:49:33]Octopus Deploy Command Line Tool, version 22.214.171.124
[13:49:33]Handshaking with Octopus server: http://its
[13:49:34]Handshake successful. Octopus version: 126.96.36.1998; API version: 3.0.0
[13:49:34]Finding project: LEAP
[13:49:34]Finding deployment process for project: LEAP
[13:49:34]Finding release template…
[13:49:34]Resolving NuGet package versions…
[13:49:34]Finding latest NuGet package for step: Deploy LEAP
[13:49:34]Could not find any packages with ID ‘LEAP’ in the feed ‘octopus://’
[13:49:34]Using version number provided on command-line.
[13:49:34]Release plan for release: 1.1.989
[13:49:34] # Name Version Source
[13:49:34] — ------------- --------------- ------------------------------------
[13:49:34] 1 Deploy LEAP ERROR Cannot resolve
[13:49:34]Package versions could not be resolved for one or more of the package steps in this release. See the errors above for details. Either ensure the latest version of the package can be automatically resolved, or set the version to use specifically by using the --package argument.
[13:49:34]Exit code: -1
[13:49:34]Octo.exe exit code: -1
This same exact configuration worked for the first two builds.
Once I saw that I deleted my Project and re-created it. Instead of creating a package from TeamCity I did it manually this time and it worked.
Now, TeamCity is still failing with exact same error even though it worked the first couple of times.
Sorry for the delay on our response. Could you send us a full build log from Team City where you are also trying to create and upload the package? This should help us narrow down if it is a TeamCity plugin issue or not.
It is a massive log, what exactly are you looking for? What exactly does the error mean? What is it looking for/missing?
The following lines indicate that there isn’t a package with the ID LEAP on your octopus built-in feed. Reason why you cannot create the release.
[13:49:34]Resolving NuGet package versions...
[13:49:34]Finding latest NuGet package for step: Deploy LEAP
[13:49:34]Could not find any packages with ID 'LEAP' in the feed 'octopus://'
What i’m looking forward to see on the log are the lines where TeamCity creates and uploads the package to the built-in feed. This will help us know if its an issue with the TeamCity plugin or something else.
If you have sensitive info on your log, feel free to email it to us at support@OctopusDeploy.com
So I looked at the two times it did succeed and here’s the log –
[19:36:34]Step 5/5: OctopusDeploy: Create release (3s)
[19:36:34][Step 5/5] Octopus Deploy (3s)
[19:36:34][Octopus Deploy] Running command: octo.exe create-release --server http://its --apikey SECRET --project LEAP --enableservicemessages
[19:36:34][Octopus Deploy] Creating Octopus Deploy release
[19:36:34][Octopus Deploy] Octopus Deploy Command Line Tool, version 188.8.131.52
[19:36:35][Octopus Deploy] Handshaking with Octopus server: http://its
[19:36:36][Octopus Deploy] Handshake successful. Octopus version: 184.108.40.2068; API version: 3.0.0
[19:36:36][Octopus Deploy] Finding project: LEAP
[19:36:36][Octopus Deploy] Finding deployment process for project: LEAP
[19:36:36][Octopus Deploy] Finding release template…
[19:36:36][Octopus Deploy] Using version number from release template.
[19:36:36][Octopus Deploy] Creating release…
[19:36:37][Octopus Deploy] Release 0.0.2 created successfully!
[19:36:37][Octopus Deploy] ##teamcity[setParameter name=‘octo.releaseNumber’ value=‘0.0.2’]
[19:36:37][Octopus Deploy] Octo.exe exit code: 0
[19:36:37]Waiting for 2 service processes to complete
There are no other hits for ‘octo’ in the log.
What’s interesting is that according to the doc these nupkg should be in artifacts and they are not.
As you can see this looks different from the logs that fail. There’s no Resolving Nuget package part.
It is possible that in that case I did not have ‘octopack’ enabled on build step but it somehow still kinda worked.
I made sure to enable octopack during release build and this seems to be the only mention of it in the log right now –
[Step 3/5] Enabling OctoPack
Still no nupkg in artifacts.
Build step -
Octopus step -
The best way for us to help you troubleshoot this would be if you send us 2 Team City build logs, One of a successful build and one of a failing one. This way we could tell if you had Octopack enabled or not.