Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 24 additions & 13 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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

9 changes: 6 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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
3 changes: 0 additions & 3 deletions test/e2e/maintenance-event-cancellation-test
Original file line number Diff line number Diff line change
Expand Up @@ -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" \
Expand All @@ -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" \
Expand Down Expand Up @@ -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" \
Expand Down
4 changes: 2 additions & 2 deletions test/k8s-local-cluster-test/provision-cluster
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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; }

Expand Down
2 changes: 1 addition & 1 deletion test/k8s-local-cluster-test/run-test
Original file line number Diff line number Diff line change
Expand Up @@ -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' "$@"; }

Expand Down