Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions ceph-pr-clang-tidy/build/build
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
sudo apt-get install -y clang-tidy
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

of course this only works if the build machine is an apt-based system, which it may not be using your current node labels. It might be more appropriate to install the package inside the pbuilder image in that case, too, although it probably doesn't matter too much; there are ways of adding extra packages to the pbuilder image

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We still need an answer for this; does clang-tidy exist for RHEL-like systems? or do we want to restrict this job to only apt systems?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is available but for now lets keep the job to apt systems only

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How is this accomplished? won't the command be executed (and fail) on all systems?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The job specifies the labels for the jenkins builder it wants; we'll need to add something like 'jammy' as a label, that should suffice

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Where should I add this 'jammy' label?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

job.node is the list of labels the builder must satisfy. You probably want jammy && small

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

job.node is the list of labels the builder must satisfy. You probably want jammy && small

@dmick I have added node: jammy && small

61 changes: 61 additions & 0 deletions ceph-pr-clang-tidy/config/ceph-pr-clang-tidy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
- job:
name: ceph-pr-clang-tidy
node: small
project-type: freestyle
defaults: global
display-name: 'ceph: Clang-tidy checks'
concurrent: true
quiet-period: 5
block-downstream: false
block-upstream: false
retry-count: 3
properties:
- build-discarder:
days-to-keep: 15
artifact-days-to-keep: 15
- github:
url: https://github.com/ceph/ceph/

parameters:
- string:
name: ghprbPullId
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I suspect this is probably provided by the ghprb plugin, and doesn't need to/shouldn't be a settable parameter

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's the response to this?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I removed ghprbPullId as a settable parameter. However in others Jenkins jobs it is set as a settable parameter.

Reference:
1.

parameters:
- string:
name: ghprbPullId
description: "the GitHub pull id, like '72' in 'ceph/pull/72'"

parameters:
- string:
name: ghprbPullId
description: "the GitHub pull id, like '72' in 'ceph/pull/72'"

parameters:
- string:
name: ghprbPullId
description: "the GitHub pull id, like '72' in 'ceph/pull/72'"

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@dmick and what about this?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can leave it in for now; I don't think it's necessary but it might be useful for testing

description: "the GitHub pull id, like '72' in 'ceph/pull/72'"
default: origin/main

scm:
- git:
url: https://github.com/ceph/ceph.git
name: origin
branches:
- origin/pr/${ghprbPullId}/merge
refspec: +refs/pull/${ghprbPullId}/*:refs/remotes/origin/pr/${ghprbPullId}/*
skip-tag: true
shallow-clone: true
honor-refspec: true
timeout: 20

triggers:
- github-pull-request:
allow-whitelist-orgs-as-admins: true
org-list:
- ceph
trigger-phrase: 'jenkins test clang-tidy'
only-trigger-phrase: false
github-hooks: true
permit-all: true
auto-close-on-fail: false
status-context: "Signed-off-by"
started-status: "checking if bugs exist in file"
success-status: "no bugs found"
failure-status: "bugs found"

builders:
- shell:
!include-raw:
- ../../../scripts/build_utils.sh
- ../../build/build

publishers:
- junit:
results: report.xml
allow-empty-results: true