-
Notifications
You must be signed in to change notification settings - Fork 0
36 lines (35 loc) · 1.22 KB
/
ci.yaml
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
name: CI
on:
- pull_request
jobs:
job1:
runs-on: ubuntu-latest
name: build example and deploy to minikube
steps:
- uses: actions/checkout@v2
- name: Start minikube
uses: medyagh/setup-minikube@master
- name: Try the cluster !
run: kubectl get pods -A
- name: Build image
run: |
export SHELL=/bin/bash
eval $(minikube -p minikube docker-env)
docker build -f ./3-5_app_development/3-5-5-java/Dockerfile.maven -t ghcr.io/takara9/ex5:dev 3-5_app_development/3-5-5-java
echo -n "verifying images:"
docker images
- name: Deploy to minikube
run: |
kubectl apply -f ./4-7_CICD/4-7-1_Continous_Integration/deployment-ex5.yaml
echo "------------------waiting to complete------------------"
sleep 60
kubectl get svc -n exercise
kubectl get deployment -n exercise
kubectl get pod -n exercise
kubectl describe pod -n exercise
- name: Test service URLs
run: |
minikube service -n exercise list
minikube service -n exercise --url ex-5
echo "------------------opening the service------------------"
curl $(minikube service -n exercise ex-5 --url)/ping