@@ -31,9 +31,14 @@ curl --retry 5 -LO \
3131chmod +x kubectl &&
3232mv kubectl /usr/local/bin
3333
34+ # Build binaries
35+ echo " Building machine-controller and webhook"
36+ make machine-controller webhook
37+
3438# Generate ssh keypair
35- echo " Set permissions for ssh key "
39+ echo " Generating ssh keypair "
3640chmod 0700 $HOME /.ssh
41+ ssh-keygen -t rsa -N " " -f ~ /.ssh/id_ed25519
3742
3843# Initialize terraform
3944echo " Initalizing terraform"
@@ -42,14 +47,14 @@ make terraform
4247cp provider.tf{.disabled,}
4348terraform init --input=false --backend-config=key=$BUILD_ID
4449export TF_VAR_hcloud_token=" ${HZ_E2E_TOKEN} "
45- export TF_VAR_hcloud_sshkey_content=" $( cat ~ /.ssh/id_rsa.pub) "
50+ export TF_VAR_hcloud_sshkey_content=" $( cat ~ /.ssh/id_ed25519.pub) "
51+ export TF_VAR_hcloud_sshkey_name=" $BUILD_ID "
4652export TF_VAR_hcloud_test_server_name=" machine-controller-test-${BUILD_ID} "
4753
4854for try in {1..20}; do
4955 set +e
5056 # Create environment at cloud provider
5157 echo " Creating environment at cloud provider."
52- terraform import hcloud_ssh_key.default 355488
5358 terraform apply -auto-approve
5459 TF_RC=$?
5560 if [[ $TF_RC == 0 ]]; then break ; fi
6469set -e
6570cd -
6671
67- # Build binaries
68- echo " Building machine-controller and webhook"
69- make machine-controller webhook
70-
7172# Create kubeadm cluster and install machine-controller onto it
7273echo " Creating kubeadm cluster and install machine-controller onto it."
74+ export E2E_SSH_PUBKEY=" $( cat ~ /.ssh/id_rsa.pub) "
7375./test/tools/integration/provision_master.sh
7476
7577# Run e2e test
7678echo " Running e2e test."
77- export KUBECONFIG=$GOPATH /src/github.com/kubermatic/machine-controller/.kubeconfig &&
78- go test -race -tags=e2e -parallel 240 -v -timeout 30m ./test/e2e/... -identifier=$BUILD_ID
79+ export KUBECONFIG=$GOPATH /src/github.com/kubermatic/machine-controller/.kubeconfig
80+ EXTRA_ARGS=" "
81+ if [[ $# -gt 0 ]]; then
82+ EXTRA_ARGS=" -run $1 "
83+ fi
84+ go test -race -tags=e2e -parallel 240 -v -timeout 30m ./test/e2e/... -identifier=$BUILD_ID $EXTRA_ARGS
0 commit comments