From 806815b74a0b9327fffb546fc9c35e23e94b552c Mon Sep 17 00:00:00 2001 From: Jake Mensch Date: Sat, 27 Jun 2020 09:11:10 -0700 Subject: [PATCH] adjusted workflows for ssh and new dev url --- .../workflows/Continuous_Deployment_Backend_Dev.yml | 4 ++-- .../workflows/Continuous_Deployment_Backend_Prod.yml | 4 ++-- .github/workflows/Daily_Backend_Update.yml | 10 +++++----- server/postman/README.md | 3 ++- .../environments/311-dev.postman_environment.json | 4 ++-- 5 files changed, 13 insertions(+), 12 deletions(-) diff --git a/.github/workflows/Continuous_Deployment_Backend_Dev.yml b/.github/workflows/Continuous_Deployment_Backend_Dev.yml index 9763283c4..978ea1253 100644 --- a/.github/workflows/Continuous_Deployment_Backend_Dev.yml +++ b/.github/workflows/Continuous_Deployment_Backend_Dev.yml @@ -15,8 +15,8 @@ jobs: uses: appleboy/ssh-action@master with: username: ec2-user - host: ${{ secrets.AWS_HOST_DEV }} - key: ${{ secrets.AWS_PEM_KEY }} + host: ${{ secrets.AWS_SSH_HOST_DEV }} + key: ${{ secrets.AWS_SSH_PEM_KEY }} script: | set -e cd 311-data/server diff --git a/.github/workflows/Continuous_Deployment_Backend_Prod.yml b/.github/workflows/Continuous_Deployment_Backend_Prod.yml index a1b990fbe..67e849bad 100644 --- a/.github/workflows/Continuous_Deployment_Backend_Prod.yml +++ b/.github/workflows/Continuous_Deployment_Backend_Prod.yml @@ -15,8 +15,8 @@ jobs: uses: appleboy/ssh-action@master with: username: ec2-user - host: ${{ secrets.AWS_HOST_PROD }} - key: ${{ secrets.AWS_PEM_KEY }} + host: ${{ secrets.AWS_SSH_HOST_PROD }} + key: ${{ secrets.AWS_SSH_PEM_KEY }} script: | set -e cd 311-data/server diff --git a/.github/workflows/Daily_Backend_Update.yml b/.github/workflows/Daily_Backend_Update.yml index 54a047b0c..c3359e4f0 100644 --- a/.github/workflows/Daily_Backend_Update.yml +++ b/.github/workflows/Daily_Backend_Update.yml @@ -2,7 +2,7 @@ name: Daily_Backend_Update on: schedule: - - cron: '0 0 * * *' + - cron: '0 7 * * *' jobs: dev_update: @@ -12,8 +12,8 @@ jobs: uses: appleboy/ssh-action@master with: username: ec2-user - host: ${{ secrets.AWS_HOST_DEV }} - key: ${{ secrets.AWS_PEM_KEY }} + host: ${{ secrets.AWS_SSH_HOST_DEV }} + key: ${{ secrets.AWS_SSH_PEM_KEY }} command_timeout: 60m script: | set -e @@ -27,8 +27,8 @@ jobs: uses: appleboy/ssh-action@master with: username: ec2-user - host: ${{ secrets.AWS_HOST_PROD }} - key: ${{ secrets.AWS_PEM_KEY }} + host: ${{ secrets.AWS_SSH_HOST_PROD }} + key: ${{ secrets.AWS_SSH_PEM_KEY }} command_timeout: 60m script: | set -e diff --git a/server/postman/README.md b/server/postman/README.md index 4d4f6e051..d98761856 100644 --- a/server/postman/README.md +++ b/server/postman/README.md @@ -16,8 +16,9 @@ Click the Import button at the top left, select "Folder" from the tabs, and then - **311-all**: a collection containing all of the endpoints that the api currently supports, with prepopulated params for each api call. - **311-CI**: a collection containing all of the tests we run during continuous integration. These include tests for bad input -- e.g., a missing required param should return 400, an unsupported endpoint should return a 404. -The import will also add two environments: +The import will also add three environments: - **311-local**: all api calls go to your local server (which should be running) + - **311-dev**: api calls go to the dev server - **311-prod**: api calls go to the production server ### 4. Activate the `311-local` environment. diff --git a/server/postman/environments/311-dev.postman_environment.json b/server/postman/environments/311-dev.postman_environment.json index 82a6ff1f1..8186719ff 100644 --- a/server/postman/environments/311-dev.postman_environment.json +++ b/server/postman/environments/311-dev.postman_environment.json @@ -4,11 +4,11 @@ "values": [ { "key": "base_url", - "value": "https://dev-api.311-data.org", + "value": "http://dev-api.311-data.org", "enabled": true } ], "_postman_variable_scope": "environment", - "_postman_exported_at": "2020-06-26T21:24:24.657Z", + "_postman_exported_at": "2020-06-27T14:04:02.720Z", "_postman_exported_using": "Postman/7.26.1" } \ No newline at end of file