-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
75 lines (62 loc) · 2.51 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
language: python # (Ansible)
sudo: required
services:
- docker
branches:
except:
- /^experimental\/.*$/
- /^exp\/.*$/
- /^dev\/.*$/
- /^testing\/.*$/
- /^test\/.*$/
- /^doc\/.*$/
- /^docs\/.*$/
- /^documentation\/.*$/
env:
global:
- LOCAL_DEPLOYMENT=True
matrix:
- HOST_CLOUD=ostack
- HOST_CLOUD=gcp
- HOST_CLOUD=aws
addons:
ssh_known_hosts:
- github.com
before_install:
before_script:
# copy config templare
- cp config.${HOST_CLOUD}.sh-template config.${HOST_CLOUD}.sh
# RENDER CONFIGURATION
# Common
- sed -i -e "s/your-cluster-prefix/cloud-deploy-kubenow-ci-${TRAVIS_BUILD_NUMBER}-${HOST_CLOUD}/g" config.${HOST_CLOUD}.sh
# AWS
- sed -i -e "s/your-acces-key-id/${AWS_ACCESS_KEY_ID}/g" config.${HOST_CLOUD}.sh
- sed -i -e "s#your-secret-access-key#${AWS_SECRET_ACCESS_KEY}#g" config.${HOST_CLOUD}.sh
- sed -i -e "s/eu-west-1/${AWS_DEFAULT_REGION}/g" config.${HOST_CLOUD}.sh
# # AZURE
# - sed -i -e "s/your-subscription_id/${AZURE_SUBSCRIPTION_ID}/g" config.${HOST_CLOUD}.sh
# - sed -i -e "s/your-client_id/${AZURE_CLIENT_ID}/g" config.${HOST_CLOUD}.sh
# - sed -i -e "s/your-client_secret/${AZURE_CLIENT_SECRET}/g" config.${HOST_CLOUD}.sh
# - sed -i -e "s/your-tenant_id/${AZURE_TENANT_ID}/g" config.${HOST_CLOUD}.sh
# GCE
- printf '%s\n' "$GOOGLE_CREDENTIALS" > "./service-account.json"
- sed -i -e "s/path-to-your-credentials-json-file/service-account.json/g" config.${HOST_CLOUD}.sh
- sed -i -e "s/your_project_id/${GCE_PROJECT_ID}/g" config.${HOST_CLOUD}.sh
# OS
- sed -i -e "s/your-pool-name/${OS_POOL_NAME}/g" config.${HOST_CLOUD}.sh
- sed -i -e "s/external-net-uuid/${OS_EXTERNAL_NET_UUID}/g" config.${HOST_CLOUD}.sh
- sed -i -e "s/your-master-flavor/${OS_NODE_FLAVOR}/g" config.${HOST_CLOUD}.sh
- sed -i -e "s/your-node-flavor/${OS_NODE_FLAVOR}/g" config.${HOST_CLOUD}.sh
- sed -i -e "s/your-glusternode-flavor/${OS_NODE_FLAVOR}/g" config.${HOST_CLOUD}.sh
# Copy ssh-key for debug purposes (won't be overwritten by phenomenal.sh)
- mkdir -p deployments/id-phnmnl-config.${HOST_CLOUD}
- echo -e "$TRAVIS_SSH_KEY_PRIV" > deployments/id-phnmnl-config.${HOST_CLOUD}/vre.key
- echo -e "$TRAVIS_SSH_KEY_PUB" > deployments/id-phnmnl-config.${HOST_CLOUD}/vre.key.pub
- chmod 600 deployments/id-phnmnl-config.${HOST_CLOUD}/vre.key
- chmod 600 deployments/id-phnmnl-config.${HOST_CLOUD}/vre.key.pub
script:
# Deploy
- ./phenomenal.sh deploy "$HOST_CLOUD"
# Test
after_script:
- travis_retry ./phenomenal.sh destroy "$HOST_CLOUD"