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
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?
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.
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.
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