Skip to content

Commit

Permalink
Simplify logic of get-testresults.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
Alfonso Acosta committed Jun 6, 2019
1 parent c19d3ca commit f645072
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 10 deletions.
5 changes: 1 addition & 4 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,7 @@ jobs:
steps:
- checkout
- run: mkdir -p ./test-results/ginkgo
- run:
command: make eksctl-image
environment:
TEST_OUTPUT: "true"
- run: make eksctl-image
- store_test_results:
path: ./test-results
- store_artifacts:
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ endif
.PHONY: eksctl-image
eksctl-image: eksctl-build-image ## Create the eksctl image
@docker build --tag=$(EKSCTL_IMAGE) $(EKSCTL_IMAGE_BUILD_ARGS) .
./get-testresults.sh
@[ -z "${CI}" ] || ./get-testresults.sh # only get test results in Continious Integration

##@ Release

Expand Down
5 changes: 0 additions & 5 deletions get-testresults.sh
Original file line number Diff line number Diff line change
@@ -1,13 +1,8 @@
#!/bin/sh -ex

if [ -n "${TEST_OUTPUT}" ]; then

BUILDID="$(docker images --filter "label=eksctl.builder=true" --format '{{.ID}}')"
mkdir -p ${PWD}/test-results/ginkgo
docker run -i --rm -v ${PWD}/test-results/ginkgo:/mnt/test-results ${BUILDID} sh -s <<EOF
cp /go/src/github.com/weaveworks/eksctl/test-results/ginkgo/*.xml /mnt/test-results
EOF

else
echo "not retrieving test results"
fi

0 comments on commit f645072

Please sign in to comment.