DevOps Classroomnotes 11/Mar/2023

Pull Request Based Workflow

  • Create a Github token
  • Configure GitHub Pull request builder plugin Refer Here
  • Add a webhook from Github to Jenkins http://<jenkinsip>:<port>/ghprbhook/, ensure content type is application/json
  • Refer Here for ui based navigations

Git Flow Branching Strategy

  • Refer Here for the article
  • Try what is GitLab Flow & GitHub Flow
  • Jenkinsfile Skeletons for
  • develop
pipeline {
    agent { label 'build' }
    stages {
        stage('vcs') {
            steps {
                git branch: 'develop',
                    url: ''
            }
        }
        stage('build and package') {
            steps {
                sh 'mvn clean package'
            }
        }
        stage('scans') {
            steps {
                sh 'Software Component Analysis'
                sh 'Static Code Analysis'
                sh 'quality gate'
            }
        }
    }
    post {
        failed {
            # send mail to author in to and rest in CC
        }
    }

}
  • release
pipeline {
    agent { label 'build' }
    stages {
        stage('vcs') {
            steps {
                git branch: 'develop',
                    url: ''
            }
        }
        stage('build and package') {
            steps {
                sh 'mvn clean package'
            }
        }
        stage('scans') {
            steps {
                sh 'Software Component Analysis'
                sh 'Static Code Analysis'
                sh 'quality gate'
            }
        }
        stage('artifactory') {
            steps {
                sh 'push to jfrog'
            }
        }
        stage('deploy to System Test Env') {
            agent { label 'terraform' }
            steps {
                sh 'terraform apply'
                sh 'ansible-playbook' # virtual machines
                or
                sh 'kubectl apply -f <>' # container

            }
        }
        stage ('test System Test Env') {
            agent { label 'selenium test' }
            steps {
                sh 'selenium tests and publish results'

            }
        }
        stage('deploy to Performance Test Env') {
            agent { label 'terraform' }
            steps {
                sh 'terraform apply'
                sh 'ansible-playbook' # virtual machines
                or
                sh 'kubectl apply -f <>' # container

            }
        }
        stage ('test Performance Test Env') {
            agent { label 'performance test' }
            steps {
                sh 'jmeter tests and publish results'

            }
        }
        stage('deploy to Security Test Env') {
            agent { label 'terraform' }
            steps {
                sh 'terraform apply'
                sh 'ansible-playbook' # virtual machines
                or
                sh 'kubectl apply -f <>' # container

            }
        }
        stage ('test Security Test Env') {
            agent { label 'security test' }
            steps {
                sh 'burpsuite tests and publish results'

            }
        }

    }
    post {
        failed {
            # send mail to author in to and rest in CC
        }
    }

}

Published
Categorized as Uncategorized Tagged

By continuous learner

devops & cloud enthusiastic learner

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Please turn AdBlock off
Floating Social Media Icons by Acurax Wordpress Designers

Discover more from Direct DevOps from Quality Thought

Subscribe now to keep reading and get access to the full archive.

Continue reading

Visit Us On FacebookVisit Us On LinkedinVisit Us On Youtube