forked from torvalds/linux
-
Notifications
You must be signed in to change notification settings - Fork 11
Expand file tree
/
Copy path.gitlab-ci.yml
More file actions
76 lines (72 loc) · 2.65 KB
/
.gitlab-ci.yml
File metadata and controls
76 lines (72 loc) · 2.65 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
---
include:
- project: "revolutionpi/infrastructure/ci-templates"
file: "base.yml"
- project: "revolutionpi/infrastructure/ci-templates"
file: "kernel-devel-package.yml"
- project: "revolutionpi/infrastructure/ci-templates"
file: "/testing/shared-submit.yml"
variables:
GIT_STRATEGY: fetch
SQUAD_PROJECT: "$CI_PROJECT_NAME"
checkpatch:
stage: test
image: debian:bookworm-slim
tags:
- self-hosted
- host-arm64
before_script:
# install dependencies
- apt-get update
- apt-get install --no-install-recommends -y curl jq ca-certificates codespell libcolor-ansi-util-perl git
script:
# fetch commit list from gitlab API
- COMMITS=$(curl -sL "http://gitlab.com/api/v4/projects/$CI_PROJECT_ID/merge_requests/${CI_MERGE_REQUEST_IID}/commits" | jq -r '.[].id')
# run checkpatch on each commit
- RC=0
- >
for commit in $COMMITS; do
echo -e "\e[0Ksection_start:`date +%s`:${commit}\r\e[0KCOMMIT ${commit}"
./scripts/checkpatch.pl --ignore FILE_PATH_CHANGES --color=never --codespell --git "${commit}" || RC=1
echo -e "\e[0Ksection_end:`date +%s`:${commit}\r\e[0K"
done
# let job fail, if at least one commit has errors
- exit $RC
rules:
- if: '$CI_PIPELINE_SOURCE == "merge_request_event"'
allow_failure: true
.shared-kernel-test-fields: &shared-kernel-test-fields
extends: .base-test-device
variables:
DEBIAN_FRONTEND: noninteractive
rules:
- if: $CI_COMMIT_TAG
- if: $CI_PIPELINE_SOURCE == "schedule"
- if: $CI_PIPELINE_SOURCE == "merge_request_event"
when: manual
allow_failure: true
- when: manual
script:
- !reference [.common-test-submit-script, script]
- !reference [.wait-for-lava-test-results, script]
- !reference [.create-report-external-links, script]
lava-test-kernel:
<<: *shared-kernel-test-fields
needs:
- job: build-kernel
before_script:
- apt-get update && apt-get install -y jq python3-configobj python3-requests python3-yaml python3-ruamel.yaml
- export ARTIFACTORY_API_URL="$ARTIFACTORY_URL/api/storage"
- export ARTIFACTS_URL="$ARTIFACTORY_URL/$ARTIFACTORY_UPLOAD_DIR/"
- |
artifacts=$(curl \
-sSfL \
-u "$ARTIFACTORY_USER:$ARTIFACTORY_TOKEN" \
"$ARTIFACTORY_API_URL/$ARTIFACTORY_UPLOAD_DIR/" | jq -r '.children | .[].uri | select(. | test("^(?!.*(libc|dbg)).*deb$"))')
artifacts_urls=""
for artifact in $artifacts; do
artifacts_urls="${artifacts_urls} $ARTIFACTS_URL$artifact"
done
- export INSTALL_PICONTROL_DKMS="true"
- export PKG_URL="$artifacts_urls"
- export SQUAD_BUILD="kernel-$(date +%Y%m%d)-${CI_COMMIT_SHORT_SHA}"