Skip to content

Commit

Permalink
feat(RL-72): media fix
Browse files Browse the repository at this point in the history
  • Loading branch information
NoodleOfDeath committed Oct 15, 2023
1 parent 3d7ec3b commit 421fe74
Showing 1 changed file with 64 additions and 0 deletions.
64 changes: 64 additions & 0 deletions .github/workflows/worker-ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -229,6 +229,70 @@ jobs:
run: kubectl rollout restart deployment/$CONTAINER_NAME --namespace $K8S_NAMESPACE
- name: Verify deployment
run: kubectl rollout status deployment/$CONTAINER_NAME --namespace $K8S_NAMESPACE

deploy-worker-media:
needs: build-worker
runs-on: ubuntu-latest
if: ${{ contains(github.event.head_commit.message, '~worker') || contains(github.event.head_commit.message, '~media') }}
environment: ${{ fromJSON('{"main":"prod"}')[github.ref_name] || github.ref_name }}
env:
BACKOFF_INTERVAL: ${{ vars.BACKOFF_INTERVAL }}
BASE_DOMAIN: ${{ vars.BASE_DOMAIN }}
CHROMIUM_EXECUTABLE_PATH: ${{ vars.CHROMIUM_EXECUTABLE_PATH }}
CONTAINER_NAME: ${{ github.event.repository.name }}-worker-${{ fromJSON('{"main":"prod"}')[github.ref_name] || github.ref_name }}-media
DEEPAI_API_KEY: ${{ secrets.DEEPAI_API_KEY }}
DUPLICATE_LOOKBACK_INTERVAL: ${{ vars.DUPLICATE_LOOKBACK_INTERVAL }}
ENABLED_FEATURES: ${{ vars.ENABLED_FEATURES }}
ERROR_REPORTING: $${{ vars.ERROR_REPORTING }}
K8S_NAMESPACE: ${{ secrets.K8S_NAMESPACE }}
K8S_MEMORY_REQUESTS: ${{ vars.K8S_MEMORY_REQUESTS }}
K8S_CPU_REQUESTS: ${{ vars.K8S_CPU_REQUESTS }}
K8S_MEMORY_LIMITS: ${{ vars.K8S_MEMORY_LIMITS }}
K8S_CPU_LIMITS: ${{ vars.K8S_CPU_LIMITS }}
K8S_REPLICA_COUNT_WORKER: ${{ vars.K8S_REPLICA_COUNT_WORKER_TOPICS || 1 }}
MAIL_HOST: ${{ vars.MAIL_HOST }}
MAIL_PASS: ${{ secrets.MAIL_PASS }}
MAIL_PORT: ${{ vars.MAIL_PORT }}
MAIL_REPLY_TO: ${{ vars.MAIL_REPLY_TO }}
MAIL_USER: ${{ secrets.MAIL_USER }}
MAX_OPENAI_TOKEN_COUNT: ${{ vars.MAX_OPENAI_TOKEN_COUNT }}
OLD_NEWS_THRESHOLD: ${{ vars.OLD_NEWS_THRESHOLD }}
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
PUBLISHER_FETCH_INTERVAL: ${{ vars.PUBLISHER_FETCH_INTERVAL }}
PUBLISHER_FETCH_LIMIT: ${{ vars.PUBLISHER_FETCH_LIMIT }}
PUBLISHER_MAX_ATTEMPT_LIMIT: ${{ vars.PUBLISHER_MAX_ATTEMPT_LIMIT }}
PG_CONNECTION_STRING: ${{ secrets.PG_CONNECTION_STRING }}
PLAY_HT_SECRET_KEY: ${{ secrets.PLAY_HT_SECRET_KEY }}
PLAY_HT_USER_ID: ${{ secrets.PLAY_HT_USER_ID }}
PORT: ${{ vars.PORT }}
RELATIONSHIP_THRESHOLD: ${{ vars.RELATIONSHIP_THRESHOLD }}
S3_BUCKET: ${{ vars.S3_BUCKET }}
S3_KEY: ${{ secrets.S3_KEY }}
S3_SECRET: ${{ secrets.S3_SECRET }}
WORKER_RETRY_EXPRS: ${{ vars.WORKER_RETRY_EXPRS }}
WORKER_QUEUE: media
steps:
- name: Print Job Description
run: |
echo deploying \"$IMAGE\" from branch \"${{ github.ref_name }}\"
- name: Git Checkout
uses: actions/checkout@v3
with:
ssh-key: ${{ secrets.GIT_SSH_KEY }}
submodules: recursive
- name: Install doctl
uses: digitalocean/action-doctl@v2
with:
token: ${{ secrets.DIGITALOCEAN_ACCESS_TOKEN }}
- name: Add kubectl cert
run: doctl kubernetes cluster kubeconfig save --expiry-seconds 600 ${{ secrets.K8S_CLUSTER_ID }}
- name: Apply deployment changes
run: |
envsubst < $GITHUB_WORKSPACE/k8s/worker-deploy.yaml | kubectl apply -f -
- name: Deploy Rollout
run: kubectl rollout restart deployment/$CONTAINER_NAME --namespace $K8S_NAMESPACE
- name: Verify deployment
run: kubectl rollout status deployment/$CONTAINER_NAME --namespace $K8S_NAMESPACE

deploy-worker-notifs:
needs: build-worker
Expand Down

0 comments on commit 421fe74

Please sign in to comment.