Skip to content

Commit

Permalink
circleCI configuration update to run more tests as listed below:
Browse files Browse the repository at this point in the history
* Run conformance testing as part of integration test.
* Trigger integration test on new tags.
* Add nightly runs on master branch
  • Loading branch information
SaranBalaji90 committed Feb 25, 2020
1 parent b0286f1 commit 2264ffd
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 0 deletions.
26 changes: 26 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ version: 2.1

orbs:
aws-cli: circleci/aws-cli@0.1.19
k8s: circleci/kubernetes@0.11.0

jobs:
build:
Expand Down Expand Up @@ -31,6 +32,9 @@ jobs:
- setup_remote_docker
- aws-cli/setup:
profile-name: awstester
- k8s/install-kubectl:
# requires 1.14.9 for k8s testing, since it uses log api.
kubectl-version: v1.14.9
- run:
name: Run the integration tests
command: ./scripts/run-integration-tests.sh
Expand All @@ -50,3 +54,25 @@ workflows:
- integration_test:
requires:
- hold

# runs integration test when new git tag is pushed.
run-test-on-tags:
jobs:
- integration_test:
filters:
branches:
ignore: /.*/
tags:
only: /^v.*/

# triggers daily test run on master
nightly-test-run:
triggers:
- schedule:
cron: "0 * * * *"
filters:
branches:
only:
- master
jobs:
- integration_test
8 changes: 8 additions & 0 deletions scripts/run-integration-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ K8S_VERSION=${K8S_VERSION:-1.14.6}
PROVISION=${PROVISION:-true}
DEPROVISION=${DEPROVISION:-true}
BUILD=${BUILD:-true}
RUN_CONFORMANCE=${RUN_CONFORMANCE:-true}

__cluster_created=0
__cluster_deprovisioned=0
Expand Down Expand Up @@ -168,6 +169,13 @@ GO111MODULE=on go test -v -timeout 0 ./... --kubeconfig=$KUBECONFIG --ginkgo.foc
TEST_PASS=$?
popd

if [[ $TEST_PASS -eq 0 && "$RUN_CONFORMANCE" == true ]]; then
echo "Running conformance tests against cluster"
wget -qO- https://dl.k8s.io/v$K8S_VERSION/kubernetes-test.tar.gz | tar -zxvf - --strip-components=4 -C /tmp kubernetes/platforms/linux/amd64/e2e.test
/tmp/e2e.test --ginkgo.focus="Conformance" --kubeconfig=$KUBECONFIG --ginkgo.failFast --ginkgo.flakeAttempts 2 \
--ginkgo.skip="(should support remote command execution over websockets)|(should support retrieving logs from the container over websockets)"
fi

if [[ "$DEPROVISION" == true ]]; then
down-test-cluster
fi
Expand Down

0 comments on commit 2264ffd

Please sign in to comment.