Skip to content

Commit

Permalink
Merge branch 'develop' into EPO-8491
Browse files Browse the repository at this point in the history
  • Loading branch information
ericdrosas87 committed Sep 21, 2023
2 parents 0ea45e5 + 943b25d commit 58967a9
Show file tree
Hide file tree
Showing 5 changed files with 73 additions and 14 deletions.
7 changes: 4 additions & 3 deletions .github/workflows/dev-pull-request.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,11 @@ jobs:
docker build \
-t "gcr.io/${{ secrets.SV_PROJ_NAME }}/investigations-client:${{ github.sha }}" \
--build-arg NEXT_PUBLIC_API_URL=https://investigations-api-dot-skyviewer.uw.r.appspot.com/api \
--build-arg EDC_LOGGER_API_URL=https://us-central1-skyviewer.cloudfunctions.net/edc-logger \
--build-arg CLOUD_ENV=DEV \
--build-arg NEXT_PUBLIC_BASE_URL=https://investigations-client-dot-skyviewer.uw.r.appspot.com \
--build-arg NEXT_PUBLIC_GOOGLE_APP_ID=688095955960-t0fpaj4ec3gh5vsr9lhg8govapk2oeo9.apps.googleusercontent.com \
--build-arg CRAFT_REVALIDATE_SECRET_TOKEN=1128f3c472c118caa63 \
--build-arg CRAFT_EDUCATOR_SCHEMA_SECRET_TOKEN=KPYySxz0TZjIPAtNCdnYUkguZz6y6BU- \
--build-arg CRAFT_STUDENT_SCHEMA_SECRET_TOKEN=vPNHdjzu4XwKhiYC0jDrQENzGxb2Ltx3 \
.
- name: Configure Docker Auth
run: gcloud --quiet auth configure-docker
Expand Down Expand Up @@ -96,4 +97,4 @@ jobs:

# Destruct!
- name: Destroy version
run: gcloud app versions delete ${{ env.version_name }} --service=investigations-client
run: gcloud app versions delete ${{ env.version_name }} --service=investigations-client
9 changes: 4 additions & 5 deletions .github/workflows/dev-push.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,11 @@ jobs:
docker build \
-t "gcr.io/${{ secrets.SV_PROJ_NAME }}/investigations-client:${{ github.sha }}" \
--build-arg NEXT_PUBLIC_API_URL=https://investigations-api-dot-skyviewer.uw.r.appspot.com/api \
--build-arg EDC_LOGGER_API_URL=https://us-central1-skyviewer.cloudfunctions.net/edc-logger \
--build-arg CLOUD_ENV=DEV \
--build-arg NEXT_PUBLIC_BASE_URL=https://investigations-client-dot-skyviewer.uw.r.appspot.com \
--build-arg NEXT_PUBLIC_GOOGLE_APP_ID=688095955960-t0fpaj4ec3gh5vsr9lhg8govapk2oeo9.apps.googleusercontent.com \
--build-arg NEXT_PUBLIC_CONTACT_FORM_POST_URL= \
--build-arg NEXT_PUBLIC_PLAUSIBLE_DOMAIN= \
--build-arg CRAFT_REVALIDATE_SECRET_TOKEN=1128f3c472c118caa63 \
--build-arg CRAFT_EDUCATOR_SCHEMA_SECRET_TOKEN=KPYySxz0TZjIPAtNCdnYUkguZz6y6BU- \
--build-arg CRAFT_STUDENT_SCHEMA_SECRET_TOKEN=vPNHdjzu4XwKhiYC0jDrQENzGxb2Ltx3 \
.
- name: Configure Docker Auth
run: gcloud --quiet auth configure-docker
Expand All @@ -50,4 +49,4 @@ jobs:
--quiet \
--image-url=gcr.io/${{ secrets.SV_PROJ_NAME }}/investigations-client:${{ github.sha }} \
--promote \
--project=${{ secrets.SV_PROJ_NAME }}
--project=${{ secrets.SV_PROJ_NAME }}
5 changes: 3 additions & 2 deletions .github/workflows/main-pull-request.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,11 @@ jobs:
docker build \
-t "gcr.io/edc-int-6c5e/investigations-client:${{ github.sha }}" \
--build-arg NEXT_PUBLIC_API_URL=https://investigations-api-dot-edc-int-6c5e.uc.r.appspot.com/api \
--build-arg EDC_LOGGER_API_URL=https://us-central1-skyviewer.cloudfunctions.net/edc-logger \
--build-arg CLOUD_ENV=DEV \
--build-arg NEXT_PUBLIC_BASE_URL=https://investigations-client-dot-edc-int-6c5e.uc.r.appspot.com \
--build-arg NEXT_PUBLIC_GOOGLE_APP_ID=688095955960-t0fpaj4ec3gh5vsr9lhg8govapk2oeo9.apps.googleusercontent.com \
--build-arg CRAFT_REVALIDATE_SECRET_TOKEN=1128f3c472c118caa63 \
--build-arg CRAFT_EDUCATOR_SCHEMA_SECRET_TOKEN=3Hs3ws4HceNjkTc16QpU5DdSzxjbccvt \
--build-arg CRAFT_STUDENT_SCHEMA_SECRET_TOKEN=uRGwM2RnTwtz33uYuTBHgZZKLauLmAUR \
.
- name: Configure Docker Auth
run: gcloud --quiet auth configure-docker
Expand Down
7 changes: 3 additions & 4 deletions .github/workflows/main-push.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,11 @@ jobs:
docker build \
-t "gcr.io/edc-int-6c5e/investigations-client:${{ github.sha }}" \
--build-arg NEXT_PUBLIC_API_URL=https://investigations-api-dot-edc-int-6c5e.uc.r.appspot.com/api \
--build-arg EDC_LOGGER_API_URL=https://us-central1-skyviewer.cloudfunctions.net/edc-logger \
--build-arg CLOUD_ENV=DEV \
--build-arg NEXT_PUBLIC_BASE_URL=https://investigations-client-dot-edc-int-6c5e.uc.r.appspot.com \
--build-arg NEXT_PUBLIC_GOOGLE_APP_ID=688095955960-t0fpaj4ec3gh5vsr9lhg8govapk2oeo9.apps.googleusercontent.com \
--build-arg NEXT_PUBLIC_CONTACT_FORM_POST_URL= \
--build-arg NEXT_PUBLIC_PLAUSIBLE_DOMAIN= \
--build-arg CRAFT_REVALIDATE_SECRET_TOKEN=1128f3c472c118caa63 \
--build-arg CRAFT_EDUCATOR_SCHEMA_SECRET_TOKEN=3Hs3ws4HceNjkTc16QpU5DdSzxjbccvt \
--build-arg CRAFT_STUDENT_SCHEMA_SECRET_TOKEN=uRGwM2RnTwtz33uYuTBHgZZKLauLmAUR \
.
- name: Configure Docker Auth
run: gcloud --quiet auth configure-docker
Expand Down
59 changes: 59 additions & 0 deletions .github/workflows/main-release-tag.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
name: '🧶 Deploy to Prod 🐈'

on:
push:
branches:
- '!*'
tags:
- 'v*'

jobs:
build-push-deploy:
name: '🧶 Build and Deploy to Production 🐈'
runs-on: ubuntu-latest

# Checkout the repository to the GitHub Actions runner
steps:
- name: Checkout
uses: actions/checkout@v2

# gcloud CLI setup
- name: Login to GCP
uses: google-github-actions/setup-gcloud@v0
with:
service_account_key: ${{ secrets.PIPELINE_EPO_PROD_PROJECT }}
project_id: edc-prod-eef0
export_default_credentials: true

- name: Format version name
id: version_name
run: echo "version_name=$(echo \"${{ github.ref_name }}\" | sed 's/[_.,\/]/-/g' | tr '[:upper:]' '[:lower:]')" >> $GITHUB_ENV

- name: Build Container Image
run: |-
docker build \
-t "gcr.io/edc-prod-eef0/rubin-obs-client:${{ env.version_name }}" \
--build-arg NEXT_PUBLIC_API_URL=https://investigations-api-dot-skyviewer.uw.r.appspot.com/api \
--build-arg NEXT_PUBLIC_BASE_URL=https://investigations-api-dot-skyviewer.uw.r.appspot.com \
--build-arg EDC_LOGGER_API_URL=https://us-central1-skyviewer.cloudfunctions.net/edc-logger \
--build-arg CLOUD_ENV=PROD \
--build-arg NEXT_PUBLIC_GOOGLE_APP_ID=596747551410-vcqlrp7erg5c5gm0dkvc0k21mgi0ilg0.apps.googleusercontent.com \
--build-arg NEXT_PUBLIC_CONTACT_FORM_POST_URL=https://api.rubinobs.org/actions/contact-form/send \
--build-arg NEXT_PUBLIC_PLAUSIBLE_DOMAIN=investigations-api-dot-skyviewer.uw.r.appspot.com \
.
- name: Configure Docker Auth
run: gcloud --quiet auth configure-docker

- name: Push Container Image to GCR
run: docker push gcr.io/edc-prod-eef0/rubin-obs-client:${{ env.version_name }}

- name: Get app.yaml
run: gcloud secrets versions access latest --secret=investigations-client-appyaml > app.yaml

- name: Deploy to App Engine
run: |-
gcloud app deploy app.yaml \
--image-url=gcr.io/edc-prod-eef0/rubin-obs-client:${{ env.version_name }} \
--version=${{ env.version_name }} \
--promote \
--project=edc-prod-eef0

0 comments on commit 58967a9

Please sign in to comment.