How can applications and pipelines in OpenShift Online be cleaned up?

Updated -

In OpenShift Online, go to the Help question mark (?) in the upper right.

Select "Command Line Tools"
If you have not done so already download the oc binary for your platform via the link on that page and put it on your $PATH environment variable
Use the copy icon to copy the first command to get your token
Paste that into a terminal
Download the gofabric8 binary for your platform and add the gofabric8 binary to your $PATH environment variable
Type the following command:

gofabric8 tenant delete

This will remove all pipelines, jenkins jobs and deployed apps. It will also clean out the various Persistent Volumes in your account for the jenkins jobs, the content repository (where released and versioned artifacts go like pom.xml files, jars, kubernetes manifests etc) and the local maven repository used as a persistent cache to speed up builds and reduce noise in build logs.

You will then need to Update Tenant to update your tenant services.

You can check the status of your tenant via:

gofabric8 tenant check

If you wish to just clean up different parts of your tenant you can try the more fine grained clean commands:

gofabric8 clean jenkins
gofabric8 clean content-repo
gofabric8 clean maven-local-repo
gofabric8 clean apps

You can use the help to get more information:

gofabric8 help clean

Comments