Example project running:
- static static webserver
- php webserver
- hhvm webserver
You need oc locally installed:
create a new project
oc new-project example \
--description="Examples weepee registry" \
--display-name="Examples Weepee Registry"
Look in BuildAll.sh for all Build Examples
create an ssh deploy key without passphrase
> ssh-keygen -f ~/.ssh/openshift-my-static-site
> oc secrets new-sshauth openshift-my-static-site --ssh-privatekey=/home/joeri/.ssh/openshift-my-static-site
> oc secrets add serviceaccount/builder secrets/openshift-my-static-site
Update the BuildConfig (Modify and Append BuildConfig-Secrets.yaml.template to your Buildconfig) (Remove old BuildConfig first !)
> oc delete -f Buildconfig.yaml
> oc create -f BuildConfig.yaml
Add your key to the deploy keys of you repository on GitHub
> cat ~/.ssh/openshift-my-static-site.pub
Routes to a production hostname
> oc create -f Route-production.yaml
You can find the (github and generic) webhook in the openshift control pannel ! (Browse - Builds) You can copy the url to clipboard and paste it in Github webhook url (handy for rolling updates)
You can trigger on different Branches just modify your BuildConfig
source:
git:
ref: release
uri: https://github.com/weepee-org/openshift-example-project.git
contextDir: php/
type: Git