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

Ci-ff-prod-pr #2048

Merged
merged 8 commits into from
Mar 26, 2024
Merged
Show file tree
Hide file tree
Changes from all 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
20 changes: 14 additions & 6 deletions .github/actions/prepare-deploy/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,14 +71,22 @@ runs:
echo "front_url=app-demo.k-f.dev" >> $GITHUB_OUTPUT
echo "env_name=demo" >> $GITHUB_OUTPUT
elif ${{ inputs.deploy_to == 'ff-prod' }}; then
# FF-PRODUCTION
# A build from the DEV env that points to prod
echo "function_name=${{ inputs.app_base_name }}-ff-production" >> $GITHUB_OUTPUT
echo "front_url=app-ff-production.k-f.dev" >> $GITHUB_OUTPUT
echo "env_name=production" >> $GITHUB_OUTPUT
if ${{ github.event_name == 'pull_request' }}; then
# FF-PRODUCTION-PR
# A build from the DEV env that points to prod
echo "function_name=NEVER_USED" >> $GITHUB_OUTPUT
echo "front_url=pr${{ github.event.number }}-app-ff-production.k-f.dev" >> $GITHUB_OUTPUT
echo "env_name=ff-prod" >> $GITHUB_OUTPUT
elif ${{ github.ref == 'refs/heads/main' }}; then
# FF-PRODUCTION-MAIN
# A build from the DEV env that points to prod
echo "function_name=NEVER_USED" >> $GITHUB_OUTPUT
echo "front_url=app-ff-production.k-f.dev" >> $GITHUB_OUTPUT
echo "env_name=ff-prod" >> $GITHUB_OUTPUT
fi
elif ${{ github.ref == 'refs/heads/main' }}; then
# DEV
echo "function_name=${{ inputs.app_base_name }}-dev" >> $GITHUB_OUTPUT
echo "function_name=NEVER_USED" >> $GITHUB_OUTPUT
echo "front_url=app-dev.k-f.dev" >> $GITHUB_OUTPUT
echo "env_name=development" >> $GITHUB_OUTPUT
elif ${{ github.event_name == 'pull_request' }}; then
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/centrifuge-app.yml
Original file line number Diff line number Diff line change
Expand Up @@ -125,16 +125,16 @@ jobs:
permissions:
pull-requests: write
runs-on: ubuntu-latest
if: github.event_name == 'pull_request'
if: github.event_name == 'pull_request' || inputs.deploy_env == 'ff-prod'
steps:
- name: PR comment with preview URL
id: prcomment
uses: thollander/actions-comment-pull-request@v2
env:
pull_sha: ${{ github.event.pull_request.head.sha }}
with:
comment_tag: pr_preview_url
mode: recreate
comment_tag: pr_preview_url${{ inputs.deploy_env }}
mode: upsert
message: |
PR deployed in Google Cloud
URL: https://${{ needs.deploy-app.outputs.bucket_url }}
Expand Down
2 changes: 0 additions & 2 deletions .github/workflows/deploy_all.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ jobs:


pinning:
if: ${{ inputs.environment != 'ff-prod' }}
name: pinning
uses: ./.github/workflows/pinning-api.yml
secrets: inherit
Expand All @@ -27,7 +26,6 @@ jobs:


onboarding:
if: ${{ inputs.environment != 'ff-prod' }}
name: onboarding
uses: ./.github/workflows/onboarding-api.yml
secrets: inherit
Expand Down
22 changes: 22 additions & 0 deletions .github/workflows/dev-n-ffprod-deploys.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: dev-n-ffprod-deploys
on:
push:
branches: main
pull_request:
# paths:
# - '.github/workflows/main-branch-deploys.yml'

jobs:
development:
if: github.ref == 'refs/heads/main'
name: deploy-development
uses: ./.github/workflows/deploy_all.yml
secrets: inherit
with:
environment: development
# For FF-PROD deploy only webApp
ff-prod:
uses: ./.github/workflows/centrifuge-app.yml
secrets: inherit
with:
deploy_env: 'ff-prod'
18 changes: 0 additions & 18 deletions .github/workflows/main-branch-deploys.yml

This file was deleted.

1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -31,3 +31,4 @@ yarn-error.log
!.env.demo
!.env.catalyst
!.env.production
!.env.ff-prod
4 changes: 2 additions & 2 deletions centrifuge-app/.env-config/.env.altair
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ REACT_APP_RELAY_WSS_URL=wss://kusama-rpc.polkadot.io
REACT_APP_SUBQUERY_URL=https://api.subquery.network/sq/centrifuge/pools-altair
REACT_APP_SUBSCAN_URL=https://altair.subscan.io
REACT_APP_TINLAKE_NETWORK=goerli
REACT_APP_INFURA_KEY=bf808e7d3d924fbeb74672d9341d0550
REACT_APP_ONFINALITY_KEY=0e1c049f-d876-4e77-a45f-b5afdf5739b2
REACT_APP_INFURA_KEY=8ed99a9a115349bbbc01dcf3a24edc96
REACT_APP_ONFINALITY_KEY=18704429-288d-4f55-bda8-8b60f4c53b96
REACT_APP_WHITELISTED_ACCOUNTS=
REACT_APP_REWARDS_TREE_URL=https://storage.googleapis.com/rad-rewards-trees-kovan-staging/latest.json
REACT_APP_MEMBERLIST_ADMIN_PURE_PROXY=kALJqPUHFzDR2VkoQYWefPQyzjGzKznNny2smXGQpSf3aMw19
Expand Down
6 changes: 3 additions & 3 deletions centrifuge-app/.env-config/.env.catalyst
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@ REACT_APP_RELAY_WSS_URL=wss://rococo-rpc.polkadot.io
REACT_APP_SUBQUERY_URL=https://api.subquery.network/sq/centrifuge/pools-catalyst
REACT_APP_SUBSCAN_URL=
REACT_APP_TINLAKE_NETWORK=goerli
REACT_APP_INFURA_KEY=bf808e7d3d924fbeb74672d9341d0550
REACT_APP_ONFINALITY_KEY=0e1c049f-d876-4e77-a45f-b5afdf5739b2
REACT_APP_INFURA_KEY=8ed99a9a115349bbbc01dcf3a24edc96
REACT_APP_ONFINALITY_KEY=18704429-288d-4f55-bda8-8b60f4c53b96
REACT_APP_WHITELISTED_ACCOUNTS=
REACT_APP_REWARDS_TREE_URL=https://storage.googleapis.com/rad-rewards-trees-kovan-staging/latest.json
REACT_APP_MEMBERLIST_ADMIN_PURE_PROXY=4bo2vNkwZtr2PuqppWwqya6dPC8MzxqZ4kgnAoTZyKo9Kxq8
REACT_APP_WALLETCONNECT_ID=c32fa79350803519804a67fcab0b742a
REACT_APP_TINLAKE_SUBGRAPH_URL=https://api.goldsky.com/api/public/project_clhi43ef5g4rw49zwftsvd2ks/subgraphs/main/prod/gn
REACT_APP_TREASURY=kAJkmGxAd6iqX9JjWTdhXgCf2PL1TAphTRYrmEqzBrYhwbXAn
REACT_APP_TREASURY=kAJkmGxAd6iqX9JjWTdhXgCf2PL1TAphTRYrmEqzBrYhwbXAn
2 changes: 1 addition & 1 deletion centrifuge-app/.env-config/.env.demo
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ REACT_APP_RELAY_WSS_URL=wss://frag-moonbase-relay-rpc-ws.g.moonbase.moonbeam.net
REACT_APP_SUBQUERY_URL=https://api.subquery.network/sq/centrifuge/pools-demo
REACT_APP_SUBSCAN_URL=
REACT_APP_TINLAKE_NETWORK=goerli
REACT_APP_INFURA_KEY=bf808e7d3d924fbeb74672d9341d0550
REACT_APP_INFURA_KEY=8cd8e043ee8d4001b97a1c37e08fd9dd
REACT_APP_ONFINALITY_KEY=0e1c049f-d876-4e77-a45f-b5afdf5739b2
REACT_APP_WHITELISTED_ACCOUNTS=
REACT_APP_NETWORK=centrifuge
Expand Down
4 changes: 2 additions & 2 deletions centrifuge-app/.env-config/.env.development
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@ REACT_APP_RELAY_WSS_URL=wss://fullnode-relay.development.cntrfg.com
REACT_APP_SUBQUERY_URL=https://api.subquery.network/sq/centrifuge/pools-development
REACT_APP_SUBSCAN_URL=https://centrifuge.subscan.io
REACT_APP_TINLAKE_NETWORK=goerli
REACT_APP_INFURA_KEY=bf808e7d3d924fbeb74672d9341d0550
REACT_APP_INFURA_KEY=8cd8e043ee8d4001b97a1c37e08fd9dd
REACT_APP_ONFINALITY_KEY=0e1c049f-d876-4e77-a45f-b5afdf5739b2
REACT_APP_WHITELISTED_ACCOUNTS=
REACT_APP_TINLAKE_SUBGRAPH_URL=https://api.goldsky.com/api/public/project_clhi43ef5g4rw49zwftsvd2ks/subgraphs/main/prod/gn
REACT_APP_REWARDS_TREE_URL=https://storage.googleapis.com/rad-rewards-trees-kovan-staging/latest.json
REACT_APP_WALLETCONNECT_ID=c32fa79350803519804a67fcab0b742a
REACT_APP_MEMBERLIST_ADMIN_PURE_PROXY=kAJ27w29x7gHM75xajP2yXVLjVBaKmmUTxHwgRuCoAcWaoEiz
REACT_APP_TREASURY=kAJkmGxAd6iqX9JjWTdhXgCf2PL1TAphTRYrmEqzBrYhwbXAn
REACT_APP_TREASURY=kAJkmGxAd6iqX9JjWTdhXgCf2PL1TAphTRYrmEqzBrYhwbXAn
22 changes: 22 additions & 0 deletions centrifuge-app/.env-config/.env.ff-prod
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
REACT_APP_COLLATOR_WSS_URL=wss://fullnode.parachain.centrifuge.io
REACT_APP_DEFAULT_NODE_URL=''
REACT_APP_DEFAULT_UNLIST_POOLS=false
REACT_APP_FAUCET_URL=
REACT_APP_IPFS_GATEWAY=https://centrifuge.mypinata.cloud/
REACT_APP_IS_DEMO=
REACT_APP_NETWORK=centrifuge
REACT_APP_ONBOARDING_API_URL=https://europe-central2-centrifuge-production-x.cloudfunctions.net/onboarding-api-production
REACT_APP_PINNING_API_URL=https://europe-central2-centrifuge-production-x.cloudfunctions.net/pinning-api-production
REACT_APP_POOL_CREATION_TYPE=propose
REACT_APP_RELAY_WSS_URL=wss://rpc.polkadot.io
REACT_APP_SUBQUERY_URL=https://api.subquery.network/sq/centrifuge/pools
REACT_APP_SUBSCAN_URL=https://centrifuge.subscan.io
REACT_APP_TINLAKE_NETWORK=mainnet
REACT_APP_INFURA_KEY=8ed99a9a115349bbbc01dcf3a24edc96
REACT_APP_ONFINALITY_KEY=18704429-288d-4f55-bda8-8b60f4c53b96
REACT_APP_WHITELISTED_ACCOUNTS=''
REACT_APP_REWARDS_TREE_URL=https://storage.googleapis.com/rad-rewards-trees-mainnet-production/latest.json
REACT_APP_MEMBERLIST_ADMIN_PURE_PROXY=kALJqPUHFzDR2VkoQYWefPQyzjGzKznNny2smXGQpSf3aMw19
REACT_APP_WALLETCONNECT_ID=c32fa79350803519804a67fcab0b742a
REACT_APP_TINLAKE_SUBGRAPH_URL=https://api.goldsky.com/api/public/project_clhi43ef5g4rw49zwftsvd2ks/subgraphs/main/prod/gn
REACT_APP_TREASURY=4dpEcgqJRyJK3J8Es6v8ZfVntV7c64Ysgcjd4hYwyGoFPWbg
4 changes: 2 additions & 2 deletions centrifuge-app/.env-config/.env.production
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@ REACT_APP_RELAY_WSS_URL=wss://rpc.polkadot.io
REACT_APP_SUBQUERY_URL=https://api.subquery.network/sq/centrifuge/pools
REACT_APP_SUBSCAN_URL=https://centrifuge.subscan.io
REACT_APP_TINLAKE_NETWORK=mainnet
REACT_APP_INFURA_KEY=bf808e7d3d924fbeb74672d9341d0550
REACT_APP_INFURA_KEY=8ed99a9a115349bbbc01dcf3a24edc96
REACT_APP_ONFINALITY_KEY=84bb59f4-05cc-440b-8fd4-7917623a90c6
REACT_APP_WHITELISTED_ACCOUNTS=''
REACT_APP_REWARDS_TREE_URL=https://storage.googleapis.com/rad-rewards-trees-mainnet-production/latest.json
REACT_APP_MEMBERLIST_ADMIN_PURE_PROXY=kALJqPUHFzDR2VkoQYWefPQyzjGzKznNny2smXGQpSf3aMw19
REACT_APP_WALLETCONNECT_ID=c32fa79350803519804a67fcab0b742a
REACT_APP_TINLAKE_SUBGRAPH_URL=https://api.goldsky.com/api/public/project_clhi43ef5g4rw49zwftsvd2ks/subgraphs/main/prod/gn
REACT_APP_TREASURY=4dpEcgqJRyJK3J8Es6v8ZfVntV7c64Ysgcjd4hYwyGoFPWbg
REACT_APP_TREASURY=4dpEcgqJRyJK3J8Es6v8ZfVntV7c64Ysgcjd4hYwyGoFPWbg
Loading