REAL INDUSTRY PIPELINE PART TWO

Поделиться
HTML-код
  • Опубликовано: 22 ноя 2023
  • Pushing artifact to sonarqube and Nexus and Dockerising the artifact.
    Part 1 of the Jenkins pipeline
    • REAL INDUSTRY JENKINS ...
    Github Repository
    ================
    github.com/clemenrance/DEVOPS...
    scripts for the Jenkins file
    CONTINOUSE DOWNLOAD
    ====================
    2) git branch: 'main', url: 'github.com/clemenrance/Practi...
    UNIT TESTING
    ================
    2) sh'mvn test'
    INTEGRATION TESTING
    ====================
    3) sh'mvn verify -DskipUnitTests'
    CONTINOUS BUILD
    ================
    4) sh'mvn clean install'
    STATIC TEST ANALYSIS
    ============================
    5) withSonarQubeEnv(credentialsId: 'sonar-api'){
    sh 'mvn clean package sonar:sonar'
    QUALITY GATE ANALYSIS
    ===========================
    6) waitForQualityGate abortPipeline: false, credentialsId: 'sonar-api'
    UPLOAD ARTIFACT
    ===================
    7) nexusArtifactUploader artifacts: [[artifactId: 'springboot', classifier: '', file: 'target/Uber.jar', type: 'jar']], credentialsId: 'nexus-api', groupId: 'om.example', nexusUrl: '34.229.9.250:8081', nexusVersion: 'nexus3', protocol: 'http', repository: 'demoapp-release', version: '1.0.3'
    BUILD DOCKERFILE
    ====================
    8) sh 'docker build -t myuber .'
    sh 'docker tag myuber:latest clemenrance/cicd-images:myfirstdockerimage'
    PUSH DOCKERFILE TO DOCKERHUB
    =============================
    9)
    withCredentials([string(credentialsId: 'dockerhub_cred', variable: 'dockerhub_cred')]){
    sh 'docker login -u clemenrance -p ${dockerhub_cred}'
    sh 'docker push clemenrance/cicd-images:myfirstdockerimage'

Комментарии •