Skip to content

Commit

Permalink
(from AES) Make generate
Browse files Browse the repository at this point in the history
  • Loading branch information
esmet committed Apr 8, 2021
1 parent 9c58c7b commit 8c7b6c3
Showing 1 changed file with 57 additions and 1 deletion.
58 changes: 57 additions & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -292,11 +292,67 @@ commands:
name: "Gather logs"
when: always
command: |
rsync -ma --include='*/' --include='*.xml' --include='*.tap' --include='*.log' --include='Test*.webm' --exclude='*' . /tmp/test-logs
rsync \
--prune-empty-dirs --archive --include='*/' \
--include='*.xml' \
--include='*.tap' \
--include='*.log' \
--include='Test*.webm' \
--exclude='*' \
. \
/tmp/test-logs
if test -d ~/.cache/telepresence/logs; then
rsync \
--archive \
~/.cache/telepresence/logs \
/tmp/test-logs/telepresence-logs
fi
if test -f docker/container.txt; then
docker exec $(cat docker/container.txt) /bin/bash -c 'mkdir -p /tmp/build-container-logs && (cp -r /tmp/*.txt /tmp/*.json /tmp/*.log /tmp/*.yaml /tmp/build-container-logs || true) && ((test -d ~/.cache/telepresence/logs && cp -r ~/.cache/telepresence/logs /tmp/build-container-logs/telepresence-logs) || true)'
docker cp $(cat docker/container.txt):/tmp/build-container-logs /tmp/test-logs/build-container-logs
fi
- store_artifacts:
name: "Store logs"
path: /tmp/test-logs
destination: test-logs
- run:
name: "Gather coverage"
when: always
command: |
mkdir -p /tmp/coverage
if test -f docker/container.txt; then
docker cp $(cat docker/container.txt):/tmp/cov_html /tmp/coverage || true
fi
- store_artifacts:
name: "Store coverage"
path: /tmp/coverage
destination: coverage
- run:
name: "Gather pod logs"
when: always
command: |
if ! test -f ~/.kube/kubeception.yaml ; then
exit 0
fi
export KUBECONFIG=~/.kube/kubeception.yaml
podsfile=/tmp/all-pods.txt
(kubectl get pods --all-namespaces -ocustom-columns="name:.metadata.name,namespace:.metadata.namespace" --no-headers || true) > $podsfile
(kubectl describe pods --all-namespaces || true) > /tmp/all-pods-described.txt
mkdir -p /tmp/pod-logs
cat $podsfile | while IFS= read -r line; do
name=$(echo $line | awk '{print $1}')
ns=$(echo $line | awk '{print $2}')
nsdir=/tmp/pod-logs/${ns}/
mkdir -p $nsdir
outfile=${nsdir}/${name}-pod.log
(kubectl logs -n $ns $name > $outfile || echo "FAILED, status $ret, continuing...") || true
done
- store_artifacts:
name: "Store pod logs"
path: /tmp/pod-logs
destination: pod-logs
website-setup:
steps:
- install-node:
Expand Down

0 comments on commit 8c7b6c3

Please sign in to comment.