From 4344883eb64de685cd0bd812f61432979df718e2 Mon Sep 17 00:00:00 2001 From: Jim Minter Date: Tue, 8 Nov 2016 10:51:55 +0000 Subject: [PATCH] add Jenkinsfile --- openshift/pipeline/Jenkinsfile | 6 ++++++ openshift/pipeline/README.md | 14 ++++++++++++++ 2 files changed, 20 insertions(+) create mode 100644 openshift/pipeline/Jenkinsfile create mode 100644 openshift/pipeline/README.md diff --git a/openshift/pipeline/Jenkinsfile b/openshift/pipeline/Jenkinsfile new file mode 100644 index 0000000..44aa5d1 --- /dev/null +++ b/openshift/pipeline/Jenkinsfile @@ -0,0 +1,6 @@ +node('nodejs') { + stage 'build' + openshiftBuild(buildConfig: 'nodejs-ex', showBuildLogs: 'true') + stage 'deploy' + openshiftDeploy(deploymentConfig: 'nodejs-ex') +} diff --git a/openshift/pipeline/README.md b/openshift/pipeline/README.md new file mode 100644 index 0000000..bc5e366 --- /dev/null +++ b/openshift/pipeline/README.md @@ -0,0 +1,14 @@ +This directory contains a Jenkinsfile which can be used to build +nodejs-ex using an OpenShift build pipeline. + +To do this, run: + +```bash +# create the nodejs example as usual +oc new-app https://github.com/openshift/nodejs-ex + +# now create the pipeline build controller from the openshift/pipeline +# subdirectory +oc new-app https://github.com/openshift/nodejs-ex \ + --context-dir=openshift/pipeline --name nodejs-ex-pipeline +```