Skip to content

Commit

Permalink
Adding a POST request to run analytics daily (#267)
Browse files Browse the repository at this point in the history
* Adding a POST request to run analytics every day at 7am

* Adding GDRIVE enviornment variables

* Removing supercronic bin

* Needs to be HOST

* Adding Gdrive network policy

* Gdrive isnt in the public space

* Dont need the space parameter
  • Loading branch information
nathan-moore-97 authored Nov 16, 2023
1 parent 351a62f commit 065bc3e
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 0 deletions.
1 change: 1 addition & 0 deletions .github/workflows/deploy-cron.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,3 +39,4 @@ jobs:
- name: Add network policies
run: |
cf add-network-policy cron outbound-proxy -s ${{ steps.cf-setup.outputs.target-environment }}-public --protocol tcp --port 8080
cf add-network-policy cron gdrive --protocol tcp --port 8080
2 changes: 2 additions & 0 deletions cron/crontab
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
@hourly echo "Testing cron runner"

@hourly cf run-task cron --command 'echo "Test CF Task"' --name "test-cron-task"

@daily curl -XPOST "http://$GDRIVE_APP_HOST:$GDRIVE_APP_PORT/analytics"
3 changes: 3 additions & 0 deletions cron/manifest.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,6 @@ applications:
services:
- cron-service-account
- outbound-proxy
env:
GDRIVE_APP_HOST: "idva-gdrive-((ENVIRONMENT_NAME)).apps.internal"
GDRIVE_APP_PORT: 8080

0 comments on commit 065bc3e

Please sign in to comment.