Skip to content

Commit

Permalink
add manual sync
Browse files Browse the repository at this point in the history
  • Loading branch information
yuenmichelle1 committed Apr 15, 2024
1 parent bf12607 commit f06f187
Show file tree
Hide file tree
Showing 3 changed files with 57 additions and 1 deletion.
31 changes: 31 additions & 0 deletions .github/workflows/manual_corp_user_group_sync.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Manually Sync Eras Corporate User Group Sync

on:
workflow_dispatch:

jobs:
manual_sync:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/[email protected]

- name: Login to GitHub Container Registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- uses: azure/login@v1
with:
creds: ${{ secrets.AZURE_AKS }}

- name: Set the target AKS cluster
uses: Azure/aks-set-context@v3
with:
cluster-name: microservices
resource-group: kubernetes

- name: Modify & apply template
run: kubectl create -f kubernetes/manual_corp_user_group_sync.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,4 @@ spec:
key: rails-master-key
command: ['ruby', './scripts/user_group_membership_classification_backfill.rb']
restartPolicy: Never
backoffLimit: 2
backoffLimit: 2
25 changes: 25 additions & 0 deletions kubernetes/manual_corp_user_group_sync.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
apiVersion: batch/v1
kind: Job
metadata:
generateName: eras-corp-partners-sync-
spec:
template:
metadata:
name: eras-corp-partners-sync
spec:
containers:
- name: eras-corp-partners-sync
image: ghcr.io/zooniverse/eras
env:
- name: RAILS_LOG_TO_STDOUT
value: "true"
- name: RAILS_ENV
value: production
- name: RAILS_MASTER_KEY
valueFrom:
secretKeyRef:
name: eras-production
key: rails-master-key
command: ['ruby', './scripts/user_group_membership_classification_backfill.rb']
restartPolicy: Never
backoffLimit: 2

0 comments on commit f06f187

Please sign in to comment.