Greg
Greg

Reputation: 1377

how do I update an app created manually from git in Openshift?

If I create an app like this in my local openshift cluster (spring boot app with docker file):

oc new-app registry.access.redhat.com/redhat-openjdk-18/openjdk18-openshift~https://github.com/user/myrep.git --name=my-app-name

How can I update it later with changes that I push to the github registry? Is there something like "update-app"?

Upvotes: 1

Views: 698

Answers (1)

Simon
Simon

Reputation: 4485

When you create a new application using the oc new-app command as above, you are creating a S2I (Source-to-Image) based deployment. That means that there will also be a BuildConfig for your application (check with oc get bc).

So to manually trigger a build, use the following command:

oc start-build my-app-name

oc new-app and oc new-build will also create GitHub and Generic webhook triggers automatically, so these can be used to automatically trigger a build (for example whenever there is a commit). There is more information in the documentation: https://docs.openshift.com/container-platform/4.5/builds/triggering-builds-build-hooks.html

Upvotes: 3

Related Questions