improve link
parent
481e9acf55
commit
c63dea7db3
|
@ -24,18 +24,17 @@ for more information checkout github actions marketplace :[setup-minikube](https
|
|||
Requirements:
|
||||
|
||||
- a valid Dockerfile
|
||||
- a valid deployment.yaml (make sure image pull policy is set to never see bellow for example
|
||||
- a valid deployment.yaml to deploy image to kubernetes (make sure image pull policy is set to never see [bellow](/#deployment.yaml used in the example) for example)
|
||||
|
||||
Steps:
|
||||
|
||||
- Copy the wokryaml to `.github/workflows/pr.yml` in your github repo.
|
||||
- Make a PR to your repo and see the result in github actions.
|
||||
- Create a workflow yaml in your github repo in `.github/workflows/pr.yml`
|
||||
|
||||
```yaml
|
||||
name: CI
|
||||
on:
|
||||
```yaml
|
||||
name: CI
|
||||
on:
|
||||
- pull_request
|
||||
jobs:
|
||||
jobs:
|
||||
job1:
|
||||
runs-on: ubuntu-latest
|
||||
name: build example and deploy to minikbue
|
||||
|
@ -61,18 +60,18 @@ jobs:
|
|||
minikube service example --url
|
||||
echo "------------------opening the service------------------"
|
||||
curl $(minikube service example --url)/version
|
||||
```
|
||||
```
|
||||
|
||||
In this example, the above workflow yaml, will do the following steps on each coming PR:
|
||||
|
||||
1- Checks out the the source code
|
||||
2- Installs and starts minikube
|
||||
3- Trying out the cluster just by running kubectl get pods -A
|
||||
4- Build the docker image using minikube's docker-env feature
|
||||
5- Apply the yaml deployment yaml file minikube
|
||||
6- Check the service been created in minikube
|
||||
1. Checks out the the source code
|
||||
2. Installs & starts minikube
|
||||
3. Tries out the cluster just by running `kubectl` command
|
||||
4. Build the docker image using minikube's docker-env feature
|
||||
5. Apply the yaml deployment yaml file minikube
|
||||
6. Check the service been created in minikube
|
||||
|
||||
### example deployment yaml for minikube
|
||||
### deployment.yaml used in the example
|
||||
|
||||
```yaml
|
||||
apiVersion: apps/v1
|
||||
|
|
Loading…
Reference in New Issue