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

[WEB-1280-464] WIP: yearn.finance IPFS deployment #464

Closed
wants to merge 2 commits into from
Closed

[WEB-1280-464] WIP: yearn.finance IPFS deployment #464

wants to merge 2 commits into from

Conversation

ghost
Copy link

@ghost ghost commented Jan 28, 2022

Switches deployment to Github Actions, which includes IPFS build and publish, as well as DNS changes. Fixes #446.

By design, will be deployable from PRs, as well as develop+master branches:
PR builds -> pr-{number}.yearn.dev.
Develop push -> yearn.dev.
Master push -> yearn.finance.

Sample PR available here, which highlights deployment steps and output: https://github.com/B3RX8OIPDHDT3/yearn-finance-v3/pull/2
Sample build available from here: https://pr-2.b3tools.xyz

Issues/considerations:

  1. Currently IPFS build is being pushed to Pinata Cloud, is that the preferred platform for IPFS builds?
  2. This workflow requires DNS updates to point to the latest IPFS cid hash. I've used Route 53 to test out DNS changes(which yearn uses I believe), and it requires two records - CNAME pointing to a gateway, as well as TXT record for DNSlink. Route 53 can set CNAME for subdomains, but it does not allow setting CNAME for a domain as per DNS spec, which means it wouldn't be able to deploy deploy(yearn.dev) and master(yearn.finance).

There are several workarounds for this, probs missing some obvious ones as well:

  • Using Cloudflare for DNS since it allows setting CNAME at the apex domain level, and would work well with IPFS?
  • Possibly pointing record to Cloudfront, but need to investigate how exactly it would work.
  1. Should API keys be in secrets when in production, would assume yes? Current values for REACT_APP_* are taken from .env.example, which will need changing then.
  2. Cleanup job will need to be created, which would remove DNS records + IPFS pin when PR is closed and branch is removed.

@aws-amplify-us-east-1
Copy link

This pull request is automatically being deployed by Amplify Hosting (learn more).

Access this pull request here: https://pr-464.d27dgpz01hmbvx.amplifyapp.com

@yearn-linear-gh-sync yearn-linear-gh-sync bot changed the title feat: yearn.finance IPFS deployment [WEB-1280-464] feat: yearn.finance IPFS deployment Jan 28, 2022
@ghost ghost changed the title [WEB-1280-464] feat: yearn.finance IPFS deployment [WEB-1280-464] WIP: yearn.finance IPFS deployment Jan 28, 2022
@aws-amplify-us-east-1
Copy link

This pull request is automatically being deployed by Amplify Hosting (learn more).

Access this pull request here: https://pr-464.d27dgpz01hmbvx.amplifyapp.com

AWS_DEFAULT_REGION: 'us-east-1'
DOMAIN_NAME: "${{ endsWith(github.ref, '/master') && 'yearn.finance' || 'b3tools.xyz' }}"
REACT_APP_ETHERSCAN_API_KEY: 'GEQXZDY67RZ4QHNU1A57QVPNDV3RP1RYH4'
REACT_APP_ALCHEMY_API_KEY: 'euSwyu6Yf-VQ3NJ32KHxDhHmTta7OvIe'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

keys being public?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These were taken from .env.example, so pretty much public already. Just have to integrate environments into the pipeline as well, and then could have different secrets for each env.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Couldnt we use the variables from .env file directly? Do we need to have this here on public file duplicated?

@yearn-linear-gh-sync
Copy link

Linear reply from Fox Crypto:
Checks have passed, merging blocked.

@yearn-linear-gh-sync
Copy link

Linear reply from xgambitox:
@X48 can you review this one?

@FoxTheSin FoxTheSin added help wanted Extra attention is needed hold Hold pull request labels Apr 11, 2022
@turtlemoji
Copy link
Contributor

@FoxTheSin can we get the infra team to review this?

@ghost ghost closed this by deleting the head repository Jan 3, 2023
@willianpaixao
Copy link

Hi @gotzenx, the author of this PR has deleted their account. Can I pick up the task?

This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed hold Hold pull request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[WEB-1214-446] Move Yearn.finance CI/CD from aplify to IPFS
4 participants