diff --git a/.github/actions/prepare-deploy/action.yml b/.github/actions/prepare-deploy/action.yml index 32c0c1a83e..5c619b5edd 100644 --- a/.github/actions/prepare-deploy/action.yml +++ b/.github/actions/prepare-deploy/action.yml @@ -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 diff --git a/.github/workflows/centrifuge-app.yml b/.github/workflows/centrifuge-app.yml index 4b8510d5e7..cdad9769d6 100644 --- a/.github/workflows/centrifuge-app.yml +++ b/.github/workflows/centrifuge-app.yml @@ -125,7 +125,7 @@ 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 @@ -133,8 +133,8 @@ jobs: 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 }} diff --git a/.github/workflows/deploy_all.yml b/.github/workflows/deploy_all.yml index 54d07b73db..bff2212366 100644 --- a/.github/workflows/deploy_all.yml +++ b/.github/workflows/deploy_all.yml @@ -18,7 +18,6 @@ jobs: pinning: - if: ${{ inputs.environment != 'ff-prod' }} name: pinning uses: ./.github/workflows/pinning-api.yml secrets: inherit @@ -27,7 +26,6 @@ jobs: onboarding: - if: ${{ inputs.environment != 'ff-prod' }} name: onboarding uses: ./.github/workflows/onboarding-api.yml secrets: inherit diff --git a/.github/workflows/dev-n-ffprod-deploys.yml b/.github/workflows/dev-n-ffprod-deploys.yml new file mode 100644 index 0000000000..927fccd13a --- /dev/null +++ b/.github/workflows/dev-n-ffprod-deploys.yml @@ -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' \ No newline at end of file diff --git a/.github/workflows/main-branch-deploys.yml b/.github/workflows/main-branch-deploys.yml deleted file mode 100644 index 077720528c..0000000000 --- a/.github/workflows/main-branch-deploys.yml +++ /dev/null @@ -1,18 +0,0 @@ -name: deploy-main -on: - push: - branches: main - pull_request: - paths: - - '.github/workflows/main-branch-deploys.yml' - -jobs: - trigger: - name: deploy-${{ matrix.env }} - strategy: - matrix: - env: ['ff-prod', 'development'] - uses: ./.github/workflows/deploy_all.yml - secrets: inherit - with: - environment: ${{ matrix.env }} \ No newline at end of file diff --git a/.gitignore b/.gitignore index 58ee203ebb..c7c5d28251 100644 --- a/.gitignore +++ b/.gitignore @@ -31,3 +31,4 @@ yarn-error.log !.env.demo !.env.catalyst !.env.production +!.env.ff-prod diff --git a/centrifuge-app/.env-config/.env.altair b/centrifuge-app/.env-config/.env.altair index f184ae3115..63532398c1 100644 --- a/centrifuge-app/.env-config/.env.altair +++ b/centrifuge-app/.env-config/.env.altair @@ -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 diff --git a/centrifuge-app/.env-config/.env.catalyst b/centrifuge-app/.env-config/.env.catalyst index 148542b118..cd2b0aa898 100644 --- a/centrifuge-app/.env-config/.env.catalyst +++ b/centrifuge-app/.env-config/.env.catalyst @@ -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 \ No newline at end of file diff --git a/centrifuge-app/.env-config/.env.demo b/centrifuge-app/.env-config/.env.demo index ba04f43e0d..c55b9f09a0 100644 --- a/centrifuge-app/.env-config/.env.demo +++ b/centrifuge-app/.env-config/.env.demo @@ -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 diff --git a/centrifuge-app/.env-config/.env.development b/centrifuge-app/.env-config/.env.development index 3015e81fe0..dbe896101a 100644 --- a/centrifuge-app/.env-config/.env.development +++ b/centrifuge-app/.env-config/.env.development @@ -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 \ No newline at end of file diff --git a/centrifuge-app/.env-config/.env.ff-prod b/centrifuge-app/.env-config/.env.ff-prod new file mode 100644 index 0000000000..ad8edfb97a --- /dev/null +++ b/centrifuge-app/.env-config/.env.ff-prod @@ -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 \ No newline at end of file diff --git a/centrifuge-app/.env-config/.env.production b/centrifuge-app/.env-config/.env.production index 3c6cdaafb0..d8ae8c2510 100644 --- a/centrifuge-app/.env-config/.env.production +++ b/centrifuge-app/.env-config/.env.production @@ -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 \ No newline at end of file