Continuous integration and deployment - open-telemetry/opentelemetry.io

Continuous Integration and Deployment (CI/CD) for the OpenTelemetry project can be managed using various options, which are abstractions of the complexities around these processes. Sample configurations are provided in the repository for setting up CI/CD pipelines with Google Cloud Platform (GCP) and other vendors.

Key Technologies and Dependencies:

  • The Big Picture
  • Design Philosophy
  • Programming languages
  • Hugo
  • Netlify CLI
  • Prettier
  • Textlint
  • Markdown-link-check
  • Gulp
  • PostCSS-CLI
  • Autoprefixer
  • Markdownlint
  • Cspell

Online Documentation:

CI/CD Options:

  1. GitHub Actions: GitHub Actions is a popular choice for CI/CD pipelines, as it is integrated with GitHub and allows for automating workflows for various events, such as push or pull requests. The OpenTelemetry project has documentation on using GitHub Actions for continuous integration.

Example:

name: CI

on:
push:
branches: [ main ]
pull_request:
branches: [ main ]

jobs:
build:
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v2

- name: Set up JDK 11
uses: actions/setup-java@v2
with:
java-version: '11'
distribution: 'adopt'
cache: 'gradle'

- name: Grant execute permission for gradlew
run: chmod +x gradlew

- name: Build and Test
run: ./gradlew build test
  1. GitLab CI/CD: GitLab CI/CD is another option for CI/CD pipelines, offering similar functionality to GitHub Actions. The OpenTelemetry project has documentation on using GitLab CI/CD for continuous integration.

Example:

stages:
- build
- test

build_job:
stage: build
script:
- echo "Building the app"

test_job:
stage: test
script:
- echo "Testing the app"
  1. CircleCI: CircleCI is a popular CI/CD platform that supports various languages and frameworks. The OpenTelemetry project has documentation on using CircleCI for continuous integration.

Example:

version: 2.1

jobs:
build:
docker:
- image: circleci/node:latest
environment:
NODE_ENV: development
TZ: UTC

steps:
- checkout
- run: npm install
- run: npm test
  1. Netlify CI/CD: Netlify is a popular platform for deploying web projects, and it offers CI/CD functionality as well. The OpenTelemetry project uses Netlify for deploying the opentelemetry.io website.

Example:

# netlify.toml
[build]
command = "npm run build"
publish = "dist"
  1. Jenkins: Jenkins is a widely-used open-source automation server that can be self-hosted. The OpenTelemetry project has documentation on using Jenkins for continuous integration.

Example:

pipeline {
agent any

stages {
stage('Build') {
steps {
echo 'Building..'
}
}
stage('Test') {
steps {
echo 'Testing..'
}
}
stage('Deploy') {
steps {
echo 'Deploying....'
}
}
}
}

Sources: