bitovi/bitops

Application repo Deployment sequence

PhillypHenning opened this issue · 2 comments

Describe the solution you'd like
Users should be able to specify an alternative deployment sequence within their application repo.

Example deployment sequence;
app_repo/bitops.config.yaml

bitops:
  deployment_sequence:
    folderA:
      output_file: outputA.env
      plugin: terraform
    folderB:
      input_file: outputA.env
      output_file: outputB.env
      plugin: terraform
    folderC:
      input_file: 
        - outputA.env
        - outputB.env
      output_file: outputB.env
      plugin: terraform
    folderD:
      plugin: ansible
armab commented

Can you provide a real-world use case of the deployment sequence?

I guess somewhat similar was described in #367.

There are deployments in bitops.config.yaml, which are ordered and represent the run sequence in the bitops ops repo:

deployments:
cloudformation:
plugin: cloudformation
terraform:
plugin: terraform
helm:
plugin: helm
ansible:
plugin: ansible

but the problem it's not overrideable on BitOps run per #259.

Test logs

Application configuration not present (falling back on bitops configuration)

{
    'cloudformation': {
        'plugin': 'cloudformation'
    },
    'terraform': {
        'plugin': 'terraform'
    },
    'helm': {
        'plugin': 'helm'
    },
    'ansible': {
        'plugin': 'ansible'
    }
}

Results: 🟢 expected results returned

Application configuratio present

ops_repo/bitops.config.yaml

bitops:
  deployments:
    deploy-part-1:
      plugin: terraform
    deploy-part-2:
      plugin: terraform
    deploy-part-3:
      plugin: ansible
{
    'deploy-part-1': {
            'plugin': 'terraform'
    }, 
    'deploy-part-2': {
        'plugin': 'terraform'
    }, 
    'deploy-part-3': {
        'plugin': 'ansible'
    }
}

Results: 🟢 expected results returned