Skip to content
Open
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
44 changes: 28 additions & 16 deletions .github/workflows/prod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,11 @@ on:
- released
- prereleased

# TODO: Remove this after testing
push:
branches:
- ch-update-host-server

workflow_dispatch:

jobs:
Expand Down Expand Up @@ -84,23 +89,29 @@ jobs:
- name: Checkout code
uses: actions/checkout@v4

- name: Login (GCP)
uses: google-github-actions/auth@v2
with:
credentials_json: ${{ secrets.CREDENTIALS_JSON }}

- name: Install (Gcloud)
uses: google-github-actions/setup-gcloud@v2
with:
project_id: crane-cloud-274413
install_components: "gke-gcloud-auth-plugin"

- name: Login (Kubernetes Cluster)
uses: google-github-actions/get-gke-credentials@v2
# --- GCP DEPLOYMENT ---
# - name: Login (GCP)
# uses: google-github-actions/auth@v2
# with:
# credentials_json: ${{ secrets.CREDENTIALS_JSON }}

# - name: Install (Gcloud)
# uses: google-github-actions/setup-gcloud@v2
# with:
# project_id: crane-cloud-274413
# install_components: "gke-gcloud-auth-plugin"

# - name: Login (Kubernetes Cluster)
# uses: google-github-actions/get-gke-credentials@v2
# with:
# cluster_name: staging-cluster
# location: us-central1-a
# project_id: crane-cloud-274413

# --- RENU DEPLOYMENT ---
- uses: azure/k8s-set-context@v1
with:
cluster_name: staging-cluster
location: us-central1-a
project_id: crane-cloud-274413
kubeconfig: ${{ secrets.RENU_KUBECONFIG}}

- name: Add Repo (cranecloud)
run: |
Expand All @@ -112,6 +123,7 @@ jobs:
mlops-api cranecloud/cranecloud \
--values helm/values.prod.yaml \
--namespace $namespace \
--set image.repository="${{ env.image }}" \
--set image.tag="${{ needs.build.outputs.tag }}" \
--set environment.DATABASE_URI="${{ secrets.PROD_DATABASE_URI }}" \
--set environment.FLASK_APP_SALT="${{ secrets.PROD_FLASK_APP_SALT }}" \
Expand Down
38 changes: 22 additions & 16 deletions .github/workflows/staging.yml
Original file line number Diff line number Diff line change
Expand Up @@ -83,23 +83,29 @@ jobs:
- name: Checkout code
uses: actions/checkout@v4

- name: Login (GCP)
uses: google-github-actions/auth@v2
# --- GCP DEPLOYEMENT ---
# - name: Login (GCP)
# uses: google-github-actions/auth@v2
# with:
# credentials_json: ${{ secrets.CREDENTIALS_JSON }}

# - name: Install (Gcloud)
# uses: google-github-actions/setup-gcloud@v2
# with:
# project_id: crane-cloud-274413
# install_components: "gke-gcloud-auth-plugin"

# - name: Login (Kubernetes Cluster)
# uses: google-github-actions/get-gke-credentials@v2
# with:
# cluster_name: staging-cluster
# location: us-central1-a
# project_id: crane-cloud-274413

# --- RENU DEPLOYEMENT ---
- uses: azure/k8s-set-context@v1
with:
credentials_json: ${{ secrets.CREDENTIALS_JSON }}

- name: Install (Gcloud)
uses: google-github-actions/setup-gcloud@v2
with:
project_id: crane-cloud-274413
install_components: "gke-gcloud-auth-plugin"

- name: Login (Kubernetes Cluster)
uses: google-github-actions/get-gke-credentials@v2
with:
cluster_name: staging-cluster
location: us-central1-a
project_id: crane-cloud-274413
kubeconfig: ${{ secrets.RENU_KUBECONFIG}}

- name: Add Repo (cranecloud)
run: |
Expand Down
Loading