Cycloid allows you to create multiple use cases for a stack. It means, you can handle different scenarios from the same stack, examples:

  • support multiple cloud providers (define different pipelines with different tools)
  • support multiple pipelines (define different pipelines from your environments specifications)
  • ...

# Usage

WARNING

this feature is compatible with the version: '2' of your .cycloid.yml, you need to add this to your .cycloid.yml to support multiple use cases feature:

---
version: '2'
name: 'my stack name'
...
1
2
3
4

Since your stacks will support multiple use cases, you need to define them inside the config section:

...
config:
  # define the default pipeline here
  default:
    name: 'my default use-case'
    description: 'this is the default pipeline of the stack'
    pipeline:
      pipeline:
        path: 'pipeline/pipeline.yml'
      variables:
        path: 'pipeline/variables.sample.yml'

  # define a use case here
  use-case-1:
    name: 'my other use-case'
    description: 'this is the second pipeline of the stack'
    pipeline:
      pipeline:
        path: 'pipeline/second-pipeline.yml'
      variables:
        path: 'pipeline/second-variables.sample.yml'
...
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22

You can add all the use cases you need.

# Multiple use cases example

Let's see the configuration of an actual multiple use cases on the Cycloid console, we will take the example of Terraform stack which allows you to run Terraform. This pipeline supports four use cases based on the backend storage of the terraform remote state(GCP, Azure, S3 or S3-compatible).

From the project creation wizard, you should see the Use a default pipeline toggle button: this is where the multiple use cases feature comes into play:

image

Selecting one of the proposed use cases, for example S3 API-compatible, would mean that all new environments will have this pipeline by default.

Once the project created, it is still possible to change the default pipeline by selecting the Reset pipeline button, then changing the selected pipeline by clicking on Change selected pipeline

image