Giter VIP home page Giter VIP logo

jenkins-example's Introduction

Jenkins-example

This is just a basic introduction to the CI/CD tool Jenkins.

CI/CD stands for Continuous Integration and Continuous Deployment which comes under DevOps.

So, whenever we make changes in our code then Jenkins can automatically build and test it. With this it will be helpful to find any kind of bugs of failures in the application.

Installing Jenkins

Extensive documentation can be found here -> https://www.jenkins.io/doc/book/installing/

For Linux

For Debian based distributions

curl -fsSL https://pkg.jenkins.io/debian/jenkins.io.key | sudo tee \
  /usr/share/keyrings/jenkins-keyring.asc > /dev/null
echo deb [signed-by=/usr/share/keyrings/jenkins-keyring.asc] \
  https://pkg.jenkins.io/debian binary/ | sudo tee \
  /etc/apt/sources.list.d/jenkins.list > /dev/null
sudo apt update
sudo apt install jenkins

For Fedora

sudo wget -O /etc/yum.repos.d/jenkins.repo \
    https://pkg.jenkins.io/redhat-stable/jenkins.repo
sudo rpm --import https://pkg.jenkins.io/redhat-stable/jenkins.io.key
sudo dnf upgrade
# Add required dependencies for the jenkins package
sudo dnf install java-11-openjdk
sudo dnf install jenkins

For Arch based distributions

sudo pacman -Syy jenkins

If you are using a non-systemd init system then also install jenkins-runit or jenkins-openrc , according to your init system.


Start jenkins service

For systemd:

     see the official docs (or just google it, systemd is quite famous).

For Runit:

    1. create a symlink

         sudo ln -s /etc/sv/jenkins /var/service/jenkins

        or

         sudo ln -s /etc/runti/sv/jenkins /run/runit/service

    this should start the jenkins service immediately, if not then

    2. start the service

         sudo sv up jenkins

          or

        sudo sv start jenkins


Start jenkins-webapp

  1. first get the ip address of your machine

            For linux, run ifconfig command, and see the 'inet' line for ip address.

    2. paste this https://<your_ip>:8080 in the browser.    (the port number can be changed later)

    3. then the webapp starts

    4. cat out following file and paste its contents in the box

             cat /var/lib/jenkins/secrets/initialAdminPassword

There you Go :)

jenkins-example's People

Contributors

opc-16 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.