The pipelines have been developed to be reusable across them. openshiftCD will be composed of the following pipeline templates:
Name
Description
Example
Required
appName
Application name
springboot
Yes
gitUrl
Application git URL
https://github.com/rhappdev/springboot-template.git
Yes
gitBranch
Desired branch to checkout
master
Yes
gitCredentials
Jenkins credential id needed to access the repository
gitlab-credentials
Yes
buildProject
Openshift namespace
test
Yes
baseImage
Base image name used to create the docker image
redhat-openjdk8-openshift:1.2
Yes
buildTag
Build Tag
latest
Yes
deployTag
Deploy Tag to be used in the deployment config
test
Yes
testStrategy
Integration test strategy to be used
postman
Optional
uatProject
namespace name in UAT
uat
Only master branch
prodProject
namespace name in prod
prod
Only master branch
Name
Description
Example
Required
appName
Application name
nodejs
Yes
gitUrl
Application git URL
https://github.com/rhappdev/nodejs-template.git
Yes
gitBranch
Desired branch to checkout
master
Yes
gitCredentials
Jenkins credential id needed to access the repository
gitlab-credentials
Yes
buildProject
Openshift namespace
test
Yes
baseImage
Base image name used to create the docker image
nodejs:8
Yes
buildTag
Build Tag
latest
Yes
deployTag
Deploy Tag to be used in the deployment config
test
Yes
testStrategy
Integration test strategy to be used
postman
Optional
uatProject
namespace name in UAT
uat
Only master branch
prodProject
namespace name in prod
prod
Only master branch
Name
Description
Example
Required
appName
Application name
nodejs
Yes
gitUrl
Application git URL
https://github.com/rhappdev/springboot-template.git
Yes
gitBranch
Desired branch to checkout
master
Yes
gitCredentials
Jenkins credential id needed to access the repository
gitlab-credentials
Yes
Name
Description
Example
Required
appName
Application name
nodejs
Yes
gitUrl
Application git URL
https://github.com/rhappdev/nodejs-template.git
Yes
gitBranch
Desired branch to checkout
master
Yes
gitCredentials
Jenkins credential id needed to access the repository
gitlab-credentials
Yes
type
Project Type
Library
Yes
If we want to have a good way to administrate the pipelines, we need to store them in a git repository and try to define pipelines as templates, reusable between projects. This means that depending the languages that we are using, we are going to define the following CI pipelines:
Maven CI pipeline for Java projects.
Name
Description
Example
Required
appName
Application name
nodejs
Yes
gitUrl
Application git URL
https://github.com/rhappdev/nodejs-template.git
Yes
gitBranch
Desired branch to checkout
master
Yes
gitCredentials
Jenkins credential id needed to access the repository
gitlab-credentials
Yes
buildProject
Openshift namespace
test
Optional
Javascript CI pipeline for javascript projects.
Name
Description
Example
Required
appName
Application name
nodejs
Yes
gitUrl
Application git URL
https://github.com/rhappdev/nodejs-template.git
Yes
gitBranch
Desired branch to checkout
master
Yes
gitCredentials
Jenkins credential id needed to access the repository
gitlab-credentials
Yes
buildProject
Openshift namespace
test
Optional
type
App Type
library
Optional
At this stage, we are going to run openshift, create images, push them to the registry and promote them between environments.
Name
Description
Example
Required
appName
Application name
nodejs
Yes
gitUrl
Application git URL
https://github.com/rhappdev/nodejs-template.git
Yes
gitBranch
Desired branch to checkout
master
Yes
gitCredentials
Jenkins credential id needed to access the repository
gitlab-credentials
Yes
buildProject
Openshift namespace
test
Yes
baseImage
Base image name used to create the docker image
nodejs:8
Yes
buildTag
Build Tag
latest
Yes
deployTag
Deploy Tag to be used in the deployment config
test
Yes
testStrategy
Integration test strategy to be used
postman
Optional
Name
Description
Example
Required
appName
Application name
nodejs
Yes
gitUrl
Application git URL
https://github.com/rhappdev/nodejs-template.git
Yes
gitBranch
Desired branch to checkout
master
Yes
gitCredentials
Jenkins credential id needed to access the repository
gitlab-credentials
Yes
buildProject
Openshift namespace
test
Yes
environment
Environment to set up, Valid: dev, test, uat and prod
test
Yes
Name
Description
Example
Required
gitUrl
Application git URL
https://github.com/rhappdev/nodejs-template.git
Yes
gitBranch
Desired branch to checkout
master
Yes
gitCredentials
Jenkins credential id needed to access the repository
gitlab-credentials
Yes
buildProject
Openshift namespace
test
Yes
environment
Environment to set up, Valid: dev, test, uat and prod
test
Yes
strategy
Integration test strategy to use
postman
Optional
openshiftPromoteAndDeploy
Name
Description
Example
Required
appName
Application name
nodejs
Yes
gitUrl
Application git URL
https://github.com/rhappdev/nodejs-template.git
Yes
gitBranch
Desired branch to checkout
master
Yes
gitCredentials
Jenkins credential id needed to access the repository
gitlab-credentials
Yes
buildProject
Openshift namespace
test
Yes
baseImage
Base image name used to create the docker image
nodejs:8
Yes
buildTag
Build Tag
latest
Yes
promotedProject
Openshift promoted namespace
uat
Yes
promotedTag
Promoted Tag name
uat
Yes
deployTag
Deploy Tag to be used in the deployment config
test
Yes
testStrategy
Integration test strategy to be used
postman
Optional