Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cd #49

Merged
merged 3 commits into from
Dec 6, 2023
Merged

Cd #49

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions .deploy/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,17 +16,17 @@ spec:
spec:
containers:
- name: vault-app
image: asia-south1-docker.pkg.dev/fyre-400407/hypersign-image-repository/vault-service:latest
image: __GOOGLE_ARTIFACT_URL__/__GOOGLE_PROJECT_ID__/__GOOGLE_ARTIFACT_REPO__/vault-service:latest
resources:
limits:
memory: "1Gi"
cpu: "500m"
ports:
- containerPort: 3000
- containerPort: __PORT__
livenessProbe:
httpGet:
path: /api
port: 3000
port: __PORT__
env:
- name: HOST
value: __HOST__
Expand Down Expand Up @@ -56,8 +56,8 @@ spec:
selector:
app: vault-app
ports:
- port: 3000
targetPort: 3000
- port: __PORT__
targetPort: __PORT__
protocol: TCP
---

41 changes: 21 additions & 20 deletions .github/workflows/image-publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -62,26 +62,27 @@ jobs:
- name: "Configure kubectl"
run: gcloud container clusters get-credentials hypermine-gke --region=asia-south1
- name: "Replace secrets"
run:
find .deploy/deployment.yaml -type f -exec sed -i ''s/__PORT__/${{ secrets.PORT }}/g'' {} \;

find .deploy/deployment.yaml -type f -exec sed -i ''s/__HOST__/${{ secrets.HOST }}/g'' {} \;

find .deploy/deployment.yaml -type f -exec sed -i ''s/__ABSOLUTE_URL__/${{ secrets.ABSOLUTE_URL }}/g'' {} \;

find .deploy/deployment.yaml -type f -exec sed -i ''s/__DATA_VAULT__/${{ secrets.DATA_VAULT }}/g'' {} \;

find .deploy/deployment.yaml -type f -exec sed -i ''s/__DB_URL__/${{ secrets.DB_URL }}/g'' {} \;

find .deploy/deployment.yaml -type f -exec sed -i ''s/__LOG_LEVEL__/${{ secrets.LOG_LEVEL }}/g'' {} \;

find .deploy/deployment.yaml -type f -exec sed -i ''s/__SSL__/${{ secrets.SSL }}/g'' {} \;

find .deploy/deployment.yaml -type f -exec sed -i ''s/__GOOGLE_ARTIFACT_URL__/${{ secrets.GOOGLE_ARTIFACT_URL }}/g'' {} \;

find .deploy/deployment.yaml -type f -exec sed -i ''s/__GOOGLE_ARTIFACT_REPO__/${{ secrets.GOOGLE_ARTIFACT_REPO }}/g'' {} \;

find .deploy/deployment.yaml -type f -exec sed -i ''s/__GOOGLE_PROJECT_ID__/${{ secrets.GOOGLE_PROJECT_ID }}/g'' {} \;
run: find .deploy/deployment.yaml -type f -exec sed -i ''s/__PORT__/${{ secrets.PORT }}/g'' {} \;
- name: "Replace secrets"
run: find .deploy/deployment.yaml -type f -exec sed -i ''s/__HOST__/${{ secrets.HOST }}/g'' {} \;
- name: "Replace secrets"
run: find .deploy/deployment.yaml -type f -exec sed -i ''s/__ABSOLUTE_URL__/${{ secrets.ABSOLUTE_URL }}/g'' {} \;
- name: "Replace secrets"
run: find .deploy/deployment.yaml -type f -exec sed -i ''s/__DATA_VAULT__/${{ secrets.DATA_VAULT }}/g'' {} \;
- name: "Replace secrets"
run: find .deploy/deployment.yaml -type f -exec sed -i ''s/__DB_URL__/${{ secrets.DB_URL }}/g'' {} \;
- name: "Replace secrets"
run: find .deploy/deployment.yaml -type f -exec sed -i ''s/__LOG_LEVEL__/${{ secrets.LOG_LEVEL }}/g'' {} \;

- name: "Replace secrets"
run: find .deploy/deployment.yaml -type f -exec sed -i ''s/__SSL__/${{ secrets.SSL }}/g'' {} \;
- name: "Replace secrets"
run: find .deploy/deployment.yaml -type f -exec sed -i ''s/__GOOGLE_ARTIFACT_URL__/${{ secrets.GOOGLE_ARTIFACT_URL }}/g'' {} \;
- name: "Replace secrets"
run: find .deploy/deployment.yaml -type f -exec sed -i ''s/__GOOGLE_ARTIFACT_REPO__/${{ secrets.GOOGLE_ARTIFACT_REPO }}/g'' {} \;
- name: "Replace secrets"
run: find .deploy/deployment.yaml -type f -exec sed -i ''s/__GOOGLE_PROJECT_ID__/${{ secrets.GOOGLE_PROJECT_ID }}/g'' {} \;


- name: "Deploy to GKE"
run: kubectl apply -f .deploy/deployment.yaml
Loading