mirror of
https://github.com/clearlinux/graphene.git
synced 2026-09-06 22:01:29 +00:00
[CI] Run shellcheck as part of Jenkins pipelines
The pipeline is failed only when pylint whines about the code actually touched as part of the pull request. The `run-shellcheck` script is provided so it can be reused, maybe in `.git/hooks/pre-push`.
This commit is contained in:
Executable
+21
@@ -0,0 +1,21 @@
|
||||
#!/bin/sh
|
||||
|
||||
cd "$(git rev-parse --show-toplevel)"
|
||||
|
||||
shellcheck "$@" \
|
||||
LibOS/shim/test/apps/bash/scripts/bash_test.sh \
|
||||
LibOS/shim/test/apps/common_tools/benchmark-http.sh \
|
||||
LibOS/shim/test/apps/python-simple/run-tests.sh \
|
||||
LibOS/shim/test/native/*.sh \
|
||||
Pal/ipc/linux/*.sh \
|
||||
Pal/src/host/FreeBSD/pal-gdb.template \
|
||||
Pal/src/host/Linux-SGX/debugger/gdb \
|
||||
Pal/src/host/Linux-SGX/sgx-driver/load.sh \
|
||||
Runtime/pal_loader \
|
||||
Scripts/clean-check \
|
||||
Scripts/clean-check-prepare \
|
||||
Scripts/clean-check-test-copy \
|
||||
Scripts/list-all-graphene.sh \
|
||||
Scripts/memusg \
|
||||
.ci/run-pylint \
|
||||
.ci/run-shellcheck
|
||||
@@ -3,6 +3,14 @@ pipeline {
|
||||
dockerfile { filename 'Jenkinsfiles/ubuntu-16.04.dockerfile' }
|
||||
}
|
||||
stages {
|
||||
stage('Lint') {
|
||||
steps {
|
||||
sh '''
|
||||
./.ci/run-shellcheck || :
|
||||
./.ci/run-shellcheck -f json | ./.ci/prfilter
|
||||
'''
|
||||
}
|
||||
}
|
||||
stage('Build') {
|
||||
steps {
|
||||
sh '''
|
||||
|
||||
@@ -8,6 +8,9 @@ pipeline {
|
||||
sh '''
|
||||
./.ci/run-pylint -f text || :
|
||||
./.ci/run-pylint -f json | ./.ci/prfilter
|
||||
|
||||
./.ci/run-shellcheck || :
|
||||
./.ci/run-shellcheck -f json | ./.ci/prfilter
|
||||
'''
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,6 +3,14 @@ pipeline {
|
||||
dockerfile { filename 'Jenkinsfiles/ubuntu-16.04.dockerfile' }
|
||||
}
|
||||
stages {
|
||||
stage('Lint') {
|
||||
steps {
|
||||
sh '''
|
||||
./.ci/run-shellcheck || :
|
||||
./.ci/run-shellcheck -f json | ./.ci/prfilter
|
||||
'''
|
||||
}
|
||||
}
|
||||
stage('Build') {
|
||||
steps {
|
||||
sh '''
|
||||
|
||||
@@ -8,6 +8,9 @@ pipeline {
|
||||
sh '''
|
||||
./.ci/run-pylint -f text || :
|
||||
./.ci/run-pylint -f json | ./.ci/prfilter
|
||||
|
||||
./.ci/run-shellcheck || :
|
||||
./.ci/run-shellcheck -f json | ./.ci/prfilter
|
||||
'''
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6,6 +6,14 @@ pipeline {
|
||||
}
|
||||
}
|
||||
stages {
|
||||
stage('Lint') {
|
||||
steps {
|
||||
sh '''
|
||||
./.ci/run-shellcheck || :
|
||||
./.ci/run-shellcheck -f json | ./.ci/prfilter
|
||||
'''
|
||||
}
|
||||
}
|
||||
stage('Build') {
|
||||
steps {
|
||||
sh '''
|
||||
|
||||
@@ -11,6 +11,9 @@ pipeline {
|
||||
sh '''
|
||||
./.ci/run-pylint -f text || :
|
||||
./.ci/run-pylint -f json | ./.ci/prfilter
|
||||
|
||||
./.ci/run-shellcheck || :
|
||||
./.ci/run-shellcheck -f json | ./.ci/prfilter
|
||||
'''
|
||||
}
|
||||
}
|
||||
|
||||
@@ -35,6 +35,7 @@ RUN apt-get update \
|
||||
python3-pip \
|
||||
python3-pytest \
|
||||
python3-scipy \
|
||||
shellcheck \
|
||||
texinfo \
|
||||
wget \
|
||||
zlib1g \
|
||||
|
||||
@@ -37,6 +37,7 @@ RUN apt-get update && env DEBIAN_FRONTEND=noninteractive apt-get install -y \
|
||||
python3-protobuf \
|
||||
python3-pytest \
|
||||
python3-scipy \
|
||||
shellcheck \
|
||||
texinfo \
|
||||
wget \
|
||||
zlib1g \
|
||||
|
||||
Reference in New Issue
Block a user