1
0
Fork 0
mirror of https://github.com/ceph/ceph-build.git synced 2026-02-04 02:23:59 +00:00
No description
Find a file
David Galloway 33ff085e8d
Merge pull request #2534 from ceph/fix-rebuild
ceph-tag: Fix condition for RCs
2026-02-03 15:03:53 -05:00
ansible ceph-tag: Fix condition for RCs 2026-02-03 14:10:44 -05:00
attic All: Limit PR checks to Ceph org 2025-12-10 14:06:50 -05:00
ceph/config/definitions Support for Ubuntu Noble 2025-06-26 22:10:51 -04:00
ceph-ansible-docs Update all jobs for jjb6: !include-raw -> !include-raw-verbatim 2025-02-13 20:10:06 -08:00
ceph-ansible-galaxy Update all jobs for jjb6: !include-raw -> !include-raw-verbatim 2025-02-13 20:10:06 -08:00
ceph-ansible-prs All: Limit PR checks to Ceph org 2025-12-10 14:06:50 -05:00
ceph-ansible-rpm Update all jobs for jjb6: !include-raw -> !include-raw-verbatim 2025-02-13 20:10:06 -08:00
ceph-ansible-scenario Update all jobs for jjb6: !include-raw -> !include-raw-verbatim 2025-02-13 20:10:06 -08:00
ceph-api-nightly *: update relevant scripts and triggers for tentacle 2025-03-24 14:20:41 -04:00
ceph-build Support for Ubuntu Noble 2025-06-26 22:10:51 -04:00
ceph-build-pull-requests Revert "ceph-build-pull-requests: set UTF-8 for ansible-galaxy" 2025-12-19 11:15:32 -05:00
ceph-cbt-lint/config/definitions All: Limit PR checks to Ceph org 2025-12-10 14:06:50 -05:00
ceph-dashboard-cephadm-e2e All: Limit PR checks to Ceph org 2025-12-10 14:06:50 -05:00
ceph-dashboard-cephadm-e2e-nightly/config/definitions *: update relevant scripts and triggers for tentacle 2025-03-24 14:20:41 -04:00
ceph-dashboard-pull-requests/config/definitions All: Limit PR checks to Ceph org 2025-12-10 14:06:50 -05:00
ceph-deploy/config/definitions master-> main 2022-05-19 15:04:57 -04:00
ceph-deploy-build Update all jobs for jjb6: !include-raw -> !include-raw-verbatim 2025-02-13 20:10:06 -08:00
ceph-deploy-docs Update all jobs for jjb6: !include-raw -> !include-raw-verbatim 2025-02-13 20:10:06 -08:00
ceph-deploy-pull-requests Remove admin lists from ghprb configs 2025-08-05 11:41:34 -04:00
ceph-deploy-tag Update all jobs for jjb6: !include-raw -> !include-raw-verbatim 2025-02-13 20:10:06 -08:00
ceph-dev/config/definitions Cleanup "crimson" flavor 2025-12-18 11:44:59 +02:00
ceph-dev-build Support for Ubuntu Noble 2025-06-26 22:10:51 -04:00
ceph-dev-cron Cleanup "crimson" flavor 2025-12-18 11:44:59 +02:00
ceph-dev-new/config/definitions Merge pull request #2497 from Matan-B/wip-matanb-crimson-cleanup 2025-12-19 10:52:05 -05:00
ceph-dev-new-build ceph-dev-new-build: add setup_container_runtime.sh 2025-07-31 12:30:20 -06:00
ceph-dev-new-setup ceph-dev-new-setup/build: Introduce crimson-tentacle builds 2025-12-18 11:54:01 +02:00
ceph-dev-new-trigger Cleanup "crimson" flavor 2025-12-18 11:44:59 +02:00
ceph-dev-pipeline Add Trixie 2026-01-23 19:25:55 -05:00
ceph-dev-pipeline-trigger ceph-dev-pipeline-trigger: CEPH_BUILD_BRANCH 2025-04-18 11:19:25 -06:00
ceph-dev-setup Added new project for copy artifact and updated build discarder 2025-06-10 00:08:39 +05:30
ceph-devstack/config/definitions Update all jobs with ${VAR} syntax to ${{VAR}} for jjb6 compatibility 2025-02-14 13:04:47 -08:00
ceph-grafana Update all jobs with ${VAR} syntax to ${{VAR}} for jjb6 compatibility 2025-02-14 13:04:47 -08:00
ceph-grafana-trigger Update all jobs with ${VAR} syntax to ${{VAR}} for jjb6 compatibility 2025-02-14 13:04:47 -08:00
ceph-iscsi Update all jobs for jjb6: !include-raw -> !include-raw-verbatim 2025-02-13 20:10:06 -08:00
ceph-iscsi-cli Update all jobs for jjb6: !include-raw -> !include-raw-verbatim 2025-02-13 20:10:06 -08:00
ceph-iscsi-cli-flake8 All: Limit PR checks to Ceph org 2025-12-10 14:06:50 -05:00
ceph-iscsi-cli-trigger/config/definitions Update all jobs with ${VAR} syntax to ${{VAR}} for jjb6 compatibility 2025-02-14 13:04:47 -08:00
ceph-iscsi-config Update all jobs for jjb6: !include-raw -> !include-raw-verbatim 2025-02-13 20:10:06 -08:00
ceph-iscsi-config-flake8 All: Limit PR checks to Ceph org 2025-12-10 14:06:50 -05:00
ceph-iscsi-config-trigger/config/definitions Update all jobs with ${VAR} syntax to ${{VAR}} for jjb6 compatibility 2025-02-14 13:04:47 -08:00
ceph-iscsi-stable Update all jobs with ${VAR} syntax to ${{VAR}} for jjb6 compatibility 2025-02-14 13:04:47 -08:00
ceph-iscsi-tools Update all jobs for jjb6: !include-raw -> !include-raw-verbatim 2025-02-13 20:10:06 -08:00
ceph-iscsi-tools-trigger/config/definitions Update all jobs with ${VAR} syntax to ${{VAR}} for jjb6 compatibility 2025-02-14 13:04:47 -08:00
ceph-iscsi-tox All: Limit PR checks to Ceph org 2025-12-10 14:06:50 -05:00
ceph-iscsi-trigger/config/definitions Update all jobs with ${VAR} syntax to ${{VAR}} for jjb6 compatibility 2025-02-14 13:04:47 -08:00
ceph-multibranch-pipeline/config/definitions ceph: multibranch: trust contributors' forks 2020-10-23 19:48:47 +02:00
ceph-perf-pull-requests/config/definitions Merge pull request #2497 from Matan-B/wip-matanb-crimson-cleanup 2025-12-19 10:52:05 -05:00
ceph-pr-api ceph-pr-api: Fix parameter 2025-12-20 17:40:37 -05:00
ceph-pr-commits All: Limit PR checks to Ceph org 2025-12-10 14:06:50 -05:00
ceph-pr-docs All: Limit PR checks to Ceph org 2025-12-10 14:06:50 -05:00
ceph-pr-submodules All: Limit PR checks to Ceph org 2025-12-10 14:06:50 -05:00
ceph-pull-requests ceph-pull-request: Don't run make check on CentOS9 2025-12-24 14:32:53 -05:00
ceph-pull-requests-arm64 All: Limit PR checks to Ceph org 2025-12-10 14:06:50 -05:00
ceph-qa-suite-pull-requests Remove admin lists from ghprb configs 2025-08-05 11:41:34 -04:00
ceph-release-containers ceph-release-container: add setup_container_runtime.sh 2025-07-21 16:08:47 -07:00
ceph-release-pipeline Add Trixie 2026-01-23 19:25:55 -05:00
ceph-release-rpm Update all jobs for jjb6: !include-raw -> !include-raw-verbatim 2025-02-13 20:10:06 -08:00
ceph-rook-e2e All: Limit PR checks to Ceph org 2025-12-10 14:06:50 -05:00
ceph-setup ceph*setup: Do not run on arm64 builders 2025-03-04 10:21:22 -05:00
ceph-source-dist Merge pull request #2456 from ceph/release-tars 2025-11-05 13:55:46 -08:00
ceph-tag ceph-tag: Add TAG_PHASE var 2025-10-31 10:14:49 -04:00
ceph-trigger-build Cleanup "crimson" flavor 2025-12-18 11:44:59 +02:00
ceph-volume-cephadm-prs All: Limit PR checks to Ceph org 2025-12-10 14:06:50 -05:00
ceph-volume-nightly *: update relevant scripts and triggers for tentacle 2025-03-24 14:20:41 -04:00
ceph-volume-scenario Update all jobs for jjb6: !include-raw -> !include-raw-verbatim 2025-02-13 20:10:06 -08:00
ceph-volume-test/config/definitions ceph-volume: functional testing refactor 2024-09-10 17:54:43 +02:00
ceph-volume-unit-tests All: Limit PR checks to Ceph org 2025-12-10 14:06:50 -05:00
ceph-website Update all jobs for jjb6: !include-raw -> !include-raw-verbatim 2025-02-13 20:10:06 -08:00
ceph-website-prs Update ceph-website-prs.yml to comment with website link on success 2025-10-16 19:55:05 -04:00
ceph-windows-image-build ceph-windows-image-build: Typo 2025-12-18 14:39:02 -05:00
ceph-windows-installer-build Fix more shellcheck errors 2025-08-21 12:50:02 -06:00
ceph-windows-pull-requests ceph-windows: Update qcow2 image location. Bump VM spec. 2025-12-20 14:06:32 -05:00
ceph-windows-test/config/definitions Update all jobs for jjb6: !include-raw -> !include-raw-verbatim 2025-02-13 20:10:06 -08:00
cephadm-ansible-prs cephadm-ansible-prs: do not pin to pip 22.4.0 2026-01-14 20:39:15 +01:00
cephmetrics Update all jobs for jjb6: !include-raw -> !include-raw-verbatim 2025-02-13 20:10:06 -08:00
cephmetrics-pull-requests Update all jobs with ${VAR} syntax to ${{VAR}} for jjb6 compatibility 2025-02-14 13:04:47 -08:00
cephmetrics-release Update all jobs for jjb6: !include-raw -> !include-raw-verbatim 2025-02-13 20:10:06 -08:00
chacra-pull-requests Remove admin lists from ghprb configs 2025-08-05 11:41:34 -04:00
configshell-fb Update all jobs for jjb6: !include-raw -> !include-raw-verbatim 2025-02-13 20:10:06 -08:00
jenkins-job-builder Update jenkins-job-builder spec to released version 2025-09-25 13:58:38 -07:00
kernel kernel: compile ice.ko module 2025-12-30 16:50:38 +01:00
kernel-trigger/config/definitions Update all jobs with ${VAR} syntax to ${{VAR}} for jjb6 compatibility 2025-02-14 13:04:47 -08:00
lab-cop Update all jobs for jjb6: !include-raw -> !include-raw-verbatim 2025-02-13 20:10:06 -08:00
merfi-pull-requests Update all jobs with ${VAR} syntax to ${{VAR}} for jjb6 compatibility 2025-02-14 13:04:47 -08:00
mita-deploy Update all jobs for jjb6: !include-raw -> !include-raw-verbatim 2025-02-13 20:10:06 -08:00
nfs-ganesha Update all jobs with ${VAR} syntax to ${{VAR}} for jjb6 compatibility 2025-02-14 13:04:47 -08:00
nfs-ganesha-stable Update all jobs with ${VAR} syntax to ${{VAR}} for jjb6 compatibility 2025-02-14 13:04:47 -08:00
paddles-pull-requests All: Limit PR checks to Ceph org 2025-12-10 14:06:50 -05:00
quay-pruner quay-pruner/build/util.py: handle debug tag suffix 2026-01-22 12:14:30 +02:00
radosgw-agent Update all jobs for jjb6: !include-raw -> !include-raw-verbatim 2025-02-13 20:10:06 -08:00
radosgw-agent-pull-requests Remove admin lists from ghprb configs 2025-08-05 11:41:34 -04:00
rtslib-fb Update all jobs for jjb6: !include-raw -> !include-raw-verbatim 2025-02-13 20:10:06 -08:00
rtslib-fb-trigger/config/definitions Update all jobs with ${VAR} syntax to ${{VAR}} for jjb6 compatibility 2025-02-14 13:04:47 -08:00
samba Update all jobs for jjb6: !include-raw -> !include-raw-verbatim 2025-02-13 20:10:06 -08:00
samba-trigger/config/definitions Update all jobs with ${VAR} syntax to ${{VAR}} for jjb6 compatibility 2025-02-14 13:04:47 -08:00
scripts Add Trixie 2026-01-23 19:25:55 -05:00
sepia-fog-images sepia-fog-images: add image test to 'poll for deploy' loop 2025-06-18 10:17:02 -07:00
shaman-pull-requests Remove admin lists from ghprb configs 2025-08-05 11:41:34 -04:00
sync-images sync-images: fix build script 2026-01-19 10:01:26 +05:30
tcmu-runner Update all jobs for jjb6: !include-raw -> !include-raw-verbatim 2025-02-13 20:10:06 -08:00
tcmu-runner-trigger/config/definitions Update all jobs with ${VAR} syntax to ${{VAR}} for jjb6 compatibility 2025-02-14 13:04:47 -08:00
wnbd-build Update all jobs with ${VAR} syntax to ${{VAR}} for jjb6 compatibility 2025-02-14 13:04:47 -08:00
.gitignore add .gitignore 2012-01-31 21:38:09 -08:00
README.rst master-> main 2022-05-19 15:04:57 -04:00

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

ceph-build
==========
A repository for Ceph (and Ceph-related projects) so that they can be
automatically configured in Jenkins.

The current state of the repo is of *transition* from single scripts to
a properly structured one with directories that represent each project.

The structure is strict and provides a convention to set the order of execution
of build scripts.

Job configuration is done via the CLI app `Jenkins Job Builder <http://ci.openstack.org/jenkins-job-builder/>`_
on the actual directory for `its own job
<http://jenkins.ceph.com/job/jenkins-job-builder/>`_ (the job has its
definition and its build process automated).

The JJB configuration defines the rules needed to generate and update/create
all other Jenkins Jobs in this repo as long as they define the
``config/definitions`` along with a valid YAML file.

This script should have all the rules and requirements for generating the
Jenkins configurations needed from the YAML files to create/update the jenkins
job.

Deprecation
-----------
Any script in the top level of this repo has been removed, and temporarily
placed in the ``deprecated`` branch. If a job requires any of those it should
be ported to follow the structure of the Jenkins Job Builder project, like all
the current jobs in this repository.

The ``deprecated`` branch will be removed by the end of 2018.

Any jobs removed from this repo will be automatically deleted by JJB.

Enforcement
-----------
The rules and structure for the builds are *strictly* enforced. If the
convention is not followed, the builds will not work.

Changing Jenkins jobs in Jenkins is **strongly** discouraged. Changing
something in the Jenkins UI does not guarantee it will persist and will
probably be overwritten.

By default, this is how a directory tree would look like for a build for
a project called ``foo`` that uses every choice available::

    foo
    ├── config
    |   ├── config
    |   └── definitions
    |       └── foo.yml
    ├── setup
    |   ├── setup
    |   ├── post
    |   └── pre
    └── build
        ├── build
        ├── post
        └── pre

This structure consists of two directories with scripts and one for
configuration. The scripts should be included in the ``foo.yml`` file in
whatever order the job requires.

For example, this is how it could look in the ``builders`` section for its
configuration::

    builders:
      # Setup scripts
      - shell: !include-raw ../../setup/pre
      - shell: !include-raw ../../setup/setup
      - shell: !include-raw ../../setup/post
      # Build scripts
      - shell: !include-raw ../../build/pre
      - shell: !include-raw ../../build/build
      - shell: !include-raw ../../build/post

These scripts will be added to the Jenkins server so that they can be executed
as part of a job.

Job Naming Conventions
----------------------
Each Jenkins job has two names:

1. The main name for a job. This is the ``name:`` parameter in YAML.

2. The human-friendly "display name" for a job. This is the ``display-name:``
   parameter in YAML.

For regular jobs, we name the Jenkins job after the git repository name. For
example, the "ceph-deploy" package is at https://github.com/ceph/ceph-deploy,
so the job name is "ceph-deploy".

For Pull Request jobs, we use a similar convention for both the internal job
name and the human readable "display name". For example, if the git repository
is "ceph-deploy", then we name the Jenkins job ``ceph-deploy-pull-requests``.
The ``display-name`` is set to ``ceph-deploy: Pull Requests``. In other words,
to determine a ``display-name`` for a job that handles pull requests, simply
append ``: Pull Requests`` to the ``name`` value.

In other words, for building pull requests to ceph-deploy, the Jenkins job YAML
will have the following settings:

* Git repo: https://github.com/ceph/ceph-deploy

* Jenkins job ``name``: ``ceph-deploy-pull-requests``

* Jenkins job ``display-name``: ``ceph-deploy: Pull Requests``


Scripts
-------
Scripts that may hang should be using the ``timeout`` command::

    timeout 600 ./bad-script.sh

The above command will make the job expire after ten minutes (the argument is
in seconds).

Pull Request Jobs
-----------------
When configuring a new job that will build pull requests, you must also
configure GitHub's repository to notify Jenkins of new pull requests.

#. In GitHub's web interface, click the "Settings" button for your repository.

#. Click the "Webhooks & Services" link in the "Options" menu on the left.

#. Under the "Webhooks" section, set the "Payload URL" to
   ``http://jenkins.ceph.com/ghprbhook/``.

#. Click the "Content type" dropdown and select
   ``application/x-www-form-urlencoded``.

#. For the question "Which events would you like to trigger this webhook?",
   select the ``Let me select individual events.`` radio, and check the ``Pull
   Request`` and ``Issue comment`` boxes.

#. Click the green "Update Webhook" button to save your changes.

On the Jenkins side, you should set up the job's GitHub project URL like so::

  - job:
      name: jenkins-slave-chef-pull-requests

      ...

      properties:
        - github:
            url: https://github.com/ceph/jenkins-slave-chef

This will tell the Jenkins GitHub Pull Requests plugin that it should
associate the incoming webhooks with this particular job.

You should also use the ``triggers`` setting for the job, like so::

  - job:
      name: jenkins-slave-chef-pull-requests

      ...

      triggers:
        - github-pull-request:
            cron: '* * * * *'
            admin-list:
              - alfredodeza
              - ktdreyer
            org-list:
              - ceph
            trigger-phrase: 'retest this please'
            only-trigger-phrase: false
            github-hooks: true
            permit-all: false
            auto-close-on-fail: false

"Document" Jobs
---------------
Some jobs don't actually run code; they simply build a project's documentation
and upload the docs to ceph.com. One example is the "teuthology-docs-build"
job.

For these jobs, note that the destination directory must be created on the
ceph.com web server before the ``rsync`` command will succeed.

Polling and GitHub
------------------
Jenkins can periodically poll Git repos on github.com for changes, but this is
slow and inefficient. Instead of polling GitHub, it's best to use GitHub's web hooks instead.

See the "jenkins-job-builder" job as an example.

1. Set up the ``triggers`` section::

    triggers:
      - github

2. Visit the GitHub repository's "settings" page, eg
   https://github.com/ceph/ceph-build/settings/hooks, and add a new web hook.

   - The Payload URL should be ``https://jenkins.ceph.com/github-webhook/``
     (note the trailing slash)
   - The ``Content type`` should be ``application/x-www-form-urlencoded``
   - ``Secret`` should be blank
   - Select ``Just send the push event``.

Testing JJB changes by hand, before merging to main
---------------------------------------------------

Sometimes it's useful to test a JJB change by hand prior to merging a pull
request.

1. Install ``jenkins-job-builder`` on your local computer.

2. Create ``$HOME/.jenkins_jobs.ini`` on your local computer::

    [jenkins]
    user=ktdreyer
    password=a8b767bb9cf0938dc7f40603f33987e5
    url=https://jenkins.ceph.com/

Where ``user`` is your Jenkins (ie GitHub) account username, and ``password``
is your Jenkins API token. (Note, your Jenkins API token can be found @
https://jenkins.ceph.com/ , for example
https://jenkins.ceph.com/user/ktdreyer/configure)

3. Switch to the Git branch with the JJB changes that you wish to test::

    git checkout <branch with your changes>

Let's say this git branch makes a change in the ``my-cool-job`` job.

4. Run JJB to test the syntax of your changes::

    jenkins-jobs --conf ~/.jenkins_jobs.ini test my-cool-job/config/definitions/my-cool-job.yml

   If everything goes ok, this will cause JJB to output the XML of your job(s).
   If there is a problem, JJB will print an error/backtrace instead.

5. Run JJB to push your changes live to job on the main::

    jenkins-jobs --conf ~/.jenkins_jobs.ini update my-cool-job/config/definitions/my-cool-job.yml

6. Run a throwaway build with your change, and verify that your change didn't
   break anything and does what you want it to do.

(Note: if anyone merges anything to main during this time, Jenkins will reset
all jobs to the state of what is in main, and your customizations will be
wiped out. This "by-hand" testing procedure is only intended for short-lived
tests.)

Assigning a job to a different Jenkins Master
---------------------------------------------

We found one Jenkins controller wasn't enough to handle all the jobs we were
demanding of it.  The CI now supports multiple Jenkins controllers.  If you wish to
run your job on a different Jenkins controller:

1. Create a ``config/JENKINS_URL`` file in your job directory containing only
   the FQDN of the target Jenkins controller::

    # Example
    $ cat my-cool-job/config/JENKINS_URL
    2.jenkins.ceph.com

A note on inclusive language
----------------------------

Like many software projects, the Ceph project has undertaken the task of
migrating to more inclusive language. In the Ceph CI,

``master`` branches are now ``main``

``slave`` is now ``builder``

When referring to the main Jenkins server, ``master`` is now ``controller``

Remaining references (like the Jenkins ``ssh-slaves`` plugin) are hardcoded
and could not be changed.