forked from kubernetes-sigs/cluster-api-provider-vsphere
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
52 lines (44 loc) · 1.91 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
# Use the newer Travis-CI build templates based on the
# Debian Linux distribution "Trusty" release.
os: linux
dist: trusty
# Set the version of Go.
language: go
go: 1.11
# All jobs require Docker.
sudo: required
services: docker
# Always set the project's Go import path to ensure that forked
# builds get cloned to the correct location.
go_import_path: sigs.k8s.io/cluster-api-provider-vsphere
jobs:
include:
- stage: build
if: |
(
sender =~ env(OWNERS)
)
before_install:
- DOCKER_PASSWORD=$(echo ${DOCKER_PASSWORD} | base64 -d | gzip -d); export DOCKER_PASSWORD
- DOCKER_USERNAME=$(echo ${DOCKER_USERNAME} | base64 -d | gzip -d); export DOCKER_USERNAME
- MCID=$(echo ${TRAVIS_COMMIT} | cut -c1-8) && [[ ${TRAVIS_PULL_REQUEST} != "false" ]] && MCID=$(echo ${TRAVIS_PULL_REQUEST_SHA} | cut -c1-8); echo "DEBUG ${TRAVIS_PULL_REQUEST_SHA}"; export MCID; echo "MCID=${MCID}"
install:
- make depend
script:
- VERSION=${MCID} make ci_push
- stage: e2e test
if: |
(
sender =~ env(OWNERS)
)
before_script:
- mkdir -p ssh
- MCID=$(echo ${TRAVIS_COMMIT} | cut -c1-8) && [[ ${TRAVIS_PULL_REQUEST} != "false" ]] && MCID=$(echo ${TRAVIS_PULL_REQUEST_SHA} | cut -c1-8); echo "DEBUG ${TRAVIS_PULL_REQUEST_SHA}"; export MCID; echo "MCID=${MCID}"
- echo "${JUMPHOST_KEY_FILE}" | base64 -d | gzip -d >ssh/jumphost
- echo "${BOOTSTRAPPER_KEY_FILE}" | base64 -d | gzip -d >ssh/bootstrapper
- echo "${VMC_INFO}" | base64 -d | gzip -d >vmc_info.env
script:
- docker run --rm -v $(pwd)/ssh:/root/ssh --env-file $(pwd)/vmc_info.env -e VSPHERE_MACHINE_CONTROLLER_REGISTRY="luoh/cluster-api-provider-vsphere:${MCID}" -ti luoh/cluster-api-provider-vsphere-travis-ci:latest
branches:
only:
- master