Skip to content

Commit 6b01431

Browse files
carlescufide-nordic
authored andcommitted
[nrf noup] ci: NCS-specific CI tweaks
Necessary changes for NCS CI. - Add a Jenkinsfile - compliance.yml: Disable check for merge commits, since we have upmerges downstream. Add an additional check for sauce tags (details in scripts/gitlint) Also, since in the code we refer to Kconfig symbols that are defined in the sdk-nrf repository, the Kconfig checks (Kconfig and KconfigBasic) will not pass so exclude them. - Extend the max commit line lengths for Gitlint to account for sauce tags - Add a commit-tags workflow: This enables sauce tag checking in sdk-zephyr - scripts/gitlint: Add support for sauce tags checks. In order to not interfere with CI in other repos (namely sdk-nrf) this is run as an independent gitlint invocation and not as part of check_compliance.py. This invocation enables the ncs-sauce-tags rule and, since it runs before rebasing and thus will run on merge commits, disables the title-starts-with-subsystem rule by setting a catch-all regex. Signed-off-by: Carles Cufi <[email protected]> Signed-off-by: Dominik Ermel <[email protected]> Signed-off-by: Martí Bolívar <[email protected]> Signed-off-by: Vinayak Kariappa Chettimada <[email protected]> Signed-off-by: Krishna T <[email protected]> (cherry picked from commit d34b035) (cherry picked from commit 4a6d5fc) (cherry picked from commit a01c3a4) (cherry picked from commit 9b9ec58) Signed-off-by: Dominik Ermel <[email protected]>
1 parent 605f129 commit 6b01431

File tree

3 files changed

+40
-4
lines changed

3 files changed

+40
-4
lines changed

.github/workflows/commit-tags.yml

+31
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: Commit tags
2+
3+
on: pull_request
4+
5+
jobs:
6+
commit_tags:
7+
runs-on: ubuntu-22.04
8+
name: Run commit tags checks on patch series (PR)
9+
steps:
10+
- name: Update PATH for west
11+
run: |
12+
echo "$HOME/.local/bin" >> $GITHUB_PATH
13+
14+
- name: Checkout the code
15+
uses: actions/checkout@v3
16+
with:
17+
ref: ${{ github.event.pull_request.head.sha }}
18+
fetch-depth: 0
19+
20+
- name: Install python dependencies
21+
run: |
22+
pip3 install setuptools
23+
pip3 install wheel
24+
pip3 install gitlint
25+
26+
- name: Run the commit tags
27+
uses: nrfconnect/action-commit-tags@main
28+
with:
29+
target: '.'
30+
baserev: origin/${{ github.base_ref }}
31+
revrange: 'none'

.github/workflows/compliance.yml

+4-4
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,8 @@ jobs:
3838
git config --global user.name "Your Name"
3939
git remote -v
4040
# Ensure there's no merge commits in the PR
41-
[[ "$(git rev-list --merges --count origin/${BASE_REF}..)" == "0" ]] || \
42-
(echo "::error ::Merge commits not allowed, rebase instead";false)
41+
#[[ "$(git rev-list --merges --count origin/${BASE_REF}..)" == "0" ]] || \
42+
#(echo "::error ::Merge commits not allowed, rebase instead";false)
4343
git rebase origin/${BASE_REF}
4444
# debug
4545
git log --pretty=oneline | head -n 10
@@ -57,8 +57,8 @@ jobs:
5757
# debug
5858
ls -la
5959
git log --pretty=oneline | head -n 10
60-
./scripts/ci/check_compliance.py --annotate -e KconfigBasic \
61-
-c origin/${BASE_REF}..
60+
./scripts/ci/check_compliance.py --annotate -e KconfigBasic -e Kconfig \
61+
-e KconfigBasicNoModules -c origin/${BASE_REF}..
6262
6363
- name: upload-results
6464
uses: actions/upload-artifact@v3

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)

0 commit comments

Comments
 (0)