This is a mapping application providing high-volume receiving site registration to Indigenous Nations, municipalities and other interested parties. Subscribe for notifications in your area!
BC users in BC submit soil relocation information using a CHEFS form (link coming soon)
This script is run on a schedule
Data from CHEFS forms is uploaded to ArcGIS Online (AGOL) and soil movement subscribers are notified
This information is displayed in the frontend, which is be made public soon
The Project uses OpenShift CronJobs
The template is here
The workflow file for build and deploy is here.
GitHub secrets are passed as environment variables through a configmap.
The CHES API Key is generated from Postman, by providing the username(client_id) and (client_secret). That populates as environment variable(CHES_API_OAUTH_SECRET) in the pipeline.
Cronjob times are in UTC, like the OpenShift servers.
NOTE: This application is the middle layer between CHEFS forms and AGOL, neither of which offer non-PROD environments. Once our application hits production and becomes publicly available this approach will be revisited.
Clone this repository and make changes in feature branches (e.g. feat/abc). Submit changes in Pull Requests against the main branch.
Once the code is reviewed and approved, merge it to main branch.
Now the code can be deployed to TEST/PROD environments.
PROD Deployment
Go to the Actions tab, click on Build And Add Job to Openshift Prod and trigger a build
release
prefix, if the latest release shows release/1.0.0
, your input should be 1.0.1
The workflow will:
Build and push a container image to the GitHub Container Registry (GHCR.io), tagged with the release you provided
Create the matching GitHub release/tag
Deploy code and configmap changes to OpenShift
A cronjob will be deployed in the PROD environment using the new image
TEST Deployment
Go to the Actions tab, click on Build And Add Job to Openshift Test and trigger the job. The workflow will, do the following:
latest
Environment variables are supplied to the container through the configmap using GitHub Secrets
Environment varialbes must be updated only through GitHub Secrets, our source of truth
The cronjob is scheduled to run daily at 8 AM UTC (1AM PDT)
Cronjobs can be triggered manually, usually for testing, with the One-Time Job steps below
Sometimes waiting for a scheduled cronjob is not practical. These steps explain how to run a one-time job.
Visit the appropriate OpenShift console
Copy the spec.spec.containers section of the cronjob template, including the container's TAG
Go to Jobs menu in the same namespace and click Create Job, located on the right hand side
Populate the job, and below, and click Create
Name: sris-1-of-job-$name
, using your own name for $name
Containers: using the code copied in step 2, above
Verify that a new container is running your new job
Finally, delete this and any other completed jobs
.github/workflows/ci-openshift-prod.yaml
.
openshift/sris-schedule-job.yml