REAL INDUSTRY JENKINS PIPELINE WITH MAVEN, SONARQUBE AND NEXUS PART 1

Поделиться
HTML-код
  • Опубликовано: 4 ноя 2023
  • A full project that builds a jenkins pipe line which shows you how to ;
    - Create a github repository
    - Provide and configure all the servers that will run the project
    - Clone the github repository and start adding code
    - Push the modified code to the githop repository
    - Download the code from github into Jenkins
    - Perform unit test and integration tests on the code
    - Build an artififact from the code
    - Sent the artifact to a Sonarqube server
    - Perform static test and quality gate analysis on the artifact
    - Send the artifact to a Nexus artifactory
    link to the github repository where this project is located
    github.com/clemenrance/DEVOPS...
    Configuration scrips
    1) Script to install Jenkins
    ========================
    #!/bin/bash
    sudo apt update -y
    sudo apt install openjdk-11-jdk -y
    sudo apt-get install -y git maven
    sudo apt-get install docker.io -y
    sudo wget get.jenkins.io/war-stable/2.3...
    java -jar jenkins.war
    2) Script to install sonarqube
    =========================
    #!/bin/bash
    sudo apt update -y
    sudo apt install apt-transport-https ca-certificates curl software-properties-common -y
    curl -fsSL download.docker.com/linux/ubu... | sudo apt-key add -
    sudo add-apt-repository "deb [arch=amd64] download.docker.com/linux/ubuntu bionic stable" -y
    sudo apt update -y
    apt-cache policy docker-ce -y
    sudo apt install docker-ce -y
    #sudo systemctl status docker
    sudo chmod 777 /var/run/docker.sock
    docker run -d --name sonarqube -p 9000:9000 -p 9092:9092 owasp/sonarqube
    3) Script to install Nexus
    ====================
    #!/bin/bash
    sudo apt update -y
    sudo apt install apt-transport-https ca-certificates curl software-properties-common -y
    curl -fsSL download.docker.com/linux/ubu... | sudo apt-key add -
    sudo add-apt-repository "deb [arch=amd64] download.docker.com/linux/ubuntu bionic stable" -y
    sudo apt update -y
    apt-cache policy docker-ce -y
    sudo apt install docker-ce -y
    #sudo systemctl status docker
    sudo chmod 777 /var/run/docker.sock
    docker run -d -p 8081:8081 --name nexus sonatype/nexus3
    Please line follow share and keep any corrections and comments for continuous progress.
    Happy learning

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