bcgov / NRPTI

Natural Resources Public Transparency Initiative
Apache License 2.0
5 stars 15 forks source link

Update NRPTI CI-CD to reflect our board #1154

Closed pinkyandthekane closed 5 months ago

pinkyandthekane commented 10 months ago

Describe the task We want to have a CI-CD pipeline that reflects the development workflow we follow for tackling tickets.

Purpose Purpose is to improve the developer experience.

Acceptance Criteria

Additional context

fergmac commented 6 months ago

The most straight forward approach is to use GitHub webhook flow with Tekton pipelines.

I don't think dockerizing the frontend is a requirement. We appear to have the required BuildConfigs inside OpenShift. Using the s2i build strategy. If we were starting from scratch it could make sense to dockerize the front end and use the docker build strategy.

Tests are currently being handled with GitHub Actions. SonarCloud appears to be handled by GitHub as well though there is no explicit SonarCloud workflow included in the repository.

Currently we are running the builds for:

Steps to migrate:

We need to update the related BuildConfigs in OpenShift to

Then complete the following steps:

We can create Tekton Pipelines in OpenShift to handle retagging the image and deploying to staging and production. Currently we do this manually:

oc tag nrpti:latest nrpti:test oc tag public-nrced:latest public-nrced:test oc tag nrpti-api:latest nrpti-api:test oc tag nrpti:test nrpti:test-backup

fergmac commented 6 months ago

Sonarcloud is setup at the organization level.

fergmac commented 6 months ago

In OpenShift we currently have an angular_app_build which builds first. The following three builds take the angular_app_build as input:

We only need to add the trigger for the github webhook to the angular_app_build and the above 3 builds should trigger.

LocalNewsTV commented 6 months ago

When I was doing my capstone project, we added hooks that sent alerts to teams on Success/Failure It might be beneficial to put notifications in Teams for Success/Failures.

It's worth noting that we never did get the Failure notification to properly work, as it wasn't a priority, so it didn't fire

I'm including the Actions we had for the API since the notifiers were at the bottom Our GH Action

Kind of a replacement for the Jenkins ones, but using teams instead of clogging emails. And you don't have to update the email list