Skip to content

scaled trading-app:3 pods #241

scaled trading-app:3 pods

scaled trading-app:3 pods #241

Workflow file for this run

name: CI-testing
on:
# schedule:
# - cron: '0 8,20 * * *'
push:
branches:
- main
repository_dispatch:
types:
- trigger-ci-testing
jobs:
Build:
runs-on: ubuntu-latest
name: build example and deploy to minikube
steps:
- name: clone application from github repo.
uses: sudosubin/[email protected]
with:
repository: 'ZivAmram/mahat-project-app'
platform: 'github'
- name: enter the folder.
run: ls
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: build docker image
run: |
docker build -t zivamram/trading-app:0.0.${{ github.run_id }} .
- name: Docker Login
uses: docker/login-action@v2
with:
username: zivamram
password: ${{ secrets.DOCKER_HUB_TOKEN }}
- name: docker push
run: |
docker push zivamram/trading-app:0.0.${{ github.run_id }}
- name: checkout
uses: actions/checkout@v3
- name: Update Deployment Manifest
run: |
ls
sed -i "s|image: zivamram/trading-app:.*|image: zivamram/trading-app:0.0.${{ github.run_id }}|" ./trading-app.yaml
- name: Ensure the trading-app.yaml
run: |
cat trading-app.yaml
- name: Start minikube
uses: medyagh/setup-minikube@master
- name: Try the cluster !
run: kubectl get pods -A
- name: Deploy to minikube
run: |
kubectl apply -f mongo.yaml
kubectl apply -f mongo-svc.yaml
kubectl apply -f mongo-pv.yaml
kubectl apply -f mongo-pvc.yaml
kubectl apply -f trading-app.yaml
kubectl apply -f trading-app-svc.yaml
- name: Take a nap
run: sleep 30
- name: Check pods
run: |
kubectl get pods
- name: Test Login To App
run: |
docker images
minikube service list
kubectl get pods
minikube service trading-app-svc --url
echo "---------------opening the service----------------"
curl $(minikube service trading-app-svc --url)/
curl -X POST -d "name=TEST&[email protected]&password=test" $(minikube service trading-app-svc --url)/user/signup
curl -X POST -d "[email protected]&password=test" $(minikube service trading-app-svc --url)/user/login
- name: push to github
uses: github-actions-x/[email protected]
with:
github-token: ${{ secrets.GH_TOKEN }}
push-branch: 'main'
commit-message: 'publish'
force-add: 'true'
files: trading-app.yaml
name: Ziv
email: [email protected]