forked from cloudfoundry-incubator/quarks-operator
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.drone.yml
54 lines (49 loc) · 1.91 KB
/
.drone.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
---
kind: pipeline
name: cf-operator
clone:
depth: 5
steps:
- name: submodules
image: docker:git
commands:
- git config user.email "[email protected]"
- git config user.name "cfcontainerizationbot"
- git submodule update --init --recursive
- name: build-and-test-integration
image: cfcontainerization/drone-ci-image
privileged: true
volumes:
- name: var-lib-docker
path: /var/lib/docker
commands:
- "dockerd --host=unix:///var/run/docker.sock > /var/log/docker.log 2>&1 &"
- echo "wait a bit for docker to come online"
- sleep 5
- kind create cluster --image kindest/node:v1.13.6
- export KUBECONFIG="$(kind get kubeconfig-path --name="kind")"
- make build vet lint test-unit build-image
- . bin/include/versioning && kind load docker-image cfcontainerization/cf-operator:$ARTIFACT_VERSION
# Replace kind's default storage class, because it has trouble with sub-paths
- kubectl apply -f https://raw.githubusercontent.com/rancher/local-path-provisioner/master/deploy/local-path-storage.yaml
- "kubectl patch storageclass standard -p '{\"metadata\": {\"annotations\":{\"storageclass.kubernetes.io/is-default-class\":\"false\", \"storageclass.beta.kubernetes.io/is-default-class\":\"false\"}}}'"
- "kubectl patch storageclass local-path -p '{\"metadata\": {\"annotations\":{\"storageclass.kubernetes.io/is-default-class\":\"true\", \"storageclass.beta.kubernetes.io/is-default-class\":\"true\"}}}'"
# Kube can reach us on the docker0 interface
- export CF_OPERATOR_WEBHOOK_SERVICE_HOST=$(ip -4 addr show docker0 | grep -oP '(?<=inet\s)\d+(\.\d+){3}')
- export OPERATOR_TEST_STORAGE_CLASS="local-path"
# Run integration tests
- make test-integration test-integration-storage
# services:
# - name: docker
# image: docker:18.09.6-dind
# privileged: true
volumes:
- name: var-lib-docker
temp: {}
trigger:
branch:
- master
event:
include:
- push
- pull_request