Skip to content

Commit

Permalink
Merge branch 'master' into playwright_integration
Browse files Browse the repository at this point in the history
  • Loading branch information
akiva10b committed Jul 31, 2023
2 parents 3e7c3dd + 3f71bd7 commit 45be78c
Show file tree
Hide file tree
Showing 118 changed files with 1,091 additions and 3,141 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/continuous.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ jobs:
context: .
push: true
build-args: |
SRC_IMG=gcr.io/${{ secrets.DEV_PROJECT }}/sefaria-web-${{ steps.branch-name.outputs.current_branch }}:sha-${{ steps.get-sha.outputs.sha_short }}
SRC_IMG=us-east1-docker.pkg.dev/${{ secrets.DEV_PROJECT }}/containers/sefaria-web-${{ steps.branch-name.outputs.current_branch }}:sha-${{ steps.get-sha.outputs.sha_short }}
file: ./build/${{ matrix.app }}/Dockerfile
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
Expand Down Expand Up @@ -384,7 +384,7 @@ jobs:
env:
# dependent on GITHUB_RUN_ID, which is implicitly passed in
DEPLOY_ENV: sandbox-${{ steps.get-sha.outputs.sha_short }}
WEB_IMAGE_NAME: gcr.io/${{secrets.DEV_PROJECT}}/sefaria-web-${{ steps.branch-name.outputs.current_branch }}
WEB_IMAGE_NAME: us-east1-docker.pkg.dev/${{secrets.DEV_PROJECT}}/containers/sefaria-web-${{ steps.branch-name.outputs.current_branch }}
WEB_IMAGE_TAG: sha-${{ steps.get-sha.outputs.sha_short }}
- name: Wait For Job To Finish
run: ./build/ci/waitForCIJob.bash
Expand Down
33 changes: 21 additions & 12 deletions .github/workflows/production-deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ on:
chart_version:
type: string
required: true
default: 0.20.0
default: current
description: Set to 'current' to use currently deployed chart version or '0.x.y' to specify chart

jobs:
# Note - build occurs again here, even though this image has been built in continuous.
Expand Down Expand Up @@ -200,21 +201,29 @@ jobs:
project_id: ${{secrets.PROD_GKE_PROJECT}}
- name: Set up yq
uses: frenck/action-setup-yq@v1
- name: Determine chart version
id: chart_version
run: |
if [[ "${{ inputs.chart_version }}" == "current" ]]; then
echo "chart_version=${{ vars.CHART_VERSION }}" >> $GITHUB_OUTPUT
else
echo "chart_version=${{ inputs.chart_version }}" >> $GITHUB_OUTPUT
fi
- name: Deploy Production
run: ./build/ci/production-helm-deploy.sh build/ci/production-values.yaml
env:
GIT_COMMIT: "${{ needs.workflow-check.outputs.ref }}"
PROJECT_ID: "${{ secrets.PROD_GKE_PROJECT }}"
NAMESPACE: "${{secrets.PROD_GKE_NAMESPACE}}"
IMAGE_NAME: "${{ secrets.IMAGE_NAME }}"
CHART_VERSION: "${{ inputs.chart_version }}"
# - name: Update workflow default chart
# if: github.ref == 'refs/heads/master'
# run: |
# yq -i e '.on.workflow_dispatch.inputs.chart_version.default="${{ inputs.chart_version }}"' .github/workflows/release.yml
# yq -i e '.on.workflow_call.inputs.chart_version.default="${{ inputs.chart_version }}"' .github/workflows/production-deploy.yaml
# git config user.email [email protected]
# git config user.name "Sefaria Automated Workflow"
# git checkout -b master
# git commit -am "ci: update default chart version to ${{ inputs.chart_version }}"
# git push
CHART_VERSION: "${{ steps.chart_version.outputs.chart_version }}"
- name: Update workflow default chart
if: github.ref == 'refs/heads/master'
run: >
curl -L
-X PATCH
-H "Accept: application/vnd.github+json"
-H "Authorization: Bearer ${{ secrets.WORKFLOW_AUTOMATION_TOKEN }}"
-H "X-GitHub-Api-Version: 2022-11-28"
https://api.github.com/repos/Sefaria/Sefaria-Project/actions/variables/CHART_VERSION
-d '{"name":"CHART_VERSION","value":"${{ steps.chart_version.outputs.chart_version }}"}'
4 changes: 3 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@ on:
chart_version:
type: string
required: true
default: 0.20.0
default: current
description: Set to 'current' to use currently deployed chart version or '0.x.y' to specify chart

jobs:
semantic-release:
runs-on: ubuntu-latest
Expand Down
6 changes: 3 additions & 3 deletions build/ci/sandbox-helm-deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
set -x
set -e

export WEB_IMAGE="gcr.io/$PROJECT_ID/sefaria-web-$BRANCH"
export NODE_IMAGE="gcr.io/$PROJECT_ID/sefaria-node-$BRANCH"
export ASSET_IMAGE="gcr.io/$PROJECT_ID/sefaria-asset-$BRANCH"
export WEB_IMAGE="us-east1-docker.pkg.dev/$PROJECT_ID/containers/sefaria-web-$BRANCH"
export NODE_IMAGE="us-east1-docker.pkg.dev/$PROJECT_ID/containers/sefaria-node-$BRANCH"
export ASSET_IMAGE="us-east1-docker.pkg.dev/$PROJECT_ID/containers/sefaria-asset-$BRANCH"
export TAG="sha-$GIT_COMMIT"
export NAME="sandbox-$GIT_COMMIT"

Expand Down
8 changes: 4 additions & 4 deletions build/ci/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ deployEnv:
previousServicesCount: "1"
web:
containerImage:
imageRegistry: gcr.io/development-205018/sefaria-web-${BRANCH}
imageRegistry: us-east1-docker.pkg.dev/development-205018/containers/sefaria-web-${BRANCH}
tag:
secrets:
googleClient:
Expand All @@ -19,7 +19,7 @@ redis:
tag: latest
nodejs:
containerImage:
imageRegistry: gcr.io/development-205018/sefaria-node-${BRANCH}
imageRegistry: us-east1-docker.pkg.dev/development-205018/containers/sefaria-node-${BRANCH}
tag:
varnish:
secrets:
Expand All @@ -36,11 +36,11 @@ ingress:
ref: cauldron-wildcard-letsencrypt
nginx:
containerImage:
imageRegistry: gcr.io/development-205018/sefaria-asset-${BRANCH}
imageRegistry: us-east1-docker.pkg.dev/development-205018/containers/sefaria-asset-${BRANCH}
tag:
monitor:
containerImage:
imageRegistry: gcr.io/development-205018/sefaria-web-${BRANCH}
imageRegistry: us-east1-docker.pkg.dev/development-205018/containers/sefaria-web-${BRANCH}
tag:
secrets:
localSettings:
Expand Down
1 change: 0 additions & 1 deletion dafChat/.dockerignore

This file was deleted.

2 changes: 0 additions & 2 deletions dafChat/.gitignore

This file was deleted.

15 changes: 0 additions & 15 deletions dafChat/README.md

This file was deleted.

64 changes: 0 additions & 64 deletions dafChat/deploy/cloudbuild.yaml

This file was deleted.

15 changes: 0 additions & 15 deletions dafChat/deploy/coturnServer.dockerfile

This file was deleted.

14 changes: 0 additions & 14 deletions dafChat/deploy/dafChat.dockerfile

This file was deleted.

10 changes: 0 additions & 10 deletions dafChat/deploy/dafchat/Chart.yaml

This file was deleted.

65 changes: 0 additions & 65 deletions dafChat/deploy/dafchat/templates/coturn.yaml

This file was deleted.

39 changes: 0 additions & 39 deletions dafChat/deploy/dafchat/templates/ingress.yaml

This file was deleted.

Loading

0 comments on commit 45be78c

Please sign in to comment.