Skip to content

Commit 601740b

Browse files
kiwikZhuli
authored andcommitted
Upload E2E test result and log to google storage (apache#140)
- get upload_e2e.py script and install depends - set +x for kubetest to get clear log Partial-Bug: kubernetes/cloud-provider-openstack#103 Closes apache#139
1 parent ba6a52b commit 601740b

File tree

2 files changed

+18
-4
lines changed

2 files changed

+18
-4
lines changed

playbooks/cloud-provider-openstack-acceptance-test-e2e-conformance/post.yaml

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,23 @@
66
cmd: |
77
set -e
88
set -x
9+
# install gsutil, upload_e2e.py depends on it
10+
export CLOUD_SDK_REPO="cloud-sdk-$(lsb_release -c -s)"
11+
echo "deb http://packages.cloud.google.com/apt $CLOUD_SDK_REPO main" | tee -a /etc/apt/sources.list.d/google-cloud-sdk.list
12+
curl https://packages.cloud.google.com/apt/doc/apt-key.gpg | apt-key add
13+
apt-get update && sudo apt-get install google-cloud-sdk --yes
14+
apt-get install google-cloud-sdk-app-engine-java --yes
915
export LOG_DIR='{{ ansible_user_dir }}/workspace/logs/kubernetes'
10-
# TODO: Can not find upload_e2e.py in Github kubernetes org
11-
# Refer to https://github.com/kubernetes/test-infra/tree/master/testgrid/conformance#using
12-
# upload_e2e.py --junit=$LOG_DIR/junit_01.xml --log=$LOG_DIR/e2e.log --bucket=gs://your-bucket
16+
# get upload_e2e.py
17+
wget https://raw.githubusercontent.com/kubernetes/test-infra/master/testgrid/conformance/upload_e2e.py
18+
# TODO(RuiChen): Add timestamp for e2e.log in order to workaround upload_e2e.py bug
19+
date +"%b %e %H:%M:%S.999: DONE" >> $LOG_DIR/e2e.log
20+
PIPELINE_LOGS_DIR='periodic-logs'
21+
if [ '{{ zuul.pipeline }}' != 'periodic' ]; then
22+
PIPELINE_LOGS_DIR='pr-logs'
23+
fi
24+
# upload e2e log to google storage
25+
python upload_e2e.py --junit=$LOG_DIR/junit_01.xml --log=$LOG_DIR/e2e.log \
26+
--bucket=gs://kubernetes-openstack/$PIPELINE_LOGS_DIR/ci-'{{ zuul.job }}'
1327
executable: /bin/bash
1428
environment: '{{ golang_env }}'

playbooks/cloud-provider-openstack-acceptance-test-e2e-conformance/run.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@
107107
--deployment=local \
108108
--provider=local \
109109
--ginkgo-parallel=1 \
110-
--test_args="--ginkgo.focus=\\[Conformance\\]" \
110+
--test_args="--ginkgo.focus=\\[Conformance\\] --ginkgo.noColor=true" \
111111
--timeout=120m | tee $LOG_DIR/e2e.log
112112
executable: /bin/bash
113113
chdir: '{{ zuul.project.src_dir }}'

0 commit comments

Comments
 (0)