Login to your OpenShift cluster
oc login
oc new-project clojure-s2i
oc new-build https://github.com/tfriman/s2i-clojure#refreshjvm11 --name s2i-clojure -n clojure-s2i
You can follow the build
oc logs -f bc/s2i-clojure -n s2i-clojure
You need to make this to have s2i to be visible within cluster.
oc tag clojure-s2i/s2i-clojure:latest openshift/s2i-clojure:latest
Create a test project
oc new-project clj-test
After the build has finished you can test your new builder:
oc new-build s2i-clojure~https://github.com/tfriman/clj-rest-helloworld#v1.0.0 --name=clj-test
And follow the build
oc logs -f bc/clj-test
After the build has finished create a new app:
oc new-app clj-test
And open the service to the world:
oc expose svc/clj-test
See the url for the application
oc get routes clj-test --template='{{ .spec.host }}'
And open it using your browser.
oc edit is/s2i-clojure -n openshift -o json
Make it look like this:
{
...
"spec": {
"tags": [
{
...
"annotations": {
"openshift.io/display-name": "S2I Clojure",
"description": "Build and deploy a Clojure app",
"iconClass": "icon-clojure",
"sampleRepo": "https://github.com/tfriman/clj-rest-helloworld",
"sampleRef": "v1.0.0",
"tags": "builder,clojure",
"version": "latest",
"supports": "clojure"
},
}
]
}
}
Wait for a while to catalog service to catch up and your Clojure S2I builder should appear in the "Import from Git" section.