1.

How do you implement CI/CD using Jenkins?

Answer»
  • Continuous Integration using Jenkins and Git plugin
  • Create a new Jenkins item as a ‘Pipeline’.
  • Add ‘Git’ as BRANCH source and give the Project repository url.
  • Every time source code is pushed to the remote git repository from the local git repo;
  • Jenkins job gets started(triggered).
  • Jenkins build the code and the output is available under “CONSOLE output”
  • In the git repository add a ‘jenkinsfile’ COMMIT and push the code to git repository.
  • Add a Jenkinsfile in the git repository
pipeline {    AGENT { docker { image 'ubuntu:latest' } }    stages {        stage('build') {            STEPS {                sh 'uname -a'            }        } stage('Test') {            steps {                sh './jenkins/scripts/test.sh'            }        }    } }


Discussion

No Comment Found