mirror of
https://github.com/ipfs/kubo.git
synced 2025-06-27 07:57:30 +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:
13
ci/Jenkinsfile
vendored
13
ci/Jenkinsfile
vendored
@ -1,5 +1,7 @@
|
|||||||
import groovy.transform.Field
|
import groovy.transform.Field
|
||||||
|
|
||||||
|
/* SETTINGS */
|
||||||
|
|
||||||
def test = 'go test -v ./...'
|
def test = 'go test -v ./...'
|
||||||
|
|
||||||
def fast_build_platforms = [
|
def fast_build_platforms = [
|
||||||
@ -20,6 +22,8 @@ def build_platforms = [
|
|||||||
['freebsd', 'amd64']
|
['freebsd', 'amd64']
|
||||||
]
|
]
|
||||||
|
|
||||||
|
/* PIPELINE UTILS */
|
||||||
|
|
||||||
def setupStep(nodeLabel, f) {
|
def setupStep(nodeLabel, f) {
|
||||||
node(label: nodeLabel) {
|
node(label: nodeLabel) {
|
||||||
def ps = nodeLabel != 'windows' ? '/' : '\\'
|
def ps = nodeLabel != 'windows' ? '/' : '\\'
|
||||||
@ -58,6 +62,8 @@ def gobuild_step(list) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* PIPELINE */
|
||||||
|
|
||||||
ansiColor('xterm') { withEnv(['TERM=xterm-color']) { timeout(time: 30, unit: 'MINUTES') {
|
ansiColor('xterm') { withEnv(['TERM=xterm-color']) { timeout(time: 30, unit: 'MINUTES') {
|
||||||
stage('Checks') {
|
stage('Checks') {
|
||||||
parallel(
|
parallel(
|
||||||
@ -66,6 +72,11 @@ ansiColor('xterm') { withEnv(['TERM=xterm-color']) { timeout(time: 30, unit: 'MI
|
|||||||
run 'make test_go_fmt'
|
run 'make test_go_fmt'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
'go vet': {
|
||||||
|
setupStep('linux') { run ->
|
||||||
|
run 'go vet ./...'
|
||||||
|
}
|
||||||
|
},
|
||||||
'go build': {
|
'go build': {
|
||||||
gobuild_step(fast_build_platforms)
|
gobuild_step(fast_build_platforms)
|
||||||
}
|
}
|
||||||
@ -113,7 +124,7 @@ ansiColor('xterm') { withEnv(['TERM=xterm-color']) { timeout(time: 30, unit: 'MI
|
|||||||
run "make gx-deps"
|
run "make gx-deps"
|
||||||
|
|
||||||
try {
|
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) {
|
} catch (err) {
|
||||||
throw err
|
throw err
|
||||||
} finally {
|
} finally {
|
||||||
|
@ -46,7 +46,7 @@ index 6750ff7..7d9915a 100644
|
|||||||
+esc=$(printf '\033')
|
+esc=$(printf '\033')
|
||||||
+
|
+
|
||||||
+esc_xml() {
|
+esc_xml() {
|
||||||
+ sed 's/&/\&/g; s/</\</g; s/>/\>/g; s/"/\"/g; s///g;'
|
+ sed 's/&/\&/g; s/</\</g; s/>/\>/g; s/"/\"/g; s/'"$esc"'/\/g; s///g;'
|
||||||
+}
|
+}
|
||||||
+
|
+
|
||||||
test -n "$test_description" || error "Test script did not set test_description."
|
test -n "$test_description" || error "Test script did not set test_description."
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
cat > test-results/sharness.xml <<-EOF
|
cat > test-results/sharness.xml <<-EOF
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.1" encoding="UTF-8"?>
|
||||||
<testsuites name="sharness">
|
<testsuites name="sharness">
|
||||||
$(find test-results -name '*.xml.part' | sort | xargs cat)
|
$(find test-results -name '*.xml.part' | sort | xargs cat)
|
||||||
</testsuites>
|
</testsuites>
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
|
|
||||||
# settings
|
# settings
|
||||||
version=5eee9b51b5621cec95a64018f0cc779963b230d2
|
version=5eee9b51b5621cec95a64018f0cc779963b230d2
|
||||||
patch_version=7
|
patch_version=8
|
||||||
|
|
||||||
urlprefix=https://github.com/mlafeldt/sharness.git
|
urlprefix=https://github.com/mlafeldt/sharness.git
|
||||||
if test ! -n "$clonedir" ; then
|
if test ! -n "$clonedir" ; then
|
||||||
|
Reference in New Issue
Block a user