File tree Expand file tree Collapse file tree 8 files changed +30
-18
lines changed Expand file tree Collapse file tree 8 files changed +30
-18
lines changed Original file line number Diff line number Diff line change @@ -39,15 +39,15 @@ retry go get github.com/cespare/prettybench
39
39
export KUBE_RACE=" "
40
40
# Disable coverage report
41
41
export KUBE_COVER=" n"
42
- export ARTIFACTS_DIR =${WORKSPACE} /_artifacts
42
+ export ARTIFACTS =${ARTIFACTS :- " ${ WORKSPACE} /artifacts " }
43
43
44
- mkdir -p " ${ARTIFACTS_DIR } "
44
+ mkdir -p " ${ARTIFACTS } "
45
45
cd /go/src/k8s.io/kubernetes
46
46
47
47
./hack/install-etcd.sh
48
48
49
49
# Run the benchmark tests and pretty-print the results into a separate file.
50
50
make test-integration WHAT=" $* " KUBE_TEST_ARGS=" -run='XXX' -bench=. -benchmem" \
51
51
| tee \
52
- >( prettybench -no-passthrough > ${ARTIFACTS_DIR } /BenchmarkResults.txt) \
53
- >( go run test/integration/benchmark/jsonify/main.go ${ARTIFACTS_DIR } /BenchmarkResults_benchmark_$( date -u +%Y-%m-%dT%H:%M:%SZ) .json || cat > /dev/null)
52
+ >( prettybench -no-passthrough > ${ARTIFACTS } /BenchmarkResults.txt) \
53
+ >( go run test/integration/benchmark/jsonify/main.go ${ARTIFACTS } /BenchmarkResults_benchmark_$( date -u +%Y-%m-%dT%H:%M:%SZ) .json || cat > /dev/null)
Original file line number Diff line number Diff line change @@ -36,8 +36,10 @@ go get -u github.com/jstemmer/go-junit-report
36
36
37
37
# Enable the Go race detector.
38
38
export KUBE_RACE=-race
39
- # Produce a JUnit-style XML test report for Jenkins.
40
- export KUBE_JUNIT_REPORT_DIR=${WORKSPACE} /_artifacts
39
+ # Set artifacts directory
40
+ export ARTIFACTS=${ARTIFACTS:- " ${WORKSPACE} /artifacts" }
41
+ # Produce a JUnit-style XML test report
42
+ export KUBE_JUNIT_REPORT_DIR=" ${ARTIFACTS} "
41
43
# Save the verbose stdout as well.
42
44
export KUBE_KEEP_VERBOSE_TEST_OUTPUT=y
43
45
Original file line number Diff line number Diff line change @@ -39,9 +39,10 @@ retry go get github.com/jstemmer/go-junit-report
39
39
export KUBE_RACE=-race
40
40
# Disable coverage report
41
41
export KUBE_COVER=" n"
42
- # Produce a JUnit-style XML test report for Jenkins.
43
- export KUBE_JUNIT_REPORT_DIR=${WORKSPACE} /artifacts
44
- export ARTIFACTS_DIR=${WORKSPACE} /artifacts
42
+ # Set artifacts directory
43
+ export ARTIFACTS=${ARTIFACTS:- " ${WORKSPACE} /artifacts" }
44
+ # Produce a JUnit-style XML test report
45
+ export KUBE_JUNIT_REPORT_DIR=" ${ARTIFACTS} "
45
46
# Save the verbose stdout as well.
46
47
export KUBE_KEEP_VERBOSE_TEST_OUTPUT=y
47
48
export KUBE_INTEGRATION_TEST_MAX_CONCURRENCY=4
Original file line number Diff line number Diff line change @@ -31,10 +31,10 @@ retry() {
31
31
32
32
export PATH=${GOPATH} /bin:${PWD} /third_party/etcd:/usr/local/go/bin:${PATH}
33
33
34
- # Produce a JUnit-style XML test report
35
- export KUBE_JUNIT_REPORT_DIR=${WORKSPACE} /artifacts
36
34
# Set artifacts directory
37
- export ARTIFACTS_DIR=${WORKSPACE} /artifacts
35
+ export ARTIFACTS=${ARTIFACTS:- " ${WORKSPACE} /artifacts" }
36
+ # Produce a JUnit-style XML test report
37
+ export KUBE_JUNIT_REPORT_DIR=" ${ARTIFACTS} "
38
38
39
39
export LOG_LEVEL=4
40
40
Original file line number Diff line number Diff line change @@ -70,8 +70,8 @@ kube::etcd::start() {
70
70
71
71
# Start etcd
72
72
ETCD_DIR=${ETCD_DIR:- $(mktemp -d 2>/ dev/ null || mktemp -d -t test-etcd.XXXXXX)}
73
- if [[ -d " ${ARTIFACTS_DIR :- } " ]]; then
74
- ETCD_LOGFILE=" ${ARTIFACTS_DIR } /etcd.$( uname -n) .$( id -un) .log.DEBUG.$( date +%Y%m%d-%H%M%S) .$$ "
73
+ if [[ -d " ${ARTIFACTS :- } " ]]; then
74
+ ETCD_LOGFILE=" ${ARTIFACTS } /etcd.$( uname -n) .$( id -un) .log.DEBUG.$( date +%Y%m%d-%H%M%S) .$$ "
75
75
else
76
76
ETCD_LOGFILE=${ETCD_LOGFILE:- " /dev/null" }
77
77
fi
Original file line number Diff line number Diff line change @@ -120,6 +120,10 @@ KUBE_TEST_API_VERSIONS="${KUBE_TEST_API_VERSIONS:-${ALL_VERSIONS_CSV}}"
120
120
# once we have multiple group supports
121
121
# Create a junit-style XML test report in this directory if set.
122
122
KUBE_JUNIT_REPORT_DIR=${KUBE_JUNIT_REPORT_DIR:- }
123
+ # If KUBE_JUNIT_REPORT_DIR is unset, and ARTIFACTS is set, then have them match.
124
+ if [[ -z " ${KUBE_JUNIT_REPORT_DIR:- } " && -n " ${ARTIFACTS:- } " ]]; then
125
+ export KUBE_JUNIT_REPORT_DIR=" ${ARTIFACTS} "
126
+ fi
123
127
# Set to 'y' to keep the verbose stdout from tests when KUBE_JUNIT_REPORT_DIR is
124
128
# set.
125
129
KUBE_KEEP_VERBOSE_TEST_OUTPUT=${KUBE_KEEP_VERBOSE_TEST_OUTPUT:- n}
Original file line number Diff line number Diff line change @@ -21,6 +21,11 @@ set -o pipefail
21
21
KUBE_ROOT=$( dirname " ${BASH_SOURCE} " ) /../..
22
22
source " ${KUBE_ROOT} /hack/lib/util.sh"
23
23
24
+ # If KUBE_JUNIT_REPORT_DIR is unset, and ARTIFACTS is set, then have them match.
25
+ if [[ -z " ${KUBE_JUNIT_REPORT_DIR:- } " && -n " ${ARTIFACTS:- } " ]]; then
26
+ export KUBE_JUNIT_REPORT_DIR=" ${ARTIFACTS} "
27
+ fi
28
+
24
29
# include shell2junit library
25
30
source " ${KUBE_ROOT} /third_party/forked/shell2junit/sh2ju.sh"
26
31
Original file line number Diff line number Diff line change @@ -94,9 +94,9 @@ pushd "${KUBE_ROOT}" > /dev/null 2>&1
94
94
echo " (The above output can be saved as godepdiff.patch if you're not running this locally)" >&2
95
95
echo " (The patch file should also be exported as a build artifact if run through CI)" >&2
96
96
KEEP_TMP=true
97
- if [[ -f godepdiff.patch && -d " ${ARTIFACTS_DIR :- } " ]]; then
97
+ if [[ -f godepdiff.patch && -d " ${ARTIFACTS :- } " ]]; then
98
98
echo " Copying patch to artifacts.."
99
- cp godepdiff.patch " ${ARTIFACTS_DIR :- } /"
99
+ cp godepdiff.patch " ${ARTIFACTS :- } /"
100
100
fi
101
101
ret=1
102
102
fi
@@ -111,9 +111,9 @@ pushd "${KUBE_ROOT}" > /dev/null 2>&1
111
111
echo " (The above output can be saved as godepdiff.patch if you're not running this locally)" >&2
112
112
echo " (The patch file should also be exported as a build artifact if run through CI)" >&2
113
113
KEEP_TMP=true
114
- if [[ -f vendordiff.patch && -d " ${ARTIFACTS_DIR :- } " ]]; then
114
+ if [[ -f vendordiff.patch && -d " ${ARTIFACTS :- } " ]]; then
115
115
echo " Copying patch to artifacts.."
116
- cp vendordiff.patch " ${ARTIFACTS_DIR :- } /"
116
+ cp vendordiff.patch " ${ARTIFACTS :- } /"
117
117
fi
118
118
ret=1
119
119
fi
You can’t perform that action at this time.
0 commit comments