Investigation of new Pipeline options - bcgov/common-service-showcase GitHub Wiki

GitHub Actions

  • Direct integration with GitHub
    • Secrets are secure in repository settings
    • Environment protection rules can be set up per branch
      • Specify people or teams that must approve workflow runs in the environment (eg: can't run actions in prod unless a required reviewer allows it)
  • yaml based
    • Files are stored within a top level .github folder in the repository

PROS:

  • Direct integration with GitHub and GitHub events
  • Environment protection rules to prevent unwanted deploys
  • Only requires a single service account setup in OpenShift
  • yaml is more code like than Tekton's
  • Centralized pipeline - already using GitHub actions for other events

CONS:

  • yaml files require a push to the environment to change, frustrating for testing new configs
  • Fork based PR's will no longer function as they do not have access to the main repository secrets. These will have to be moved to branches

Tekton

  • Integration with OpenShift via OpenShift Pipelines (https://github.com/openshift/pipelines-tutorial)
  • yaml based
  • Task and pipeline files are stored within OpenShift namespace using oc create or oc apply
  • Requires TriggerTemplate, TriggerBinding, Trigger, & EventListener yaml files to be created which are used as hooks to GitHub to allow automation
  • Expose EventListener service as route, manually configure WebHook within GitHub settings
  • No apparent environment security, simply listens to the event and fires off the pipeline

PROS:

  • Direct integration with OpenShift
  • yaml files are easy to create/change via oc create or oc apply

CONS:

  • Lacks environment deployment security 
  • Many yaml files necessary for a single GitHub event

Discussion with some team members has resulted in a preference for utilizing GitHub Actions. Primarily due to the GitHub environment protection rules.

2 options for builds and deployments

Docker (https://github.com/docker)

RedHat (https://github.com/redhat-actions)

GitHub also provides starter workflows (https://github.com/actions/starter-workflows)

TODO: