Repository navigation
72 lines (69 loc) · 2.48 KB
/
Copy pathkind-deploy.yaml
File metadata and controls
72 lines (69 loc) · 2.48 KB
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
name: KinD Deployment
on:
deployment:
environment: [e2e]
jobs:
deploy-n-e2e:
name: "Deploy to KinD and E2E"
runs-on: ubuntu-latest
if: github.event.deployment.environment == 'e2e'
steps:
- name: Download kubernetes.local.yaml from Release
env:
RELEASE_URL: ${{ github.event.repository.releases_url }}
run: |
echo "Downloading $RELEASE_URL"
# curl -O -L $RELEASE_URL
# FIXME Workaround
curl -s https://api.github.com/repos/xmlking/micro-starter-kit/releases/latest | grep browser_download_url | grep kubernetes.local.yaml | cut -d '"' -f 4 | wget -qi -
- name: "deployment pending"
uses: "deliverybot/deployment-status@master"
with:
state: "pending"
token: "${{ github.token }}"
- name: "Deploy ${{ github.event.deployment.environment }}"
run: |
echo "task - ${{ github.event.deployment.task }}"
echo "environment - ${{ github.event.deployment.environment }}"
echo "payload - ${{ toJson(github.event.deployment.payload) }}"
- name: "Create cluster using KinD"
id: kind
uses: engineerd/setup-kind@v0.1.0
# with:
# config: .github/kubernetes/kind.yaml
- name: "Deploy kubernetes.local.yaml to KinD"
id: local-path
run: |
export KUBECONFIG="$(kind get kubeconfig-path)"
echo "waiting for nodes to be ready ..."
kubectl wait --for=condition=Ready nodes --all --timeout=5m
echo "nodes ..."
kubectl get nodes
echo "cluster-info ..."
kubectl cluster-info
echo "installing e2e overlay..."
kubectl apply -f kubernetes.local.yaml
echo "waiting for pods to be ready ..."
kubectl wait --for=condition=Ready pods --all --timeout=5m
kubectl get pods
- name: Run e2e tests
env:
# MICRO_REGISTRY: memory
# MICRO_SELECTOR: static
MICRO_PROXY_ADDRESS: "localhost:8081"
run: |
# make test-e2e
# e2e/test.sh
echo "TODO: e2e tests"
- name: "E2E Test success"
if: success()
uses: "deliverybot/deployment-status@master"
with:
state: "success"
token: "${{ github.token }}"
- name: "E2E Test failure"
if: failure()
uses: "deliverybot/deployment-status@master"
with:
state: "failure"
token: "${{ github.token }}"