Branching strategy
- Refer Here for git flow branching strategy
- Other two branching stratgies
- trunk based development (old)
- git lab branching strategy
Pipeline
-
Overview
-
Steps
- Jenkins Server with 3 nodes
- 1 node for building the code with label
build - ensure sonar qube is setup
- 1 nodes add as agents with label
systemtest - 1 nodes add as agents with label
perftest
- 1 node for building the code with label
- Jenkins Server with 3 nodes
- Experiment
- Write a pipeline where you build spring petclinic, perform sonar qube and then create two stages
ST: here run on agent with labelsystemtestand step issleep 5mPT: here run on agent with labelperftestand step issleep 7m
- Ensure both stages
STandPTexecute in parallel
- Write a pipeline where you build spring petclinic, perform sonar qube and then create two stages
pipeline {
agent none
stages {
stage('SCM') {
agent { label 'build' }
steps {
git url: '',
branch ''
}
}
stage('Build') {
agent { label 'build' }
steps {
sh 'mvn clean package'
}
}
stage('Deploy') {
parallel {
stage('ST') {
agent { label 'ST' }
steps {
sh 'sleep 5m'
// Add commands to run unit tests here
// terraform
}
}
stage('PT') {
agent { label 'PT' }
steps {
sh 'sleep 7m'
// Add commands to run integration tests here
// terraform
}
}
}
}
}
}
