-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
64 lines (58 loc) · 2.87 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
sudo: required
# We need the systemd for the kubeadm and it's default from 16.04+
dist: xenial
# This moves Kubernetes specific config files.
stages:
- name: "Basic Tests"
- name: "Extended Tests"
if: branch = master
jobs:
include:
- stage: "Basic Tests"
script:
- cd tests && sudo bash ./NoCustomConfigBasicTest.sh
- script: cd tests && sudo bash ./Ce23WithSampleDataMysqlSearchNoNfsTest.sh
- script: cd tests && sudo bash ./MultiInstanceWithCeFromComposerNoNfsTest.sh
- script: cd tests && sudo bash ./EeLinkingTest.sh
env:
- CHANGE_MINIKUBE_NONE_USER=true
install:
# Make root mounted as rshared to fix kube-dns issues.
- sudo mount --make-rshared /
# Download kubectl, which is a requirement for using minikube. Had to install kubeadm on local VM https://kubernetes.io/docs/setup/independent/install-kubeadm/
- curl -Lo kubectl https://storage.googleapis.com/kubernetes-release/release/v1.14.2/bin/linux/amd64/kubectl && chmod +x kubectl && sudo mv kubectl /usr/local/bin/
# Download Minikube.
- curl -Lo minikube https://storage.googleapis.com/minikube/releases/v1.1.1/minikube-linux-amd64 && chmod +x minikube && sudo mv minikube /usr/local/bin/
# Download Helm
- curl https://raw.githubusercontent.com/helm/helm/master/scripts/get > get_helm.sh && chmod +x get_helm.sh && sudo ${TRAVIS_BUILD_DIR}/get_helm.sh
# Socat is required fo proper Helm operation
- sudo apt-get update && sudo apt-get install -y socat expect
# TODO Install sudo apt install nfs-kernel-server
# - sudo apt install -y nfs-kernel-server
- cat ${TRAVIS_BUILD_DIR}/etc/helm/values.yaml
before_script:
- sudo bash ${TRAVIS_BUILD_DIR}/scripts/host/configure_ubuntu_travis.sh
- cat ${TRAVIS_BUILD_DIR}/tests/include/configuration.sh
- cat ${TRAVIS_BUILD_DIR}/scripts/host/k_upgrade_environment.sh
- cat ${TRAVIS_BUILD_DIR}/scripts/host/k_install_environment.sh
- cat ${TRAVIS_BUILD_DIR}/init_project.sh
- cat ${TRAVIS_BUILD_DIR}/etc/instance/config.yaml.dist
- cat ${TRAVIS_BUILD_DIR}/etc/env/config.yaml.dist
# - cat ${TRAVIS_BUILD_DIR}/tests/_files/* # TODO: Cannot cat because of directory, move configs to a separate directory
- cat ${TRAVIS_BUILD_DIR}/scripts/host/get_path_to_php.sh
- while sleep 540; do echo "=====[ $SECONDS seconds still running ]====="; done &
after_failure:
- sudo kubectl describe pods
- sudo kubectl describe deployments
- sudo kubectl get pv,pvc
- sudo kubectl logs -l app=magento -c monolith-xdebug
- sudo kubectl logs -l app=magento -c monolith
- sudo kubectl logs -l app=magento -c nginx
- sudo cat ${TRAVIS_BUILD_DIR}/tests/logs/*
- sudo cat ${TRAVIS_BUILD_DIR}/tests/tmp/test/current-test.log
- sudo cat /etc/exports
- sudo cat /etc/hosts
# TODO: Travis is cutting long logs due to race condition (bug in travis)
#- sudo cat ${TRAVIS_BUILD_DIR}/tests/tmp/test/magento2-devbox/log/*
after_script:
- kill %1