File tree 3 files changed +21
-1
lines changed
3 files changed +21
-1
lines changed Original file line number Diff line number Diff line change @@ -41,6 +41,7 @@ RUN set -Eeuxo pipefail && \
41
41
python3-numpy \
42
42
python3-pip \
43
43
python3-venv \
44
+ shellcheck \
44
45
sudo && \
45
46
apt-get -qy autoremove && \
46
47
apt-get clean && \
Original file line number Diff line number Diff line change @@ -25,6 +25,7 @@ pipeline {
25
25
stage(' Lint' ) {
26
26
environment {
27
27
PYTHON_MODULES = " ${ env.PYTHON_PACKAGE} test *.py"
28
+ SHELL_SCRIPTS = ' *.sh'
28
29
}
29
30
steps {
30
31
sh """ #!/usr/bin/env bash
@@ -37,6 +38,8 @@ pipeline {
37
38
echo "\$ {PIPESTATUS[0]}" | tee flake518_status.log
38
39
python3 -m pydocstyle ${ PYTHON_MODULES} |& tee pydocstyle.log
39
40
echo "\$ {PIPESTATUS[0]}" | tee pydocstyle_status.log
41
+ shellcheck ${ SHELL_SCRIPTS} |& tee shellcheck.log
42
+ echo "\$ {PIPESTATUS[0]}" | tee shellcheck_status.log
40
43
"""
41
44
}
42
45
}
@@ -61,7 +64,11 @@ pipeline {
61
64
echo "${PIPESTATUS[0]}" | tee coverage_status.log
62
65
'''
63
66
script {
64
- defaultHandlers. afterPythonBuild()
67
+ if (env. CHANGE_ID ) {
68
+ HashMap toolResults = pythonUtils. prepareLintingReport()
69
+ toolResults[' shellcheck' ] = languageUtils. prepareToolReport(' shellcheck' )
70
+ repoUtils. postToolsReportOnPR(toolResults)
71
+ }
65
72
}
66
73
}
67
74
}
Original file line number Diff line number Diff line change
1
+ #! /usr/bin/env bash
2
+ set -Eeuxo pipefail
3
+
4
+ HOSTNAME=$( hostname)
5
+ USER=$( whoami)
6
+
7
+ FILES=(' README.rst' ' examples.ipynb' )
8
+
9
+ for file in " ${FILES[@]} " ; do
10
+ sed -i " s|${USER} |user|" " ${file} "
11
+ sed -i " s|${HOSTNAME} |hostname|" " ${file} "
12
+ done
You can’t perform that action at this time.
0 commit comments