Overview
The following will describe the “lay of the land” for the deployment pipeline for Banno, now Digital.
It will include:
- Creating an Application Repository
- Branching Strategy
- Setting up an App in the Jenkins
- Deploying to Kubernetes
Creating an Application Repository
At the Banno Organization in Github, create a new repository. For our purposes we’ll be using sdlc-example-app as an example.
Branching Strategy
The git-flow is optionally configured in the traditional master/main as being the production branch with either feature or release branching strategies (see for info)
The branching strategy is usually self-determined by each dev team depending on their use case.
Setting up an App in the Jenkins
In Jenkins, create a new project by going to the new job page. Here select Multibranch Pipeline as the project type.
After the project is created, click the Add source button under Branch Sources and select Github.
Jenkins is already configured to pull github repositories via the github-banno-autobot credentials, so select those to pull in the new project with the https link from the github repo to clone the project to Jenkins. Click Validate to verify the connection is working.
Once finished, click Save at the bottom of the page.
Deploying to Kubernetes
Our new project also needs a Jenkinsfile. Here is a baseline Jenkinsfile to get our project up and deploying on the Banno stack. NOTE: This assumes there is an image in Artifactory for the application.
library identifier: "banno-jenkins-shared-pipelines@v1", changelog: false
if (env.BRANCH_NAME == "master") {
library identifier: "environments@master", changelog: false
bannoEnvironmentsApplicationDeploy(
appName: "sdlc-example-app",
slackChannel: "#org-deployments",
slackTeamName: "@pulsar",
releaseVersion: version,
projectName: "sdlc-example-app",
)
}
Our app also needs the appropiate environments repo configuration in order to be deployed. Follow the docs for k8s app setup and run the job. By default, your app should deploy to staging, uat, and production!