提交 6b3915ba 作者: Łukasz Magiera

ci: run go vet, disable docker on jenkins

License: MIT
Signed-off-by: 's avatarŁukasz Magiera <magik6k@gmail.com>
上级 9a3ff19f
import groovy.transform.Field
/* SETTINGS */
def test = 'go test -v ./...'
def fast_build_platforms = [
......@@ -20,6 +22,8 @@ def build_platforms = [
['freebsd', 'amd64']
]
/* PIPELINE UTILS */
def setupStep(nodeLabel, f) {
node(label: nodeLabel) {
def ps = nodeLabel != 'windows' ? '/' : '\\'
......@@ -58,6 +62,8 @@ def gobuild_step(list) {
}
}
/* PIPELINE */
ansiColor('xterm') { withEnv(['TERM=xterm-color']) { timeout(time: 30, unit: 'MINUTES') {
stage('Checks') {
parallel(
......@@ -66,6 +72,11 @@ ansiColor('xterm') { withEnv(['TERM=xterm-color']) { timeout(time: 30, unit: 'MI
run 'make test_go_fmt'
}
},
'go vet': {
setupStep('linux') { run ->
run 'go vet ./...'
}
},
'go build': {
gobuild_step(fast_build_platforms)
}
......@@ -113,7 +124,7 @@ ansiColor('xterm') { withEnv(['TERM=xterm-color']) { timeout(time: 30, unit: 'MI
run "make gx-deps"
try {
run "make -j12 -Otarget test/sharness/test-results/sharness.xml CONTINUE_ON_S_FAILURE=1 TEST_NO_FUSE=1"
run "make -j12 -Otarget test/sharness/test-results/sharness.xml CONTINUE_ON_S_FAILURE=1 TEST_NO_FUSE=1 TEST_NO_DOCKER=1"
} catch (err) {
throw err
} finally {
......
......@@ -46,7 +46,7 @@ index 6750ff7..7d9915a 100644
+esc=$(printf '\033')
+
+esc_xml() {
+ sed 's/&/\&amp;/g; s/</\&lt;/g; s/>/\&gt;/g; s/"/\&quot;/g; s///g;'
+ sed 's/&/\&amp;/g; s/</\&lt;/g; s/>/\&gt;/g; s/"/\&quot;/g; s/'"$esc"'/\&#27;/g; s///g;'
+}
+
test -n "$test_description" || error "Test script did not set test_description."
......
#!/usr/bin/env bash
cat > test-results/sharness.xml <<-EOF
<?xml version="1.0" encoding="UTF-8"?>
<?xml version="1.1" encoding="UTF-8"?>
<testsuites name="sharness">
$(find test-results -name '*.xml.part' | sort | xargs cat)
</testsuites>
......
......@@ -7,7 +7,7 @@
# settings
version=5eee9b51b5621cec95a64018f0cc779963b230d2
patch_version=7
patch_version=8
urlprefix=https://github.com/mlafeldt/sharness.git
if test ! -n "$clonedir" ; then
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论