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

feat(ci): build car, pin to cluster, update dnslink #69

Merged
merged 3 commits into from
Mar 1, 2024

Conversation

lidel
Copy link
Member

@lidel lidel commented Feb 29, 2024

Description

This PR is wip, part of #20.

The goal is to:

  • remove dependency on Fleek for inbrowser.link and .dev
  • build CAR in CI and attach it to build so it can be downloaded and imported manually
  • pin the CID to cluster to ensure multiple providers
  • update DNSLinkat inbrowser.link and .dev ourselves

Notes & open questions

  • Initial design confirmed to work as expected in job/22106307031: pinned, dnslink updated on test domain.
    • took < 30s
    • note: ttl "1" in Cloudflare DNS API output means "Auto", which is ~300
  • Secrets are added to "Deploy" environment, which will be locked down after we are happy with the setup. Right now limited to main and ci-publish-to-ipfs branches.
  • Detach .dev from .link and add separate secrets for both to "Deploy" env
  • Make both update to the same CID for now (deploy main HEAD)
  • Limit publish-to-ipfs stage and "Deploy" env to be run and exposed only on main and release builds

In the future we can change the behavior and:

  • .link for stable production (updated only by release event)
  • .dev with latest changes from main branch

Change checklist

  • I have performed a self-review of my own code
  • I have made corresponding changes to the documentation if necessary (this includes comments as well)
  • I have added tests that prove my fix is effective or that my feature works

and test dnslink update
@lidel
Copy link
Member Author

lidel commented Feb 29, 2024

Pausing work for today, will resume tomorrow.

Confirmed initial design works, ./dist output got published to cluster+test-dnslink under 30 seconds:

And a CAR with the same CID as in DNSLink can be downloaded from build summary page:

This gets us close to final setup:
- Deploy environment will be only enabled on main and release builds
- .link and .dev have separate DNSLinks
- Deploy environment will have secrets allowing for DNSLink update
- concurrency setting ensures DNSLinks are updated in-order and we have
  no race conditions like we had at dist.ipfs.tech
@lidel lidel marked this pull request as ready for review March 1, 2024 17:20
@lidel
Copy link
Member Author

lidel commented Mar 1, 2024

Record IDs and secrets for both .link and .dev are in place, merging.

@lidel lidel merged commit 1bc8d1b into main Mar 1, 2024
15 checks passed
@lidel lidel deleted the ci-publish-to-ipfs branch March 1, 2024 17:24
@lidel
Copy link
Member Author

lidel commented Mar 1, 2024

main branch build worked as expected:

2024-03-01_18-19

DNSLinks got updated: https://github.com/ipfs-shipyard/helia-service-worker-gateway/actions/runs/8114883875/job/22181632552#step:14:21

CAR with the same CID can be fetched from the build Summary page at https://github.com/ipfs-shipyard/helia-service-worker-gateway/actions/runs/8114883875:

2024-03-01_18-32

@lidel lidel mentioned this pull request Mar 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant