-
Notifications
You must be signed in to change notification settings - Fork 12
/
.travis.yml
69 lines (62 loc) · 2.8 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
dist: xenial
language: minimal
os:
- linux
env:
global:
- TERRAFORM_VER="0.11.13"
- TF_VAR_default_tags='{Owner = "TravisCI", Product = "ICP"}'
- TF_VAR_resource_group="icp_ci_${TRAVIS_JOB_ID}"
- TF_VAR_resource_group_suffix=""
- REG_IMAGE="ibmcom-amd64/icp-inception:3.1.2-ee"
- ICP_VALIDATION_BRANCH="minimal"
matrix:
## Community Edition Builds
# CE with small subnet
- NAME: "CE with small subnet"
TERRAFORM_DIR: "${TRAVIS_BUILD_DIR}/templates/icp-ce"
TERRAFORM_VARS_FILE: "${TERRAFORM_DIR}/terraform-small-subnet-example.tfvars"
# Separate control plane subnet
- NAME: "CE with separate controlplane subnet"
TERRAFORM_DIR: "${TRAVIS_BUILD_DIR}/templates/icp-ce"
TERRAFORM_VARS_FILE: "${TERRAFORM_DIR}/terraform-separate-controlplane-subnet-example.tfvars"
# Existing VNET
- NAME: "CE with existing vnet"
TERRAFORM_DIR: "${TRAVIS_BUILD_DIR}/templates/icp-ce"
TERRAFORM_VARS_FILE: "${TERRAFORM_DIR}/terraform-existing-vnet-example.tfvars"
# Minimal example
- NAME: "CE minimal example"
TERRAFORM_DIR: "${TRAVIS_BUILD_DIR}/templates/icp-ce"
TERRAFORM_VARS_FILE: "${TERRAFORM_DIR}/terraform-minimal-example.tfvars"
## Enterprise Edition with Azure Availability Set builds
# EE AS with small subnet
# - TERRAFORM_DIR: "${TRAVIS_BUILD_DIR}/templates/icp-ee-as"
# TERRAFORM_VARS_FILE: "${TERRAFORM_DIR}/terraform-separate-controlplane-subnet-example.tfvars"
# TF_VAR_registry_username: "${REG_USER}"
# TF_VAR_registry_password: "${REG_PASSWD}"
# TF_VAR_private_registry: "${REG_SERVER}"
# TF_VAR_icp_inception_image: "${REG_IMAGE}"
# ## Enterprise Edition with Azure Availability Zones builds
# # EE AZ with small subet
# - TERRAFORM_DIR: "${TRAVIS_BUILD_DIR}/templates/icp-ee-az"
# TERRAFORM_VARS_FILE: "${TERRAFORM_DIR}/terraform-separate-controlplane-subnet-example.tfvars"
# TF_VAR_registry_username: "${REG_USER}"
# TF_VAR_registry_password: "${REG_PASSWD}"
# TF_VAR_private_registry: "${REG_SERVER}"
# TF_VAR_icp_inception_image: "${REG_IMAGE}"
# Install Azure CLI
before_install:
- AZ_REPO=$(lsb_release -cs) && echo "deb [arch=amd64] https://packages.microsoft.com/repos/azure-cli/ $AZ_REPO main" | sudo tee /etc/apt/sources.list.d/azure-cli.list
- curl -L https://packages.microsoft.com/keys/microsoft.asc | sudo apt-key add -
- sudo apt-get install apt-transport-https
- sudo apt-get update && sudo apt-get install azure-cli
# Init the build harness
before_script:
- make init
# Deploy the environment if changes in the relevant template
script:
- make deploy-icp-if-tfchange
- make validate-icp
# When everything has completed we can clean up the environment
after_script:
- export AZURE_RESOURCE_GROUP=${TF_VAR_resource_group} ; make cleanup