Skip to content
This repository has been archived by the owner on Jul 8, 2024. It is now read-only.

Commit

Permalink
Merge pull request #123 from floriaaan/deploy-on-azure
Browse files Browse the repository at this point in the history
[TECH] Test deploy with ssh
  • Loading branch information
floriaaan authored Jul 8, 2024
2 parents 878f374 + e844677 commit 99151d3
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 29 deletions.
13 changes: 7 additions & 6 deletions .github/workflows/basket.yml
Original file line number Diff line number Diff line change
Expand Up @@ -84,11 +84,12 @@ jobs:
deploy:
runs-on: ubuntu-latest
needs: [build, test, publish]

steps:
- name: Install Kubectl
uses: azure/setup-kubectl@v3
- name: Setup Cluster Authentication
run: cat ${{ secrets.KUBECONFIG }} > /tmp/kubeconfig
- name: Deploying basket
run: kubectl --kubeconfig=/tmp/kubeconfig rollout restart deployment basket-service
uses: appleboy/[email protected]
with:
host: ${{ secrets.SSH_HOST }}
username: ${{ secrets.SSH_USER }}
key: ${{ secrets.SSH_KEY }}
port: ${{ secrets.SSH_PORT }}
script: kubectl rollout restart deployment basket-service
13 changes: 7 additions & 6 deletions .github/workflows/log.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,11 +67,12 @@ jobs:
deploy:
runs-on: ubuntu-latest
needs: [build, test, publish]

steps:
- name: Install Kubectl
uses: azure/setup-kubectl@v3
- name: Setup Cluster Authentication
run: cat ${{ secrets.KUBECONFIG }} > /tmp/kubeconfig
- name: Deploying log
run: kubectl --kubeconfig=/tmp/kubeconfig rollout restart deployment log-service
uses: appleboy/[email protected]
with:
host: ${{ secrets.SSH_HOST }}
username: ${{ secrets.SSH_USER }}
key: ${{ secrets.SSH_KEY }}
port: ${{ secrets.SSH_PORT }}
script: kubectl rollout restart deployment log-service
26 changes: 9 additions & 17 deletions .github/workflows/product.yml
Original file line number Diff line number Diff line change
Expand Up @@ -85,22 +85,14 @@ jobs:
deploy:
runs-on: ubuntu-latest
needs: [build, test, publish]

steps:
- name: Install Kubectl
uses: azure/setup-kubectl@v3
- name: Install Go
uses: actions/setup-go@v4
with:
go-version: 1.20.3
- name: Install Podman
run: sudo apt-get -y install podman
- name: Install Kind
run: go install sigs.k8s.io/[email protected]
- name: Setup Cluster Authentication
env:
KUBECONFIG_DATA: ${{ secrets.KUBECONFIG }}
run: |
echo "$KUBECONFIG_DATA" | base64 --decode > /tmp/kubeconfig
- name: Deploying product
run: kubectl --kubeconfig=/tmp/kubeconfig rollout restart deployment product-service
uses: appleboy/[email protected]
with:
host: ${{ secrets.SSH_HOST }}
username: ${{ secrets.SSH_USER }}
key: ${{ secrets.SSH_KEY }}
port: ${{ secrets.SSH_PORT }}
script: |
ls -al
kubectl rollout restart deployment product-service

0 comments on commit 99151d3

Please sign in to comment.