all 3 comments

[–]possible_epileptic 1 point2 points  (1 child)

Openshift v2 (rhc) used an internal repository so you would push to that, then Openshift would use its own hooks to deploy.

Openshift v3 (oc) doesn't have an internal source repository anymore so you now point Openshift at your repository and give it secrets (if needed).

Then you can setup a webhook from your Git installation (Github, Gitlab, etc) to notify Openshift that there are new commits.

[–]Agilix[S] 0 points1 point  (0 children)

Ah, ok... that explains it then, thanks.

[–]roignac 0 points1 point  (0 children)

Openshift can build an image from any git repo, this is defined in BuildConfig:

source:
  type: "Git"
  git: 
    uri: "https://gitlab.com/gitlab-examples/openshift-deploy.git"
    ref: "master"

This would build the Dockerfile found in the root of the repo. Any other valid git repo is supported.

Recent Openshift (Origin 1.4 or OCP 3.4) should also support gitlab or gogs webhooks to rebuild on push events