Child step deploying IIS Website does not deploy the latest package

Hi

I started with two projects that always should be deployed at the same time.
Therefore I decided to create a child step in the first project deploying the second package.
But I experince that the first time I deploy the package it is not the latest that is deployed but the second latest.

I know the package is uploaded to the server because both projects deploy to Dev automatically when the packages are uploaded.
I then manually deploy to test where this child step has been inserted. See screendump.

http://screencast.com/t/bhkHYVDVv

What am I doing wrong?

Hi Nikolaj,

It looks like you are off to a good start, and have gotten some of the basic features of Octopus working for your project. I think I can see what would be going wrong with your deployment, and I have some suggestions about what best practices to use when setting up a project in Octopus.
From your screenshot I am making some assumptions so correct me if I am wrong. You have one project EdiPortal that needs to be run on both Dev and Test. And you have the second project EdiPortal.Controllers that only needs to be run on Test. Using these assumptions and how Octopus should work I suggest you do the following:

You do not need to necessarily have parent and child steps, and you also do not need to have a full set of steps that run on each environment.

You should start with a single package deploy step for your EdiPortal package that is not scoped to any environment. You would then have a second package step directly after for your EdiPortal.Controllers package and scope this to run on only Test.
You can then finish with a final step for your email notifications again not scoped to any environment.
See the screenshot that shows the project as setup without environmental scoping.

To help with the configuration of your projects that are specific to your environments for the two shared steps you should make use of Octopus Variables: http://docs.octopus.com/display/OD/Scoping+variables.
If you see the two screenshots I have provided, you can configure settings such as IIS settings as variables, then for each variable you can scope a value to your environments you are deploying to.

The above setups are important as when you now promote releases through the environments you do not have to worry about the wrong steps running on the wrong environments. It also means that any changes you make to the first package step will be instantly available for any environment, you do not need to worry about updating the settings twice.

This also means you can promote a single release through each environment and have confidence that the steps that run in Dev will also be run correctly in Test and then further on to Prod.
I would suggest reading up on Lifecycles also: http://docs.octopus.com/display/OD/Lifecycles

I believe that by changing your process to match these best practices you should not have package versioning problems between your deployments and releases.

Please let me know if you have any issues or if I can explain anything better.

Best regards,
Daniel

Hi Daniel

Thanks for your reply.

What I want to accomplish is a ”one step” deployment to test.
Which means that I only have to deploy to test once and then both EDI Portal end EDIPortal.Controllers are deployed within the same deployment cycle.
As I understand what you suggest would force me to deploy in two steps. Right?

I also need that EDIPortal.Controllers are installed as a website. Not just as a package.

I cant figure out if this was clear in my first email.

What is actually going on is this

  1.   On upload of EDIPortal and EDIPortal.Controllers are both packages installed as Websites caused by a trigger triggering when the packages are uploaded (It is this behavior I want when deploying to test)
    
  2.   When EDIPortal is deployed to test I want the EDIPortal.Controllers to be installed automatically. Both are websites.
    

I cant figure out if what you have written supports this.

Venlig Hilsen / Best regards

Nikolaj Nørup Sostack
Produktudviklingschef / Product Development Manager

[BIZbrains_logo orange]

Havneparken 1, 1 Sal, DK-7100 Vejle
T 33 60 16 12 | M 22 98 22 12 | W bizbrains.dkhttp://www.bizbrains.dk/

image001.jpg

Hi Nikolaj,

Thanks for getting back! I’m sorry for the delay in replying to you. I made a mistake when creating the screenshot for my previous response. I used package steps and not Deploy IIS Website steps, I am sorry for any confusion I caused here.

I think you might be slightly confused with how deployments work. The entire deployment process is run for each deployment. You can have as many steps as you need run in a single deployment. In your case 3 steps will run in Test and 2 steps will run in the other environments.

If have your steps configured as you see in screenshot1.jpg your deployment will run through and complete the EDIPortal step, proceeded the EDI.Controllers step then the email step.
I have only scoped the second step to test as I only want it to run on test, but if you notice my other steps are not scoped, that is because I want them to run on all environments

The email step being unscopped will run on all environments, so when the deployment is finished you should receive your email stating that it has successfully deployed. Assuming you have set the Run condition to Success: Only run when previous steps are successful.

When you run your deployment on Production, only steps 1 and 3 will run as the second step is restricted to the test environment.

I hope that helps explain this a bit better. Please let me know if you have any further questions. :slight_smile:

Best regards,
Daniel