diff --git a/.travis.yml b/.travis.yml index 3627d335..8b94d40a 100644 --- a/.travis.yml +++ b/.travis.yml @@ -5,38 +5,49 @@ services: - docker env: -- KUBE_VERSION=1.18 -- KUBE_VERSION=1.17 -- KUBE_VERSION=1.16 -- KUBE_VERSION=1.15 -- KUBE_VERSION=1.14 -- KUBE_VERSION=1.13 -- KUBE_VERSION=1.12 +- E2E_TEST=true KUBE_VERSION=1.18 +- E2E_TEST=true KUBE_VERSION=1.17 +- E2E_TEST=true KUBE_VERSION=1.16 +- E2E_TEST=true KUBE_VERSION=1.15 +- E2E_TEST=true KUBE_VERSION=1.14 +- E2E_TEST=true KUBE_VERSION=1.13 +- E2E_TEST=true KUBE_VERSION=1.12 script: test/k8s-local-cluster-test/run-test -v $KUBE_VERSION -matrix: +jobs: include: - stage: Test language: go go: "1.14.x" script: make unit-test - env: GO111MODULE=on + name: Unit Tests after_success: bash <(curl -s https://codecov.io/bash) -v - stage: Test script: test/go-report-card-test/run-report-card-test.sh - env: GO_REPORT_CARD=true + name: Go Report Card Test + - stage: Test + script: make create-build-dir build-binaries + name: Build Binaries + - stage: Test + script: make create-build-dir build-docker-images + name: Build Docker Images + - stage: Test + script: make create-build-dir generate-k8s-yaml + name: Generate K8s yaml files - stage: Test if: type = push AND env(GITHUB_TOKEN) IS present script: test/license-test/run-license-test.sh - env: LICENSE_TEST=true + name: License Test - stage: Test + if: type = push AND tag =~ /^v\d+\.\d+(\.\d+)?(-\S*)?$/ AND env(DOCKER_USERNAME) IS present script: make helm-tests - env: HELM_SYNC_TEST=true + name: Helm Sync and Version Test - stage: Deploy if: type = push AND env(DOCKER_USERNAME) IS present - script: make sync-readme-to-dockerhub + name: Sync Readme to Dockerhub - stage: Deploy if: type = push AND tag =~ /^v\d+\.\d+(\.\d+)?(-\S*)?$/ AND env(DOCKER_USERNAME) IS present script: make release + name: Release Artifacts diff --git a/Makefile b/Makefile index 98ce1974..59e71580 100644 --- a/Makefile +++ b/Makefile @@ -35,7 +35,7 @@ docker-push: docker push ${IMG_W_TAG} build-docker-images: - ${MAKEFILE_PATH}/scripts/build-docker-images -d -p ${SUPPORTED_PLATFORMS} -r ${IMG} -v ${VERSION} + ${MAKEFILE_PATH}/scripts/build-docker-images -p ${SUPPORTED_PLATFORMS} -r ${IMG} -v ${VERSION} push-docker-images: @echo ${DOCKER_PASSWORD} | docker login -u ${DOCKER_USERNAME} --password-stdin @@ -51,7 +51,7 @@ e2e-test: ${MAKEFILE_PATH}/test/k8s-local-cluster-test/run-test -b e2e-test -d compatibility-test: - ${MAKEFILE_PATH}/test/k8s-compatibility-test/run-k8s-compatibility-test.sh -p "-d" + ${MAKEFILE_PATH}/test/k8s-compatibility-test/run-k8s-compatibility-test.sh -p -d license-test: ${MAKEFILE_PATH}/test/license-test/run-license-test.sh @@ -66,7 +66,7 @@ helm-version-sync-test: ${MAKEFILE_PATH}/test/helm-sync-test/run-helm-version-sync-test build-binaries: - ${MAKEFILE_PATH}/scripts/build-binaries -d -p ${SUPPORTED_PLATFORMS} -v ${VERSION} + ${MAKEFILE_PATH}/scripts/build-binaries -p ${SUPPORTED_PLATFORMS} -v ${VERSION} upload-resources-to-github: ${MAKEFILE_PATH}/scripts/upload-resources-to-github @@ -87,3 +87,6 @@ helm-tests: helm-sync-test helm-version-sync-test release: create-build-dir build-binaries build-docker-images push-docker-images generate-k8s-yaml upload-resources-to-github test: unit-test e2e-test compatibility-test license-test go-report-card-test helm-sync-test + +help: + @grep -E '^[a-zA-Z_-]+:.*$$' $(MAKEFILE_LIST) | sort diff --git a/test/e2e/maintenance-event-cancellation-test b/test/e2e/maintenance-event-cancellation-test index 89151b59..fa3ebae7 100755 --- a/test/e2e/maintenance-event-cancellation-test +++ b/test/e2e/maintenance-event-cancellation-test @@ -16,7 +16,6 @@ SCRIPTPATH="$( cd "$(dirname "$0")" ; pwd -P )" helm upgrade --install $CLUSTER_NAME-anth $SCRIPTPATH/../../config/helm/aws-node-termination-handler/ \ --wait \ - --force \ --namespace kube-system \ --set instanceMetadataURL="http://localhost:$IMDS_PORT" \ --set image.repository="$NODE_TERMINATION_HANDLER_DOCKER_REPO" \ @@ -27,7 +26,6 @@ helm upgrade --install $CLUSTER_NAME-anth $SCRIPTPATH/../../config/helm/aws-node helm upgrade --install $CLUSTER_NAME-emtp $SCRIPTPATH/../../config/helm/ec2-metadata-test-proxy/ \ --wait \ - --force \ --namespace default \ --set ec2MetadataTestProxy.image.repository="$EC2_METADATA_DOCKER_REPO" \ --set ec2MetadataTestProxy.image.tag="$EC2_METADATA_DOCKER_TAG" \ @@ -88,7 +86,6 @@ fi helm upgrade --install $CLUSTER_NAME-emtp $SCRIPTPATH/../../config/helm/ec2-metadata-test-proxy/ \ --wait \ - --force \ --namespace default \ --set ec2MetadataTestProxy.image.repository="$EC2_METADATA_DOCKER_REPO" \ --set ec2MetadataTestProxy.image.tag="$EC2_METADATA_DOCKER_TAG" \ diff --git a/test/k8s-local-cluster-test/provision-cluster b/test/k8s-local-cluster-test/provision-cluster index cf3ba56a..de5f072e 100755 --- a/test/k8s-local-cluster-test/provision-cluster +++ b/test/k8s-local-cluster-test/provision-cluster @@ -9,7 +9,7 @@ CLUSTER_NAME_BASE=$(uuidgen | cut -d'-' -f1 | tr '[:upper:]' '[:lower:]') OVERRIDE_PATH=0 KIND_CONFIG_FILE=$SCRIPTPATH/kind-two-node-cluster.yaml -K8_1_18="kindest/node:v1.18.2@sha256:7b27a6d0f2517ff88ba444025beae41491b016bc6af573ba467b70c5e8e0d85f" +K8_1_18="kindest/node:v1.18.4@sha256:9ddbe5ba7dad96e83aec914feae9105ac1cffeb6ebd0d5aa42e820defe840fd4" K8_1_17="kindest/node:v1.17.5@sha256:ab3f9e6ec5ad8840eeb1f76c89bb7948c77bbf76bcebe1a8b59790b8ae9a283a" K8_1_16="kindest/node:v1.16.9@sha256:7175872357bc85847ec4b1aba46ed1d12fa054c83ac7a8a11f5c268957fd5765" K8_1_15="kindest/node:v1.15.11@sha256:6cc31f3533deb138792db2c7d1ffc36f7456a06f1db5556ad3b6927641016f50" @@ -20,7 +20,7 @@ K8_1_12="kindest/node:v1.12.10@sha256:faeb82453af2f9373447bb63f50bae02b8020968e0 K8_VERSION="$K8_1_16" KUBECTL_VERSION=$(curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt) KIND_VERSION="0.8.1" -HELM_VERSION="3.2.0" +HELM_VERSION="3.2.4" echoerr() { echo "$@" 1>&2; } diff --git a/test/k8s-local-cluster-test/run-test b/test/k8s-local-cluster-test/run-test index fc74c7ac..749e0629 100755 --- a/test/k8s-local-cluster-test/run-test +++ b/test/k8s-local-cluster-test/run-test @@ -15,7 +15,7 @@ DEFAULT_EC2_METADATA_DOCKER_IMG="ec2-metadata-test-proxy:customtest" EC2_METADATA_DOCKER_IMG="" OVERRIDE_PATH=0 K8S_VERSION="1.16" -ASSERTION_SCRIPTS=$(find $SCRIPTPATH/../e2e -type f) +ASSERTION_SCRIPTS=$(find $SCRIPTPATH/../e2e -type f | sort) function timeout() { perl -e 'alarm shift; exec @ARGV' "$@"; }