aks-engine/.circleci/config.yml

418 строки
16 KiB
YAML

version: 2
defaults: &defaults
working_directory: /go/src/github.com/Azure/aks-engine
docker:
- image: quay.io/deis/go-dev:v1.18.4
environment:
GOPATH: /go
experimental:
notify:
branches:
only:
- master
jobs:
test:
<<: *defaults
steps:
- checkout
- run: |
echo 'export PATH=$GOPATH/bin:$PATH' >> $BASH_ENV
echo 'export CLIENT_ID=${CLUSTER_SERVICE_PRINCIPAL_CLIENT_ID}' >> $BASH_ENV
echo 'export CLIENT_SECRET=${CLUSTER_SERVICE_PRINCIPAL_CLIENT_SECRET}' >> $BASH_ENV
- run:
name: Install dependencies
command: make generate
- run:
name: Run linting rules
command: make validate-copyright-headers test-style
- run:
name: Check if imports, Gopkg.toml, and Gopkg.lock are in sync
command: make validate-dependencies
- run:
name: Build cross-architectural binaries
command: make build-cross
- run:
name: Run unit tests and calculate coverage
command: make coverage
- store_test_results:
path: test/junit
k8s-linux-default-e2e:
<<: *defaults
steps:
- checkout
- run: |
echo 'export TIMEOUT=10m' >> $BASH_ENV
echo 'export CLUSTER_DEFINITION=examples/kubernetes.json' >> $BASH_ENV
echo 'export CREATE_VNET=false' >> $BASH_ENV
echo 'export CLEANUP_ON_EXIT=${CLEANUP_ON_EXIT}' >> $BASH_ENV
echo 'export RETAIN_SSH=false' >> $BASH_ENV
echo 'export SUBSCRIPTION_ID=${SUBSCRIPTION_ID_E2E_KUBERNETES}' >> $BASH_ENV
echo 'export CLIENT_ID=${SERVICE_PRINCIPAL_CLIENT_ID_E2E_KUBERNETES}' >> $BASH_ENV
echo 'export CLIENT_SECRET=${SERVICE_PRINCIPAL_CLIENT_SECRET_E2E_KUBERNETES}' >> $BASH_ENV
echo 'export KUBECTL_VERSION=1.10.9' >> $BASH_ENV
- run:
name: get kubectl
command: bash ./scripts/get-kubectl.sh
- run:
name: compile
command: make build-binary
- run:
name: ginkgo k8s e2e tests
command: make test-kubernetes
no_output_timeout: "30m"
- store_artifacts:
path: /go/src/github.com/Azure/aks-engine/_logs
k8s-1.10-release-e2e:
<<: *defaults
steps:
- checkout
- run: |
echo 'export TIMEOUT=20m' >> $BASH_ENV
echo 'export ORCHESTRATOR_RELEASE=1.10' >> $BASH_ENV
echo 'export CLUSTER_DEFINITION=examples/e2e-tests/kubernetes/release/default/definition.json' >> $BASH_ENV
echo 'export CREATE_VNET=true' >> $BASH_ENV
echo 'export ENABLE_KMS_ENCRYPTION=true' >> $BASH_ENV
echo 'export CLEANUP_ON_EXIT=${CLEANUP_ON_EXIT}' >> $BASH_ENV
echo 'export CLEANUP_IF_FAIL=${CLEANUP_IF_FAIL_LINUX}' >> $BASH_ENV
echo 'export RETAIN_SSH=false' >> $BASH_ENV
echo 'export SUBSCRIPTION_ID=${SUBSCRIPTION_ID_E2E_KUBERNETES}' >> $BASH_ENV
echo 'export CLIENT_ID=${SERVICE_PRINCIPAL_CLIENT_ID_E2E_KUBERNETES}' >> $BASH_ENV
echo 'export CLIENT_SECRET=${SERVICE_PRINCIPAL_CLIENT_SECRET_E2E_KUBERNETES}' >> $BASH_ENV
echo 'export CLIENT_OBJECTID=${SERVICE_PRINCIPAL_OBJECT_ID_E2E_KUBERNETES}' >> $BASH_ENV
echo 'export KUBECTL_VERSION=1.10.9' >> $BASH_ENV
- run:
name: get kubectl
command: bash ./scripts/get-kubectl.sh
- run:
name: compile
command: make build-binary
- run:
name: ginkgo k8s e2e tests
command: make test-kubernetes
no_output_timeout: "30m"
- store_artifacts:
path: /go/src/github.com/Azure/aks-engine/_logs
k8s-1.11-release-e2e:
<<: *defaults
steps:
- checkout
- run: |
echo 'export TIMEOUT=20m' >> $BASH_ENV
echo 'export ORCHESTRATOR_RELEASE=1.11' >> $BASH_ENV
echo 'export CLUSTER_DEFINITION=examples/e2e-tests/kubernetes/release/default/definition.json' >> $BASH_ENV
echo 'export CREATE_VNET=true' >> $BASH_ENV
echo 'export ENABLE_KMS_ENCRYPTION=true' >> $BASH_ENV
echo 'export CLEANUP_ON_EXIT=${CLEANUP_ON_EXIT}' >> $BASH_ENV
echo 'export CLEANUP_IF_FAIL=${CLEANUP_IF_FAIL_LINUX}' >> $BASH_ENV
echo 'export RETAIN_SSH=false' >> $BASH_ENV
echo 'export SUBSCRIPTION_ID=${SUBSCRIPTION_ID_E2E_KUBERNETES}' >> $BASH_ENV
echo 'export CLIENT_ID=${SERVICE_PRINCIPAL_CLIENT_ID_E2E_KUBERNETES}' >> $BASH_ENV
echo 'export CLIENT_SECRET=${SERVICE_PRINCIPAL_CLIENT_SECRET_E2E_KUBERNETES}' >> $BASH_ENV
echo 'export CLIENT_OBJECTID=${SERVICE_PRINCIPAL_OBJECT_ID_E2E_KUBERNETES}' >> $BASH_ENV
echo 'export KUBECTL_VERSION=1.11.5' >> $BASH_ENV
- run:
name: get kubectl
command: bash ./scripts/get-kubectl.sh
- run:
name: compile
command: make build-binary
- run:
name: ginkgo k8s e2e tests
command: make test-kubernetes
no_output_timeout: "30m"
- store_artifacts:
path: /go/src/github.com/Azure/aks-engine/_logs
k8s-1.12-release-e2e:
<<: *defaults
steps:
- checkout
- run: |
echo 'export TIMEOUT=20m' >> $BASH_ENV
echo 'export ORCHESTRATOR_RELEASE=1.12' >> $BASH_ENV
echo 'export CLUSTER_DEFINITION=examples/e2e-tests/kubernetes/release/default/definition.json' >> $BASH_ENV
echo 'export CREATE_VNET=true' >> $BASH_ENV
echo 'export ENABLE_KMS_ENCRYPTION=true' >> $BASH_ENV
echo 'export CLEANUP_ON_EXIT=${CLEANUP_ON_EXIT}' >> $BASH_ENV
echo 'export CLEANUP_IF_FAIL=${CLEANUP_IF_FAIL_LINUX}' >> $BASH_ENV
echo 'export RETAIN_SSH=false' >> $BASH_ENV
echo 'export SUBSCRIPTION_ID=${SUBSCRIPTION_ID_E2E_KUBERNETES}' >> $BASH_ENV
echo 'export CLIENT_ID=${SERVICE_PRINCIPAL_CLIENT_ID_E2E_KUBERNETES}' >> $BASH_ENV
echo 'export CLIENT_SECRET=${SERVICE_PRINCIPAL_CLIENT_SECRET_E2E_KUBERNETES}' >> $BASH_ENV
echo 'export CLIENT_OBJECTID=${SERVICE_PRINCIPAL_OBJECT_ID_E2E_KUBERNETES}' >> $BASH_ENV
echo 'export KUBECTL_VERSION=1.12.2' >> $BASH_ENV
- run:
name: get kubectl
command: bash ./scripts/get-kubectl.sh
- run:
name: compile
command: make build-binary
- run:
name: ginkgo k8s e2e tests
command: make test-kubernetes
no_output_timeout: "30m"
- store_artifacts:
path: /go/src/github.com/Azure/aks-engine/_logs
k8s-1.13-release-e2e:
<<: *defaults
steps:
- checkout
- run: |
echo 'export TIMEOUT=20m' >> $BASH_ENV
echo 'export ORCHESTRATOR_RELEASE=1.13' >> $BASH_ENV
echo 'export CLUSTER_DEFINITION=examples/e2e-tests/kubernetes/release/default/definition.json' >> $BASH_ENV
echo 'export CREATE_VNET=true' >> $BASH_ENV
echo 'export ENABLE_KMS_ENCRYPTION=true' >> $BASH_ENV
echo 'export CLEANUP_ON_EXIT=${CLEANUP_ON_EXIT}' >> $BASH_ENV
echo 'export CLEANUP_IF_FAIL=${CLEANUP_IF_FAIL_LINUX}' >> $BASH_ENV
echo 'export RETAIN_SSH=false' >> $BASH_ENV
echo 'export SUBSCRIPTION_ID=${SUBSCRIPTION_ID_E2E_KUBERNETES}' >> $BASH_ENV
echo 'export CLIENT_ID=${SERVICE_PRINCIPAL_CLIENT_ID_E2E_KUBERNETES}' >> $BASH_ENV
echo 'export CLIENT_SECRET=${SERVICE_PRINCIPAL_CLIENT_SECRET_E2E_KUBERNETES}' >> $BASH_ENV
echo 'export CLIENT_OBJECTID=${SERVICE_PRINCIPAL_OBJECT_ID_E2E_KUBERNETES}' >> $BASH_ENV
echo 'export KUBECTL_VERSION=1.13.1' >> $BASH_ENV
- run:
name: get kubectl
command: bash ./scripts/get-kubectl.sh
- run:
name: compile
command: make build-binary
- run:
name: ginkgo k8s e2e tests
command: make test-kubernetes
no_output_timeout: "30m"
- store_artifacts:
path: /go/src/github.com/Azure/aks-engine/_logs
k8s-windows-1.10-release-e2e:
<<: *defaults
steps:
- checkout
- run: |
echo 'export TIMEOUT=30m' >> $BASH_ENV
echo 'export ORCHESTRATOR_RELEASE=1.10' >> $BASH_ENV
echo 'export CLUSTER_DEFINITION=examples/e2e-tests/kubernetes/windows/hybrid/definition.json' >> $BASH_ENV
echo 'export CLEANUP_ON_EXIT=${CLEANUP_ON_EXIT}' >> $BASH_ENV
echo 'export CLEANUP_IF_FAIL=${CLEANUP_IF_FAIL_WINDOWS}' >> $BASH_ENV
echo 'export RETAIN_SSH=false' >> $BASH_ENV
echo 'export SUBSCRIPTION_ID=${SUBSCRIPTION_ID_E2E_KUBERNETES}' >> $BASH_ENV
echo 'export CLIENT_ID=${SERVICE_PRINCIPAL_CLIENT_ID_E2E_KUBERNETES}' >> $BASH_ENV
echo 'export CLIENT_SECRET=${SERVICE_PRINCIPAL_CLIENT_SECRET_E2E_KUBERNETES}' >> $BASH_ENV
echo 'export KUBECTL_VERSION=1.10.9' >> $BASH_ENV
- run:
name: get kubectl
command: bash ./scripts/get-kubectl.sh
- run:
name: compile
command: make build-binary
- run:
name: ginkgo k8s windows e2e tests
command: make test-kubernetes
no_output_timeout: "30m"
- store_artifacts:
path: /go/src/github.com/Azure/aks-engine/_logs
k8s-windows-1.11-release-e2e:
<<: *defaults
steps:
- checkout
- run: |
echo 'export TIMEOUT=30m' >> $BASH_ENV
echo 'export ORCHESTRATOR_RELEASE=1.11' >> $BASH_ENV
echo 'export CLUSTER_DEFINITION=examples/e2e-tests/kubernetes/windows/hybrid/definition.json' >> $BASH_ENV
echo 'export CLEANUP_ON_EXIT=${CLEANUP_ON_EXIT}' >> $BASH_ENV
echo 'export CLEANUP_IF_FAIL=${CLEANUP_IF_FAIL_WINDOWS}' >> $BASH_ENV
echo 'export RETAIN_SSH=false' >> $BASH_ENV
echo 'export SUBSCRIPTION_ID=${SUBSCRIPTION_ID_E2E_KUBERNETES}' >> $BASH_ENV
echo 'export CLIENT_ID=${SERVICE_PRINCIPAL_CLIENT_ID_E2E_KUBERNETES}' >> $BASH_ENV
echo 'export CLIENT_SECRET=${SERVICE_PRINCIPAL_CLIENT_SECRET_E2E_KUBERNETES}' >> $BASH_ENV
echo 'export KUBECTL_VERSION=1.11.5' >> $BASH_ENV
- run:
name: get kubectl
command: bash ./scripts/get-kubectl.sh
- run:
name: compile
command: make build-binary
- run:
name: ginkgo k8s windows e2e tests
command: make test-kubernetes
no_output_timeout: "30m"
- store_artifacts:
path: /go/src/github.com/Azure/aks-engine/_logs
k8s-windows-1.12-release-e2e:
<<: *defaults
steps:
- checkout
- run: |
echo 'export TIMEOUT=30m' >> $BASH_ENV
echo 'export ORCHESTRATOR_RELEASE=1.12' >> $BASH_ENV
echo 'export CLUSTER_DEFINITION=examples/e2e-tests/kubernetes/windows/hybrid/definition.json' >> $BASH_ENV
echo 'export CLEANUP_ON_EXIT=${CLEANUP_ON_EXIT}' >> $BASH_ENV
echo 'export CLEANUP_IF_FAIL=${CLEANUP_IF_FAIL_WINDOWS}' >> $BASH_ENV
echo 'export RETAIN_SSH=false' >> $BASH_ENV
echo 'export SUBSCRIPTION_ID=${SUBSCRIPTION_ID_E2E_KUBERNETES}' >> $BASH_ENV
echo 'export CLIENT_ID=${SERVICE_PRINCIPAL_CLIENT_ID_E2E_KUBERNETES}' >> $BASH_ENV
echo 'export CLIENT_SECRET=${SERVICE_PRINCIPAL_CLIENT_SECRET_E2E_KUBERNETES}' >> $BASH_ENV
echo 'export KUBECTL_VERSION=1.12.2' >> $BASH_ENV
- run:
name: get kubectl
command: bash ./scripts/get-kubectl.sh
- run:
name: compile
command: make build-binary
- run:
name: ginkgo k8s windows e2e tests
command: make test-kubernetes
no_output_timeout: "30m"
- store_artifacts:
path: /go/src/github.com/Azure/aks-engine/_logs
k8s-windows-1.13-release-e2e:
<<: *defaults
steps:
- checkout
- run: |
echo 'export TIMEOUT=30m' >> $BASH_ENV
echo 'export ORCHESTRATOR_RELEASE=1.13' >> $BASH_ENV
echo 'export CLUSTER_DEFINITION=examples/e2e-tests/kubernetes/windows/hybrid/definition.json' >> $BASH_ENV
echo 'export CLEANUP_ON_EXIT=${CLEANUP_ON_EXIT}' >> $BASH_ENV
echo 'export CLEANUP_IF_FAIL=${CLEANUP_IF_FAIL_WINDOWS}' >> $BASH_ENV
echo 'export RETAIN_SSH=false' >> $BASH_ENV
echo 'export SUBSCRIPTION_ID=${SUBSCRIPTION_ID_E2E_KUBERNETES}' >> $BASH_ENV
echo 'export CLIENT_ID=${SERVICE_PRINCIPAL_CLIENT_ID_E2E_KUBERNETES}' >> $BASH_ENV
echo 'export CLIENT_SECRET=${SERVICE_PRINCIPAL_CLIENT_SECRET_E2E_KUBERNETES}' >> $BASH_ENV
echo 'export KUBECTL_VERSION=1.13.1' >> $BASH_ENV
- run:
name: get kubectl
command: bash ./scripts/get-kubectl.sh
- run:
name: compile
command: make build-binary
- run:
name: ginkgo k8s windows e2e tests
command: make test-kubernetes
no_output_timeout: "30m"
- store_artifacts:
path: /go/src/github.com/Azure/aks-engine/_logs
workflows:
version: 2
build_and_test_pr:
jobs:
- test:
filters:
branches:
ignore: master
- k8s-linux-default-e2e:
requires:
- test
filters:
branches:
ignore: master
- pr-e2e-hold:
type: approval
requires:
- test
filters:
branches:
ignore: master
- k8s-1.10-release-e2e:
requires:
- pr-e2e-hold
filters:
branches:
ignore: master
- k8s-windows-1.10-release-e2e:
requires:
- pr-e2e-hold
filters:
branches:
ignore: master
- k8s-1.11-release-e2e:
requires:
- pr-e2e-hold
filters:
branches:
ignore: master
- k8s-windows-1.11-release-e2e:
requires:
- pr-e2e-hold
filters:
branches:
ignore: master
- k8s-1.12-release-e2e:
requires:
- pr-e2e-hold
filters:
branches:
ignore: master
- k8s-windows-1.12-release-e2e:
requires:
- pr-e2e-hold
filters:
branches:
ignore: master
- k8s-1.13-release-e2e:
requires:
- pr-e2e-hold
filters:
branches:
ignore: master
- k8s-windows-1.13-release-e2e:
requires:
- pr-e2e-hold
filters:
branches:
ignore: master
build_and_test_master:
jobs:
- test:
filters:
branches:
only: master
- k8s-1.10-release-e2e:
requires:
- test
filters:
branches:
only: master
- k8s-windows-1.10-release-e2e:
requires:
- test
filters:
branches:
only: master
- k8s-1.11-release-e2e:
requires:
- test
filters:
branches:
only: master
- k8s-windows-1.11-release-e2e:
requires:
- test
filters:
branches:
only: master
- k8s-1.12-release-e2e:
requires:
- test
filters:
branches:
only: master
- k8s-windows-1.12-release-e2e:
requires:
- test
filters:
branches:
only: master
- k8s-1.13-release-e2e:
requires:
- test
filters:
branches:
only: master
- k8s-windows-1.13-release-e2e:
requires:
- test
filters:
branches:
only: master