Skip to content

Commit 6692263

Browse files
carlescufianangl
authored andcommitted
[nrf noup] ci: NCS-specific CI tweaks
Necessary changes for NCS CI. - Add a Jenkinsfile - Add a commit-tags workflow: This enables sauce tag checking in sdk-zephyr - compliance.yml: Disable check for merge commits, since we have upmerges downstream. Also, since in the code we refer to Kconfig symbols that are defined in the sdk-nrf repository, the Kconfig checks (Kconfig, KconfigBasic and KconfigBasicNoModules) will not pass so exclude them. Also, disable any maintainers-related checks - scripts/gitlint: Extend the max commit line lengths for Gitlint to account for sauce tags - Adapt to the changes in: nrfconnect/action-commit-tags#4 Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no> Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no> Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no> Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no> Signed-off-by: Krishna T <krishna.t@nordicsemi.no> Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no> (cherry picked from commit ef75b3e)
1 parent 5336bb3 commit 6692263

File tree

4 files changed

+38
-5
lines changed

4 files changed

+38
-5
lines changed

.github/workflows/commit-tags.yml

+28
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: Commit tags
2+
3+
on:
4+
pull_request:
5+
types: [synchronize, opened, reopened, edited, labeled, unlabeled,
6+
milestoned, demilestoned, assigned, unassigned, ready_for_review,
7+
review_requested]
8+
9+
jobs:
10+
commit_tags:
11+
runs-on: ubuntu-22.04
12+
name: Run commit tags checks on patch series (PR)
13+
steps:
14+
- name: Update PATH for west
15+
run: |
16+
echo "$HOME/.local/bin" >> $GITHUB_PATH
17+
18+
- name: Checkout the code
19+
uses: actions/checkout@v3
20+
with:
21+
ref: ${{ github.event.pull_request.head.sha }}
22+
fetch-depth: 0
23+
24+
- name: Run the commit tags
25+
uses: nrfconnect/action-commit-tags@main
26+
with:
27+
target: .
28+
upstream: zephyrproject-rtos/zephyr/main

.github/workflows/compliance.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,8 @@ jobs:
3131
git config --global user.name "Your Name"
3232
git remote -v
3333
# Ensure there's no merge commits in the PR
34-
[[ "$(git rev-list --merges --count origin/${BASE_REF}..)" == "0" ]] || \
35-
(echo "::error ::Merge commits not allowed, rebase instead";false)
34+
#[[ "$(git rev-list --merges --count origin/${BASE_REF}..)" == "0" ]] || \
35+
#(echo "::error ::Merge commits not allowed, rebase instead";false)
3636
rm -fr ".git/rebase-apply"
3737
rm -fr ".git/rebase-merge"
3838
git rebase origin/${BASE_REF}
@@ -83,7 +83,7 @@ jobs:
8383
# Increase rename limit to allow for large PRs
8484
git config diff.renameLimit 10000
8585
./scripts/ci/check_compliance.py --annotate -e KconfigBasic -e ClangFormat \
86-
-c origin/${BASE_REF}..
86+
-e Kconfig -e KconfigBasicNoModules -e ModulesMaintainers -c origin/${BASE_REF}..
8787
8888
- name: upload-results
8989
uses: actions/upload-artifact@v4

Jenkinsfile

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
@Library("CI_LIB") _
2+
3+
def pipeline = new ncs.sdk_zephyr.Main()
4+
5+
pipeline.run(JOB_NAME)

scripts/gitlint/zephyr_commit_rules.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ class TitleMaxLengthRevert(LineRule):
7878
name = "title-max-length-no-revert"
7979
id = "UC5"
8080
target = CommitMessageTitle
81-
options_spec = [IntOption('line-length', 75, "Max line length")]
81+
options_spec = [IntOption('line-length', 120, "Max line length")]
8282
violation_message = "Commit title exceeds max length ({0}>{1})"
8383

8484
def validate(self, line, _commit):
@@ -103,7 +103,7 @@ class MaxLineLengthExceptions(LineRule):
103103
name = "max-line-length-with-exceptions"
104104
id = "UC4"
105105
target = CommitMessageBody
106-
options_spec = [IntOption('line-length', 75, "Max line length")]
106+
options_spec = [IntOption('line-length', 120, "Max line length")]
107107
violation_message = "Commit message body line exceeds max length ({0}>{1})"
108108

109109
def validate(self, line, _commit):

0 commit comments

Comments
 (0)