ros-industrial / industrial_ci

Easy continuous integration repository for ROS repositories
Apache License 2.0
241 stars 128 forks source link
catkin continuous-integration gitlab ros travis

================ Industrial CI

.. image:: https://travis-ci.com/ipa320/industrial_ci_mirror.svg?branch=mirror-master :target: https://travis-ci.com/ipa320/industrial_ci_mirror/branches :alt: Travis CI status .. image:: https://github.com/ros-industrial/industrial_ci/workflows/CI/badge.svg?branch=master :target: https://github.com/ros-industrial/industrial_ci/actions :alt: GitHub Actions status .. image:: https://gitlab.com/ipa-mdl/industrial_ci/badges/master/pipeline.svg :target: https://gitlab.com/ipa-mdl/industrial_ci/commits/master :alt: Gitlab CI status .. image:: https://img.shields.io/badge/License-Apache%202.0-blue.svg :target: https://opensource.org/licenses/Apache-2.0 :alt: License

CI (Continuous Integration) configuration for ROS (Robot Operating System <http://ros.org>). This is the refactored version with ROS2 support, the old version can be found in the legacy branch <https://github.com/ros-industrial/industrial_ci/tree/legacy>__. Please check the migration guide <doc/migration_guide.md> as well.

.. contents:: Table of Contents :depth: 2

Detailed documentation

Other than the brief introduction in this page, you can also check the detailed doc here <./doc/index.rst>__.

Introduction

This package contains CI (Continuous Integration) <https://en.wikipedia.org/wiki/Continuous_integration>__ scripts that any ROS-powered packages can commonly use. Some notable feature:

For a brief overall introduction, you could also check a presentation:

Quick Start

With a few steps, you can start in your client repository using CI confiurations stored in industrial_ci.

For Travis CI

  1. Activate CI for your github repository on Travis CI <https://travis-ci.com/>__).

    a) You may do so either at https://travis-ci.com/github/YOUR_GITHUB_ORGANIZATION or at https://travis-ci.com/github/YOUR_GITHUB_USER (depending on where your repository sits). b) Activate CI beta for your bitbucket repository is similar, but the target link that your status badge directs to needs to be modified from https://travis-ci.com/USERNAME/REPO_NAME to https://travis-ci.com/bitbucket/USERNAME/REPO_NAME. By default, the generated link directs to a github repository.

  2. Add .travis.yml file to your repository root (complete template <https://github.com/ros-industrial/industrial_ci/blob/master/doc/.travis.yml>__):

::

language: generic services:

For Gitlab CI

  1. Enable CI for your repo. Please refer to official doc <https://docs.gitlab.com/ee/ci/quick_start/>__ for the steps to do so. Note for Gitlab CI, necessary steps might be different between hosted version (i.e. the one on gitlab.com) v.s. the one on your own server, which Gitlab doesn't always clarify in its documentation.

    1. For your server version, enable a runner for your Gitlab project which uses the Docker executor. See instructions on how to install <https://docs.gitlab.com/runner/install/index.html> and register <https://docs.gitlab.com/runner/register/index.html> such a runner with your Gitlab instance if you haven't done so yet.
  2. In .gitlab-ci.yml file in your client repo, add the following minimal configuration (this snippet can be the entire content of the file), replacing indigo for your chosen distro:

::

image: docker:git services:

For Bitbucket Pipelines

  1. Enable CI for your repo. Please refer to official doc <https://confluence.atlassian.com/bitbucket/get-started-with-bitbucket-pipelines-792298921.html>__ for the steps to do so.
  2. In the bitbucket-pipelines.yml file in your client repo, add the following minimal configuration (this snippet can be the entire content of the file), replacing indigo for your chosen distro:

::

image: docker:git

pipelines: default:

For GitHub Actions

  1. Create .github/workflows/industrial_ci_action.yml (industrial_ci_action.yml is arbitrary, complete template <doc/industrial_ci_action.yml>__) with the following configuration, (this snippet can be the entire content of the file), replacing melodic for your chosen distro:

::

name: CI

on: [push, pull_request]

jobs: industrial_ci: strategy: matrix: env:

For Google Cloud Build

  1. Connect your source code repository to your Google Cloud Project. Please refer to the official documentation <https://cloud.google.com/build/docs/automating-builds/create-manage-triggers#gcloud>__ for the steps to do so.
  2. In the cloudbuild.yaml file in your client repo, add the following minimal configuration

::

steps:

Concrete examples of config files

Metrics

There might not an easy way to precisely count how many repositories out there are using industrial_ci. Counting that number isn't even our priority at all, but we're often simply curious. Here's some ways that give us some clues for the usage metrics:

EoF