Used to describe the process of creating custom images in a cicd way for OpenShift Dev Spaces. Image gets pushed to quay, so a user secret is needed.
Assuming you are using this project as a part of the devspaces-demo project, you will have the steps described in the Readme there already completed. You will need to create the quay.io secret in the devspaces-image namespace as well.
oc project devspaces-image
oc get secret quay-secret -o json \
| jq 'del(.metadata["namespace","creationTimestamp","resourceVersion","selfLink","uid"])' \
| oc apply -n devspaces-demo -f -
oc secret link pipeline quay-secret
This project shows a full circle for a workspace environment with connected pipelines and gitops. To deploy (and after you have completed the prerequisites), configure the argoapp.yaml
file and apply it in your namespace via:
oc apply -f argoapp.yaml
To use this project on your own you'll have to do these steps:
- Fork this project
- Create the devspaces-image repository in quay.io
- Set your git and quay repo urls in the
helm/values.yaml
file - Set your git repo url in the
argoapp.yaml
file - Commit everything
- Apply the argo app via
oc apply -f argoapp.yaml
- In the browser, navigate in your forked github devspaces-image project to the settings page and open your webhooks
- Copy your pipeline event listener url via
oc get route devspaces-developer-image-el-route -n devspaces-image -o go-template='{{.spec.host}}'
- Create a webhook, paste the pipeline and set the content type to json
- Open your Dev Spaces project, for example via link: [https://devspaces.apps.ocp.ocp-gm.de/#https://github.com/sa-mw-dach/devspaces-developer-image]
- Start coding cool stuff
The pvcs are configured to be not deleted at helm uninstall. You should always delete them manually.
If some pvc gets stuck you can fix this via
oc patch pvc <pvc-name> -p '{"metadata":{"finalizers": []}}' --type=merge