1
0
mirror of https://github.com/ipfs/kubo.git synced 2025-06-26 07:28:20 +08:00

ci: run go vet, disable docker on jenkins

License: MIT
Signed-off-by: Łukasz Magiera <magik6k@gmail.com>
This commit is contained in:
Łukasz Magiera
2018-03-22 20:49:25 +01:00
parent 9a3ff19fa8
commit 6b3915ba90
4 changed files with 15 additions and 4 deletions

13
ci/Jenkinsfile vendored
View File

@ -1,5 +1,7 @@
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 {

View File

@ -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."

View File

@ -1,7 +1,7 @@
#!/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>

View File

@ -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