The build.yml github action will build the Dockerfile and push it to the OpenShift ImageStream you have configured. The Deployment in OpenShift is configured to update when there is a new image available so it will restart. Before you can run the workflow, ensure you have these variables and secrets configured:
OPENSHIFT_IMAGESTREAM_URL
variable- Looks like
image-registry.apps.silver.devops.gov.bc.ca/NAMESPACE/
(including -dev, test, prod or tools)
- Looks like
OPENSHIFT_IMAGESTREAM_USERNAME
secret- You can use the Pipeline user
OPENSHIFT_IMAGESTREAM_TOKEN
secret- You can use the Pipeline Token (From pipeline-token-xxxxxxxx)
- Deployment
- Service
- Route
- Network Policies to allow inbound traffic
- Configmap
- ImageStream (autogenerated on first push from Github
Copyright 2025 Province of British Columbia
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.