From 5f2b655506bb4ad407731986b07be4fc7a51a566 Mon Sep 17 00:00:00 2001 From: Serge Farny Date: Tue, 8 Oct 2024 16:12:37 +0200 Subject: [PATCH] Add CD for router-1, router-2, indexer, comparer --- .github/fly-prod-deploy-router-comparer.yml | 22 +++++++++++++++++++ .github/fly-prod-deploy-router-indexer.yml | 22 +++++++++++++++++++ .github/fly-prod-deploy-router.yml | 22 +++++++++++++++++++ ...oy-fly.yml => fly-stage-deploy-router.yml} | 6 ++--- README.md | 9 ++++++++ 5 files changed, 78 insertions(+), 3 deletions(-) create mode 100644 .github/fly-prod-deploy-router-comparer.yml create mode 100644 .github/fly-prod-deploy-router-indexer.yml create mode 100644 .github/fly-prod-deploy-router.yml rename .github/{deploy-fly.yml => fly-stage-deploy-router.yml} (72%) diff --git a/.github/fly-prod-deploy-router-comparer.yml b/.github/fly-prod-deploy-router-comparer.yml new file mode 100644 index 0000000..c772491 --- /dev/null +++ b/.github/fly-prod-deploy-router-comparer.yml @@ -0,0 +1,22 @@ +name: Deploy Prod Comparer to Fly + +on: + push: + tags: + - 'production/comparer-*' + +env: + FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN }} + +jobs: + deploy: + runs-on: ubuntu-22.04 + steps: + - name: Checkout + uses: actions/checkout@v2 + + - name: Setup Fly + uses: superfly/flyctl-actions/setup-flyctl@master + + - name: Deploy + run: flyctl deploy -c fly-comparer.toml -a router-comparer diff --git a/.github/fly-prod-deploy-router-indexer.yml b/.github/fly-prod-deploy-router-indexer.yml new file mode 100644 index 0000000..8077b6d --- /dev/null +++ b/.github/fly-prod-deploy-router-indexer.yml @@ -0,0 +1,22 @@ +name: Deploy Prod Indexer to Fly + +on: + push: + tags: + - 'production/indexer-*' + +env: + FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN }} + +jobs: + deploy: + runs-on: ubuntu-22.04 + steps: + - name: Checkout + uses: actions/checkout@v2 + + - name: Setup Fly + uses: superfly/flyctl-actions/setup-flyctl@master + + - name: Deploy + run: flyctl deploy -c fly-indexer.toml -a router-indexer diff --git a/.github/fly-prod-deploy-router.yml b/.github/fly-prod-deploy-router.yml new file mode 100644 index 0000000..12fee02 --- /dev/null +++ b/.github/fly-prod-deploy-router.yml @@ -0,0 +1,22 @@ +name: Deploy Prod Router to Fly + +on: + push: + tags: + - 'production/router-*' + +env: + FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN }} + +jobs: + deploy: + runs-on: ubuntu-22.04 + steps: + - name: Checkout + uses: actions/checkout@v2 + + - name: Setup Fly + uses: superfly/flyctl-actions/setup-flyctl@master + + - name: Deploy + run: flyctl deploy -c fly.toml -a router-2 diff --git a/.github/deploy-fly.yml b/.github/fly-stage-deploy-router.yml similarity index 72% rename from .github/deploy-fly.yml rename to .github/fly-stage-deploy-router.yml index 844afcc..7086319 100644 --- a/.github/deploy-fly.yml +++ b/.github/fly-stage-deploy-router.yml @@ -1,4 +1,4 @@ -name: Deploy to Fly +name: Deploy Stage Router to Fly on: push: @@ -9,7 +9,7 @@ env: jobs: deploy: - runs-on: ubuntu-latest + runs-on: ubuntu-22.04 steps: - name: Checkout uses: actions/checkout@v2 @@ -18,4 +18,4 @@ jobs: uses: superfly/flyctl-actions/setup-flyctl@master - name: Deploy - run: flyctl deploy -c fly.toml -a autobahn-router-1 + run: flyctl deploy -c fly.toml -a router-1 diff --git a/README.md b/README.md index c3b1a2a..8ec08c0 100644 --- a/README.md +++ b/README.md @@ -76,6 +76,15 @@ Build router with feature `tokio-console` and `RUSTFLAGS="--cfg tokio_unstable"` And use the `tokio-console` crate to display running tasks +## Trigger automatic build and deployment to fly.io + +```bash +git tag production/router-202409231509 +git tag production/indexer-202409231509 +git tag production/comparer-202409231509 +# push tag(s) +``` + ## License Autobahn is published under GNU Affero General Public License v3.0.