How do you implement CI/CD using Jenkins?

0 votes
Aug 30 in Jenkins by Shawn
290 views

1 answer to this question.

0 votes

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'
           }
       }
   }
}
answered Aug 30 by Sirajul
• 29,340 points

Related Questions In Jenkins

0 votes
1 answer
0 votes
1 answer

How to do CI integration with code review tools

Here is an explanation. If you can switch ...READ MORE

answered Mar 26, 2018 in Jenkins by Atul
• 10,240 points
124 views
0 votes
1 answer

Error while talking to remote Oracle DB using Jenkins-CI

I installed Oracle XE to talk to ...READ MORE

answered May 1, 2018 in Jenkins by shubham
• 6,890 points
281 views
0 votes
1 answer

How do I pass value from my Fake # script to the host build server (Jenkins)

You can use the EnvInject plugin to pass environment ...READ MORE

answered Jul 11, 2018 in Jenkins by Kalgi
• 2,620 points
98 views
+13 votes
2 answers

Git management technique when there are multiple customers and need multiple customization?

Consider this - In 'extended' Git-Flow, (Git-Multi-Flow, ...READ MORE

answered Mar 26, 2018 in DevOps & Agile by DragonLord999
• 8,380 points
175 views
0 votes
1 answer
0 votes
1 answer

How do you configure automatic build in jenkins?

Works in Jenkins can be activated intermittently ...READ MORE

answered Aug 6 in Jenkins by Sirajul
• 29,340 points
247 views
0 votes
3 answers

How can I make Jenkins CI with Git trigger on pushes to master?

To automatically run build on code commit, follow ...READ MORE

answered Aug 7 in Jenkins by Sirajul
• 29,340 points
172 views