Giter Club home page Giter Club logo

kernelci-jenkins's Introduction

Jenkins Docker container with Config-as-Code

This repository contains the Jenkins Config-as-Code (JCasC) YAML needed to create a pre-configured Jenkins Docker container, and the job-dsl Groovy code for generating the KernelCI jobs. There are some sample docker-compose environment files with variables used for production, staging, and development.

Prerequisites

This Jenkins project is used to run a full KernelCI pipeline automatically. It needs at least a kernelci-backend instance to be able to publish kernel builds, and typically at least one LAVA lab instance to run tests. Installing those things is not covered here, please refer to their corresponding documentation.

Configuration

  • Copy the env file to .env and edit it with your own settings
  • Add any extra plugins (github-auth, openstack etc) to the plugins-extra.txt file and they will be included in the build.
  • Add your LAVA lab credentials in config/secrets.yaml
  • Any CasC YAML files that exist in the config directory will also be loaded, so you can create your own.
  • Jenkins nodes should be configured in config/nodes.yaml (you will have to create this).
  • Add any extra parameters you've used in your config to .env.
  • Edit the ADMIN_PASSWORD in .env.

Usage

Then the container can be used using regular docker-compose commands. Here are a few examples:

  • docker-compose up --build

    • action: start the container in the foreground
    • notes: useful when testing the configuration
  • docker-compose up --build -d

    • action: start the container in the background
    • notes: typical usage to keep the service running
  • docker-compose stop

    • action: stop the container
    • notes: useful when editing the configuration
  • docker-compose down

    • action: destroy the container
    • notes: WARNING: any jobs data or manual Jenkins configuration will be lost
  • docker-compose logs -f jenkins

    • action: read the Jenkins logs
    • notes: useful for monitoring activity
  • docker-compose exec jenkins bash

    • action: start an interactive shell in the running container
    • notes: useful to debug problems by accessing files directly

Initially a single job is created, this is the DSL seed job which can be used to create all the other ones defined in jobs.groovy. Open the Jenkins web UI and start this job to see the other ones listed below appear on the Jenkins instance.

Jenkins jobs

All the automated jobs on kernelci.org are run in Jenkins. Some legacy scripts are still being used in "freestyle" projects but they are gradually being replaced with Pipeline jobs. Each Pipeline job has a .jpl file located in the jenkins directory:

In addition to the job files, there are also some common library files located in the src/org/kernelci directory.

kernelci-jenkins's People

Contributors

gctucker avatar nuclearcat avatar khilman avatar matthartarm avatar patersonc avatar eballetbo avatar bleungatchromium avatar laura-nao avatar broonie avatar staging-kernelci-org 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.