Automatic Progression of a Release

Hi all,

I have the same configuration in my chain:

ENVIRONMENTS:

  • test
  • preproduction_01
  • preproduction_02
  • prod_01
  • prod_02

I woulkd like to implement the following:

  • from my jenkins machine I would like to be able to
  • automatically create a release and deploy to test (done)
    - octopus release create --project ‘test_application’ --channel ‘Default’ --version ‘0.0.’${BUILD_NUMBER} --no-prompt
    • octopus release deploy --project ‘test_application’ --version ‘0.0.’${BUILD_NUMBER} --environment ‘test_environment’ --no-prompt

When the release is done, I would like to automatically deploy the same version to:

  • preproduction_01
    then to
  • preproduction_02

I think about to use triggers but i cannot see the possibility to do that.
How can I achieve this?

If I would like, from my jenkins machines, to choose the deployment environments order (till the production that will be done manually), how can i do that?

For example…

  • One time I would like to deploy to - test then- preproduction_01 then - preproduction_02
  • The second time I would like to deploy to test then preproduction_02

Is there a way to inform octopus via CLI to do that only for those environments?

Thank you so much

Francesco

Hi @francesco.volonterio,

Thanks for reaching out to Octopus Support.
I’ll do my best to help you out how I can here.

It’s great that you can automatically create a release and deploy via Jenkins, that’s the first step out of the way and should make the rest of the process a lot more simple.

You mention wanting to automatically deploy to other environments once a certain environment (test) has had a successful deployment?

To do this, you would want to create certain lifecycles within Octopus.

In your case you can set up a lifecycle that has deployment phases that will automatically deploy to preproduction_01 after test has successfully completed and then to preproduction_02 after.

Screenshot 2023-03-06 at 11.41.26

To achieve your second point of a different automatic deployment path, you could set up a different lifecycle for your alternative environment ordering and then use channels to set up two channels within your project (one for each lifecycle).

This way, when you’re deploying via Jenkins, you can modify the “channel” parameter in your command to select which channel, and therefore which environments, you wish to deploy to.

You can view more information about using channels to control the deployment lifecycle here:
https://octopus.com/docs/releases/channels#Channels-ControllingDeploymentLifecycle

I hope this helps get you where you’d like to be! If you run into any issues or have any questions, don’t hesitate to get back to me.

Kind Regards,
Adam

1 Like

Thank you so much @adam.hollow!
I’ve tried with Lifecycle for the first part and it works correctly!
For the second part I think I need to check it better because i can have different combination of deployments…for example

  • test → preproduction_02
  • test → preproduction_01
  • test → preproduction_02 → preproduction_01
  • preproduction_01 → preproduction_02
  • preproduction_01
  • preproduction_02

I would like to ask the person that perform the build on Jenkins which are the targets that needs to be deployed automatically

Thanks again!

1 Like

This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.