Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add workflow dispatch and improve error logging in AWS Staging workflow #4049

Merged
merged 7 commits into from
Nov 8, 2024
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .env.template
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@ SDK_API_URL=""
AWS_API_GATEWAY_URL=""
AWS_API_GATEWAY_KEY=""

# Subgraph URLs
SUBGRAPH_BASE=

# APIs
ETHERSCAN_API_KEY="34JVYM6RPM3J1SK8QXQFRNSHD9XG4UHXVU"
ONE_INCH_API_URL="https://api-oasis.1inch.io"
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/aws-prod.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ jobs:
--build-arg NEWSLETTER_API_KEY=${{ secrets.NEWSLETTER_API_KEY }} \
--build-arg NEWSLETTER_PUBLICATION_ID=${{ secrets.NEWSLETTER_PUBLICATION_ID }} \
--build-arg NEWSLETTER_ENDPOINT=${{ secrets.NEWSLETTER_ENDPOINT }} \
--build-arg SUBGRAPH_BASE=${{ secrets.SUBGRAPH_BASE }} \
--cache-from=$ECR_REGISTRY/$ECR_REPO_NAME:$ENVIRONMENT_TAG \
-t $ECR_REGISTRY/$ECR_REPO_NAME:$SHA_TAG \
-t $ECR_REGISTRY/$ECR_REPO_NAME:$LATEST_TAG \
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/aws-staging.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ on:
push:
branches:
- dev
workflow_dispatch:

name: Build and deploy to AWS Staging
env:
Expand Down Expand Up @@ -113,6 +114,7 @@ jobs:
NEWSLETTER_API_KEY: ${{ secrets.NEWSLETTER_API_KEY }}
NEWSLETTER_PUBLICATION_ID: ${{ secrets.NEWSLETTER_PUBLICATION_ID }}
NEWSLETTER_ENDPOINT: ${{ secrets.NEWSLETTER_ENDPOINT }}
SUBGRAPH_BASE: ${{ secrets.SUBGRAPH_BASE }}
run: yarn build

- name: Configure AWS credentials
Expand Down
4 changes: 3 additions & 1 deletion Dockerfile.production
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,8 @@ ARG COMMIT_SHA='' \
ONE_INCH_API_KEY='' \
NEXT_PUBLIC_SPINDL_SDK_KEY='' \
ONE_INCH_API_URL='' \
REFERRAL_SUBGRAPH_URL=''
REFERRAL_SUBGRAPH_URL='' \
SUBGRAPH_BASE=''

ENV COMMIT_SHA=$COMMIT_SHA \
AJNA_SUBGRAPH_URL=$AJNA_SUBGRAPH_URL \
Expand All @@ -61,6 +62,7 @@ ENV COMMIT_SHA=$COMMIT_SHA \
NEXT_PUBLIC_SPINDL_SDK_KEY=$NEXT_PUBLIC_SPINDL_SDK_KEY \
ONE_INCH_API_URL=$ONE_INCH_API_URL \
REFERRAL_SUBGRAPH_URL=$REFERRAL_SUBGRAPH_URL \
SUBGRAPH_BASE=$SUBGRAPH_BASE \
NODE_OPTIONS=--max-old-space-size=6144

COPY . .
Expand Down
3 changes: 2 additions & 1 deletion blockchain/prices.ts
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,8 @@ export function createTokenPriceInUSD$(
[token]: new BigNumber(tokenPrice),
})
} catch (err) {
console.error(`could not find price for ${token} - no ticker configured`)
console.error(`could not find price for ${token}`)
console.error(err)

return of({})
}
Expand Down
Loading