Giter Club home page Giter Club logo

jenkins_for_ros's Introduction

Jenkins Setup For ROS

Setup jenkins for ROS CI/CD cycle

Download 2 docker images

One image is for jenkins, and another image is for ROS test in jenkins

docker pull ros:melodic-ros-base
docker pull jenkins/jenkins:lts

Start Jenkins using Docker

docker run --name jenkins -u root -p 8080:8080 -v $(which docker):/usr/bin/docker -v /var/run/docker.sock:/var/run/docker.sock jenkins/jenkins:lts

Remember the password for future login, you will see something in terminal:

Jenkins initial setup is required. An admin user has been created and a password generated.
Please use the following password to proceed to installation:

483d1d6cd3de49db86f76efae8d8fd5f

This may also be found at: /var/jenkins_home/secrets/initialAdminPassword

open browser and go to localhost:8080

  • intall suggested pkgs and wait finish

go to Manage Jenkins-->Manage Plugins-->Available--> search docker

install following
    --> Docker
    --> Docker Commons
    --> Docker Pipeline
    --> docker-build-step 
    --> Docker Compose Build Step 
    --> Docker API 
    --> Blue Ocean
    
then click install without restart

add a Jenkinsfile on this repo(jenkins system will run this script)

  • See Jenkins file in this repo as example, we can add mutiple test, parallel test, etc...
  • In this Jenkins file. We have 2 stages in the test. The first one is the compilation test, in which it creates a workspace and do catkin_make. The second one is a parallel stages template, in which they just echo AA and BB.

Start Jenkins test - link to public repository

  • Following video shows you how to setup a pipeline in jenkins and add public repo for the test

Start Jenkins test - link to private repository

Create a token from your github. Go to your github: setting->Developer settings ->Personal access tokens ,then click Generate new token and record token number

  • Following image shows you how to add the token for the private repo pipeline:

  • Enter 'user name' and 'Password', the password is the token number

  • Once you fill the 'user name' and 'Password', in the Credential selection, you should see the name you just created

  • Once the Credential is added,the remain setup is the same as Start Jenkins test - link to public repository

Check Jenkins result

You can now use Blue Ocean to check result

jenkins_for_ros's People

Contributors

pstsengb avatar

Stargazers

Rafael Martin avatar Apola 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.