This repository has been archived by the owner on Jul 8, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #123 from floriaaan/deploy-on-azure
[TECH] Test deploy with ssh
- Loading branch information
Showing
3 changed files
with
23 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 |