summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.gitlab-ci.yml36
1 files changed, 18 insertions, 18 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 0e70af0..a4b2919 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -1,22 +1,22 @@
-variables:
-# uncomment for the pipeline debug purpose
- CI_DEBUG_TRACE: "true"
- CI_IMAGE: gitlab.int.toradex.com:4567/philippe.schenker/linux-toradex/ci-kernel-builder:gcc9
- DOCKER_HOST: tcp://docker:2375
- DOCKER_DRIVER: overlay2
- DOCKER_TLS_CERTDIR: ""
-
stages:
- - empty-stub
+ - check-license
-prepare_kernel:
- stage: empty-stub
- image: $CI_IMAGE
+check-license_job:
+ stage: check-license
variables:
- GIT_STRATEGY: fetch
- GIT_DEPTH: "1"
- script: |
- echo "Just return true. For now it is too tough to implement a real overlay checking."
- echo "It depends on possibly unmerged changes in the corresponding branch of linux kernel."
- true
+ EXPECTED_LIC_STR: "SPDX-License-Identifier: GPL-2.0-or-later OR MIT"
+ script:
+ - cd $CI_PROJECT_DIR/overlays
+ - |
+ for DTO in $(ls *dts)
+ do
+ head -n 1 $DTO | \
+ grep -q "${EXPECTED_LIC_STR}" || \
+ ERRMSG="${ERRMSG}License mssing, wrong or not on 1st line: ${DTO} \n"
+ done
+ if [ "${ERRMSG}" ]
+ then
+ echo -ne $ERRMSG
+ exit -1
+ fi