From 81ecf50f87f67ab21d247cea8bde4664a842d6c1 Mon Sep 17 00:00:00 2001 From: Gilad Alboher Date: Mon, 29 Jan 2024 18:44:55 +0200 Subject: [PATCH 1/6] test ci --- .github/workflows/CI.yaml | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/.github/workflows/CI.yaml b/.github/workflows/CI.yaml index 6129bbf..546708a 100644 --- a/.github/workflows/CI.yaml +++ b/.github/workflows/CI.yaml @@ -26,19 +26,15 @@ jobs: run: | SECONDS=0 TIMEOUT=60 - while true; do - POD_COUNT=$(kubectl get pods -n integratorportal -o custom-columns=:metadata.name | wc -l) - CURRENT_READY_PODS=$(kubectl get pods -n integratorportal -l app=integratorportal -o 'jsonpath={..status.conditions[?(@.type=="Ready")].status}' | grep -o "True" | wc -l) - if [[ $CURRENT_READY_PODS -eq $POD_COUNT ]]; then - break - elif [[ $SECONDS -gt $TIMEOUT ]]; then + POD_COUNT=$(kubectl get pods -n integratorportal --no-headers -o custom-columns=:metadata.name | wc -l) + while [[ $(kubectl get pods -n integratorportal -o 'jsonpath={..status.conditions[?(@.type=="Ready")].status}' | grep -o "True" | wc -l) -ne $POD_COUNT ]]; do + if [[ $SECONDS -gt $TIMEOUT ]]; then echo "Timed out waiting for pods to be ready" pod_name=$(kubectl get pods -n integratorportal -l app=integratorportal -o jsonpath='{.items[0].metadata.name}') kubectl describe pods $pod_name -n integratorportal exit 1 fi kubectl get pods -n integratorportal && sleep 1; - SECONDS=$((SECONDS+1)) done - name: Test service URLs From 58f692f6a0ace2bf4bff0e4960b3eee7a4701565 Mon Sep 17 00:00:00 2001 From: Gilad Alboher Date: Mon, 29 Jan 2024 18:48:50 +0200 Subject: [PATCH 2/6] test ci --- .github/workflows/CI.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/CI.yaml b/.github/workflows/CI.yaml index 546708a..4d84e6f 100644 --- a/.github/workflows/CI.yaml +++ b/.github/workflows/CI.yaml @@ -42,7 +42,7 @@ jobs: docker images minikube service list kubectl get pods - minikube service integratorportal-service --url + minikube service integratorportal-service -n integratorportal --url echo "-----------------opening the service-----------------" - name: Set up QEMU From 5504f2fa199bd53779bb3a5c4b68c7e21a243ee7 Mon Sep 17 00:00:00 2001 From: Gilad Alboher Date: Mon, 29 Jan 2024 18:58:20 +0200 Subject: [PATCH 3/6] test ci --- .github/workflows/CI.yaml | 37 +++++++++++++++---------------------- 1 file changed, 15 insertions(+), 22 deletions(-) diff --git a/.github/workflows/CI.yaml b/.github/workflows/CI.yaml index 4d84e6f..b3b0702 100644 --- a/.github/workflows/CI.yaml +++ b/.github/workflows/CI.yaml @@ -9,6 +9,21 @@ jobs: steps: - name: checkout uses: actions/checkout@v4 + + - 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 giladalboher/integratorportal:v1.0.${{ github.run_id }} . + + - name: Update Deployment Manifest + run: | + sed -i "s|image: giladalboher/integratorportal:v1.0.*|image: giladalboher/integratorportal:v1.0.${{ github.run_id }}|" configs/intergratorportal.yaml + - name: Start minikube uses: medyagh/setup-minikube@master @@ -36,25 +51,7 @@ jobs: fi kubectl get pods -n integratorportal && sleep 1; done - - - name: Test service URLs - run: | - docker images - minikube service list - kubectl get pods - minikube service integratorportal-service -n integratorportal --url - echo "-----------------opening the service-----------------" - - 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 giladalboher/integratorportal:v1.0.${{ github.run_id }} . - - name: Login to Docker Hub uses: docker/login-action@v3 with: @@ -66,10 +63,6 @@ jobs: - name: docker push run: | docker push giladalboher/integratorportal:v1.0.${{ github.run_id }} - - - name: Update Deployment Manifest - run: | - sed -i "s|image: giladalboher/integratorportal:v1.0.*|image: giladalboher/integratorportal:v1.0.${{ github.run_id }}|" configs/intergratorportal.yaml - name: Commit & Push changes From e6a69070ee24c915e465464be38e20dcd0886680 Mon Sep 17 00:00:00 2001 From: Gilad Alboher Date: Mon, 29 Jan 2024 19:04:38 +0200 Subject: [PATCH 4/6] fix deployment to minikube --- .github/workflows/CI.yaml | 24 +++++++++++------------- 1 file changed, 11 insertions(+), 13 deletions(-) diff --git a/.github/workflows/CI.yaml b/.github/workflows/CI.yaml index b3b0702..940da27 100644 --- a/.github/workflows/CI.yaml +++ b/.github/workflows/CI.yaml @@ -24,6 +24,17 @@ jobs: run: | sed -i "s|image: giladalboher/integratorportal:v1.0.*|image: giladalboher/integratorportal:v1.0.${{ github.run_id }}|" configs/intergratorportal.yaml + - name: Login to Docker Hub + uses: docker/login-action@v3 + with: + username: ${{ secrets.DOCKER_USER }} + password: ${{ secrets.DOCKER_TOKEN }} + ecr: auto + logout: true + + - name: docker push + run: | + docker push giladalboher/integratorportal:v1.0.${{ github.run_id }} - name: Start minikube uses: medyagh/setup-minikube@master @@ -52,19 +63,6 @@ jobs: kubectl get pods -n integratorportal && sleep 1; done - - name: Login to Docker Hub - uses: docker/login-action@v3 - with: - username: ${{ secrets.DOCKER_USER }} - password: ${{ secrets.DOCKER_TOKEN }} - ecr: auto - logout: true - - - name: docker push - run: | - docker push giladalboher/integratorportal:v1.0.${{ github.run_id }} - - - name: Commit & Push changes uses: actions-js/push@master with: From 061c6a7e0e3e173cee3661afc5a6eff0f5ebd707 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Mon, 29 Jan 2024 17:08:04 +0000 Subject: [PATCH 5/6] chore: autopublish 2024-01-29T17:08:04Z --- configs/intergratorportal.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configs/intergratorportal.yaml b/configs/intergratorportal.yaml index 6f6d815..fe44c00 100644 --- a/configs/intergratorportal.yaml +++ b/configs/intergratorportal.yaml @@ -15,7 +15,7 @@ spec: spec: containers: - name: integratorportal - image: giladalboher/integratorportal:v1.0.7697634675 + image: giladalboher/integratorportal:v1.0.7699733571 ports: - containerPort: 3000 resources: From cb129b6d75fb3621b151b0351e3aab39c985402c Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Mon, 29 Jan 2024 17:11:43 +0000 Subject: [PATCH 6/6] chore: autopublish 2024-01-29T17:11:43Z --- configs/intergratorportal.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configs/intergratorportal.yaml b/configs/intergratorportal.yaml index fe44c00..3e9eb66 100644 --- a/configs/intergratorportal.yaml +++ b/configs/intergratorportal.yaml @@ -15,7 +15,7 @@ spec: spec: containers: - name: integratorportal - image: giladalboher/integratorportal:v1.0.7699733571 + image: giladalboher/integratorportal:v1.0.7699784857 ports: - containerPort: 3000 resources: