Skip to content

Commit

Permalink
/run-deploy-app
Browse files Browse the repository at this point in the history
  • Loading branch information
Lliillyy committed Dec 11, 2023
1 parent 22756c4 commit f6e26d8
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 32 deletions.
4 changes: 1 addition & 3 deletions .github/workflows/ci-cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ jobs:
- name: Run Deploy App
if: contains(github.event.head_commit.message, '/run-deploy-app')
run: |-
docker run --name app_deployment \
docker run --rm --name app_deployment \
-v /var/run/docker.sock:/var/run/docker.sock \
-v $HOME/.ssh:/home/app/.ssh \
-v ${{ github.workspace }}/src/frontend:/frontend-react \
Expand All @@ -48,6 +48,4 @@ jobs:
-e GCP_PROJECT=ac215project-398401 \
-e GCP_ZONE=us-west3-b \
app_deployment sh deploy-app.sh
docker ps
docker exec app_deployment /bin/bash -c 'sh deploy-app.sh'
- run: echo "Job's status is ${{ job.status }}."
58 changes: 29 additions & 29 deletions src/app_deploy/update-k8s-cluster.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,32 +51,32 @@
protocol: TCP
restartPolicy: Always

- name: "Update Deployment for API Service"
k8s:
state: present
definition:
apiVersion: v1
kind: Deployment
metadata:
name: api
namespace: "{{cluster_name}}-namespace"
spec:
selector:
matchLabels:
run: api
template:
metadata:
labels:
run: api
spec:
volumes:
- name: persistent-vol
emptyDir: {}
- name: google-cloud-key
secret:
secretName: gcp-service-key
containers:
- image: gcr.io/{{ gcp_project }}/science-tutor-api-service:{{ tag.stdout}}
imagePullPolicy: IfNotPresent
name: api
restartPolicy: Always
# - name: "Update Deployment for API Service"
# k8s:
# state: present
# definition:
# apiVersion: v1
# kind: Deployment
# metadata:
# name: api
# namespace: "{{cluster_name}}-namespace"
# spec:
# selector:
# matchLabels:
# run: api
# template:
# metadata:
# labels:
# run: api
# spec:
# volumes:
# - name: persistent-vol
# emptyDir: {}
# - name: google-cloud-key
# secret:
# secretName: gcp-service-key
# containers:
# - image: gcr.io/{{ gcp_project }}/science-tutor-api-service:{{ tag.stdout}}
# imagePullPolicy: IfNotPresent
# name: api
# restartPolicy: Always

0 comments on commit f6e26d8

Please sign in to comment.