Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Configurable Stages #44

Open
0x46616c6b opened this issue Jul 12, 2022 · 0 comments
Open

Configurable Stages #44

0x46616c6b opened this issue Jul 12, 2022 · 0 comments
Labels
enhancement New feature or request

Comments

@0x46616c6b
Copy link
Contributor

Feature Suggestion

At the moment three stages are hard coded and can't configured differently. This includes also the triggers when the stage should be updated. It would be a great option if the stages are configurable and more flexible for other projects with more stages or other names and other triggers.

Possible Implementation

Option 1

  • Parameter of the Action (only string can be used)
- name: GitOps (build, push and deploy a new Docker image)
  uses: Staffbase/gitops-github-action@main
  with:
    stages: |
      - name: 'dev'
        trigger: 'refs/heads/dev'
        files: ['kubernetes/namespaces/myService/dev/myService-deploy.yaml']
        path: 'spec.template.spec.containers.backend.image'
    
      - name: stage
        trigger: 'refs/heads/main'
        files: ['kubernetes/namespaces/myService/stage/myService-deploy.yaml']
        path: 'spec.template.spec.containers.backend.image'  
    
      - name: prod
        trigger: 'refs/tags/*'
        files: ['kubernetes/namespaces/myService/prod/myService-deploy.yaml']
        path: 'spec.template.spec.containers.backend.image' 
    # other options

Option 2

  • dot file in the repository, e.g .gitops or .github/gitops-github-action.yml
---
stages:
  - name: 'dev'
    trigger: 'refs/heads/dev'
    files: ['kubernetes/namespaces/myService/dev/myService-deploy.yaml']
    path: 'spec.template.spec.containers.backend.image'
  
  - name: stage
    trigger: 'refs/heads/main'
    files: ['kubernetes/namespaces/myService/stage/myService-deploy.yaml']
    path: 'spec.template.spec.containers.backend.image'  
  
  - name: prod
    trigger: 'refs/tags/*'
    files: ['kubernetes/namespaces/myService/prod/myService-deploy.yaml']
    path: 'spec.template.spec.containers.backend.image' 

Context

  • Configurable Stages for Deployment
@0x46616c6b 0x46616c6b added the enhancement New feature or request label Jul 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant