Skip to content

Trying out pull request changes in an OpenShift cluster

Michael Sauter edited this page Nov 9, 2023 · 5 revisions

For the remainder of this guide, we'll assume the branch you want to try out is named feature/some-new-functionality, and ODS Pipeline is already installed in a namespace called foo-cd. Adjust as necessary throughout.

Create a BuildConfig resource for every image you need to build, that is start, finish and pipeline-manager.

Example configuration for start:

kind: BuildConfig
apiVersion: build.openshift.io/v1
metadata:
  name: ods-start-preview
  namespace: foo-cd
spec:
  nodeSelector: null
  output:
    to:
      kind: ImageStreamTag
      name: 'start:latest'
  resources: {}
  successfulBuildsHistoryLimit: 5
  failedBuildsHistoryLimit: 5
  strategy:
    type: Docker
    dockerStrategy:
      dockerfilePath: build/images/Dockerfile.start
  postCommit: {}
  source:
    type: Git
    git:
      uri: 'https://github.com/opendevstack/ods-pipeline'
      ref: feature/some-new-functionality
  runPolicy: Serial

Also, for each build config, create an ImageStream with corresponding name (for the example above, start).

After all images have been created, run the install script like this:

curl -fsSL https://raw.githubusercontent.com/opendevstack/ods-pipeline/feature/some-new-functionality/deploy/install.sh | bash -s -- -n=foo-cd \
  --set imageRepository=image-registry.openshift-image-registry.svc:5000/foo-cd,imageTag=latest
Clone this wiki locally