-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
90 lines (68 loc) · 2.24 KB
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
---
language: python # (Ansible)
sudo: required
services:
- docker
branches:
except:
- /^experimental\/.*$/
- /^exp\/.*$/
- /^testing\/.*$/
- /^test\/.*$/
- /^doc\/.*$/
- /^docs\/.*$/
- /^documentation\/.*$/
env:
global:
- KN_BRANCH="development/phenomenal-dalcotidine"
- PRESET="plain"
matrix:
- HOST_CLOUD=openstack
- HOST_CLOUD=gce
- HOST_CLOUD=aws
- HOST_CLOUD=azure
addons:
apt:
sources:
- debian-sid
before_install:
# Currently nothing
install:
# Nothing for now
before_script:
# Copy kn bin
- curl -f "https://raw.githubusercontent.com/kubenow/KubeNow/$KN_BRANCH/bin/kn" -o "/tmp/kn"
- sudo mv /tmp/kn /usr/local/bin/
- sudo chmod +x /usr/local/bin/kn
# Init test deployment
- kn --preset $PRESET init ${HOST_CLOUD} test-deployment
- cd test-deployment
# Overwrite ssh-key for debug purposes
- echo -e "$TRAVIS_SSH_KEY_PRIV" > ssh_key
- echo -e "$TRAVIS_SSH_KEY_PUB" > ssh_key.pub
# RENDER CONFIGURATION
# Common
- sed -i -e "s/your-cluster-prefix/phnmnl-plugin-ci-${TRAVIS_BUILD_NUMBER}-${HOST_CLOUD}/g" config.tfvars
- sed -i -e "s/\"password\"/\"${APPLICATIONS_PASSWORD}\"/g" config.tfvars
# AWS
- sed -i -e "s/your-acces-key-id/${AWS_ACCESS_KEY_ID}/g" config.tfvars
- sed -i -e "s#your-secret-access-key#${AWS_SECRET_ACCESS_KEY}#g" config.tfvars
- sed -i -e "s/eu-west-1/${AWS_DEFAULT_REGION}/g" config.tfvars
# GCE
- printf '%s\n' "$GCE_CREDENTIALS" > "./service-account.json"
- sed -i -e "s/your_project_id/${GCE_PROJECT_ID}/g" config.tfvars
# AZURE
- sed -i -e "s/your-subscription_id/${AZURE_SUBSCRIPTION_ID}/g" config.tfvars
- sed -i -e "s/your-client_id/${AZURE_CLIENT_ID}/g" config.tfvars
- sed -i -e "s/your-client_secret/${AZURE_CLIENT_SECRET}/g" config.tfvars
- sed -i -e "s/your-tenant_id/${AZURE_TENANT_ID}/g" config.tfvars
# OS
- sed -i -e "s/your-pool-name/${OS_POOL_NAME}/g" config.tfvars
- sed -i -e "s/external-net-uuid/${OS_EXTERNAL_NET_UUID}/g" config.tfvars
- sed -i -e "s/your-master-flavor/${OS_NODE_FLAVOR}/g" config.tfvars
- sed -i -e "s/your-node-flavor/${OS_NODE_FLAVOR}/g" config.tfvars
script:
# Deploy
- kn apply
after_script:
- export TERRAFORM_OPT="-force" && travis_retry kn destroy