From 54adea1dbee9be81b7515930fcf53a957d90fe96 Mon Sep 17 00:00:00 2001 From: Daniel Sanchez Date: Fri, 9 Oct 2020 17:34:02 +0200 Subject: [PATCH 01/15] Add staging xDai deployment to travis --- .travis.yml | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index 0804243db5..55608d27e8 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,4 +1,4 @@ -if: (branch = development) OR (branch = master) OR (type = pull_request) OR (tag IS present) +if: (branch = development) OR (branch = master) OR (branch = feature/#1421-setup-deployment-and-ci) OR (type = pull_request) OR (tag IS present) sudo: required dist: bionic language: node_js @@ -16,6 +16,10 @@ matrix: - env: - REACT_APP_NETWORK='rinkeby' - REACT_APP_GNOSIS_APPS_URL=${REACT_APP_GNOSIS_APPS_URL_STAGING} + - env: + - REACT_APP_NETWORK='xdai' + - STAGING_BUCKET_NAME=${STAGING_XDAI_BUCKET_NAME} + if: branch = feature/#1421-setup-deployment-and-ci cache: yarn: true before_script: @@ -61,8 +65,10 @@ deploy: local_dir: build upload-dir: current/app region: $AWS_DEFAULT_REGION - on: - branch: master + on: + # branch: master + all_branches: true + condition: $TRAVIS_BRANCH =~ ^(master|feature/#1421-setup-deployment-and-ci)$ # Prepare production deployment - provider: s3 From 29fc2f62dd5bb753b29dd52e2596a53ca44fcf76 Mon Sep 17 00:00:00 2001 From: Daniel Sanchez Date: Fri, 9 Oct 2020 17:46:24 +0200 Subject: [PATCH 02/15] Change travis branch naming match --- .travis.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index 55608d27e8..e81e8f740e 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,4 +1,4 @@ -if: (branch = development) OR (branch = master) OR (branch = feature/#1421-setup-deployment-and-ci) OR (type = pull_request) OR (tag IS present) +if: (branch = development) OR (branch = master) OR (branch =~ ^(setup-deployment-and-ci)$) OR (type = pull_request) OR (tag IS present) sudo: required dist: bionic language: node_js @@ -19,7 +19,7 @@ matrix: - env: - REACT_APP_NETWORK='xdai' - STAGING_BUCKET_NAME=${STAGING_XDAI_BUCKET_NAME} - if: branch = feature/#1421-setup-deployment-and-ci + if: branch =~ ^(setup-deployment-and-ci)$ cache: yarn: true before_script: @@ -68,7 +68,7 @@ deploy: on: # branch: master all_branches: true - condition: $TRAVIS_BRANCH =~ ^(master|feature/#1421-setup-deployment-and-ci)$ + condition: $TRAVIS_BRANCH =~ ^(master|setup-deployment-and-ci)$ # Prepare production deployment - provider: s3 From c532ca4bd7dcb82f5e22e997b16713911fa96f64 Mon Sep 17 00:00:00 2001 From: Daniel Sanchez Date: Fri, 9 Oct 2020 17:51:14 +0200 Subject: [PATCH 03/15] Update test branch name --- .travis.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index e81e8f740e..44cb8e5b19 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,4 +1,4 @@ -if: (branch = development) OR (branch = master) OR (branch =~ ^(setup-deployment-and-ci)$) OR (type = pull_request) OR (tag IS present) +if: (branch = development) OR (branch = master) OR (branch = xdai-deploy-test) OR (type = pull_request) OR (tag IS present) sudo: required dist: bionic language: node_js @@ -19,7 +19,7 @@ matrix: - env: - REACT_APP_NETWORK='xdai' - STAGING_BUCKET_NAME=${STAGING_XDAI_BUCKET_NAME} - if: branch =~ ^(setup-deployment-and-ci)$ + if: branch = xdai-deploy-test cache: yarn: true before_script: @@ -68,7 +68,7 @@ deploy: on: # branch: master all_branches: true - condition: $TRAVIS_BRANCH =~ ^(master|setup-deployment-and-ci)$ + condition: $TRAVIS_BRANCH =~ ^(master|xdai-deploy-test)$ # Prepare production deployment - provider: s3 From 6768c2d62d7c55c5c8392b5a32ba68b67d5a5186 Mon Sep 17 00:00:00 2001 From: Daniel Sanchez Date: Fri, 9 Oct 2020 18:05:42 +0200 Subject: [PATCH 04/15] Add brackets to travis branch name --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 44cb8e5b19..9f050318a1 100644 --- a/.travis.yml +++ b/.travis.yml @@ -19,7 +19,7 @@ matrix: - env: - REACT_APP_NETWORK='xdai' - STAGING_BUCKET_NAME=${STAGING_XDAI_BUCKET_NAME} - if: branch = xdai-deploy-test + if: (branch = xdai-deploy-test) cache: yarn: true before_script: From 71a1162e187917bd72a40749c6566325b465f843 Mon Sep 17 00:00:00 2001 From: Daniel Sanchez Date: Fri, 9 Oct 2020 18:10:31 +0200 Subject: [PATCH 05/15] Remove if branch conditions --- .travis.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 9f050318a1..59f907d7ad 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,4 +1,4 @@ -if: (branch = development) OR (branch = master) OR (branch = xdai-deploy-test) OR (type = pull_request) OR (tag IS present) +if: (branch = development) OR (branch = master) OR (type = pull_request) OR (tag IS present) sudo: required dist: bionic language: node_js @@ -19,7 +19,6 @@ matrix: - env: - REACT_APP_NETWORK='xdai' - STAGING_BUCKET_NAME=${STAGING_XDAI_BUCKET_NAME} - if: (branch = xdai-deploy-test) cache: yarn: true before_script: From cfb91ebe9889dbbba045c14e247d5d2e5d7fc474 Mon Sep 17 00:00:00 2001 From: Daniel Sanchez Date: Fri, 9 Oct 2020 18:30:47 +0200 Subject: [PATCH 06/15] Restore travis file --- .travis.yml | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/.travis.yml b/.travis.yml index 59f907d7ad..fddd973c09 100644 --- a/.travis.yml +++ b/.travis.yml @@ -16,9 +16,6 @@ matrix: - env: - REACT_APP_NETWORK='rinkeby' - REACT_APP_GNOSIS_APPS_URL=${REACT_APP_GNOSIS_APPS_URL_STAGING} - - env: - - REACT_APP_NETWORK='xdai' - - STAGING_BUCKET_NAME=${STAGING_XDAI_BUCKET_NAME} cache: yarn: true before_script: @@ -65,9 +62,7 @@ deploy: upload-dir: current/app region: $AWS_DEFAULT_REGION on: - # branch: master - all_branches: true - condition: $TRAVIS_BRANCH =~ ^(master|xdai-deploy-test)$ + branch: master # Prepare production deployment - provider: s3 From d8e4a1ecc5d76e957be768d2e520b4ce8ae72936 Mon Sep 17 00:00:00 2001 From: Daniel Sanchez Date: Fri, 9 Oct 2020 18:33:48 +0200 Subject: [PATCH 07/15] Restore travis file --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index fddd973c09..0804243db5 100644 --- a/.travis.yml +++ b/.travis.yml @@ -61,7 +61,7 @@ deploy: local_dir: build upload-dir: current/app region: $AWS_DEFAULT_REGION - on: + on: branch: master # Prepare production deployment From e531f566f4aef8a6c18b8d4bafda38a5849321d3 Mon Sep 17 00:00:00 2001 From: Daniel Sanchez Date: Fri, 9 Oct 2020 18:36:02 +0200 Subject: [PATCH 08/15] Add staging deployment for xdai --- .travis.yml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 0804243db5..cca57b683d 100644 --- a/.travis.yml +++ b/.travis.yml @@ -16,6 +16,10 @@ matrix: - env: - REACT_APP_NETWORK='rinkeby' - REACT_APP_GNOSIS_APPS_URL=${REACT_APP_GNOSIS_APPS_URL_STAGING} + - env: + - REACT_APP_NETWORK='xdai' + - STAGING_BUCKET_NAME=${STAGING_XDAI_BUCKET_NAME} + if: (branch = xdai-deploy-test) cache: yarn: true before_script: @@ -62,7 +66,9 @@ deploy: upload-dir: current/app region: $AWS_DEFAULT_REGION on: - branch: master + # branch: master + all_branches: true + condition: $TRAVIS_BRANCH =~ ^(master|xdai-deploy-test)$ # Prepare production deployment - provider: s3 From f49147e7a2606324137d8be72dc2bd4d9f10c279 Mon Sep 17 00:00:00 2001 From: Daniel Sanchez Date: Fri, 9 Oct 2020 18:58:40 +0200 Subject: [PATCH 09/15] Add branch to travis build --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index cca57b683d..d758a61f56 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,4 +1,4 @@ -if: (branch = development) OR (branch = master) OR (type = pull_request) OR (tag IS present) +if: (branch = development) OR (branch = master) OR (branch = xdai-deploy-test) OR (type = pull_request) OR (tag IS present) sudo: required dist: bionic language: node_js From 3b43d6569420f413220e78757746c62eff49f469 Mon Sep 17 00:00:00 2001 From: Daniel Sanchez Date: Fri, 9 Oct 2020 19:33:05 +0200 Subject: [PATCH 10/15] Add xdai safe apps --- .travis.yml | 6 +++--- src/config/networks/xdai.ts | 23 +++++++++++++++-------- 2 files changed, 18 insertions(+), 11 deletions(-) diff --git a/.travis.yml b/.travis.yml index d758a61f56..beb71a8f7f 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,4 +1,4 @@ -if: (branch = development) OR (branch = master) OR (branch = xdai-deploy-test) OR (type = pull_request) OR (tag IS present) +if: (branch = development) OR (branch = master) OR OR (type = pull_request) OR (tag IS present) sudo: required dist: bionic language: node_js @@ -19,7 +19,7 @@ matrix: - env: - REACT_APP_NETWORK='xdai' - STAGING_BUCKET_NAME=${STAGING_XDAI_BUCKET_NAME} - if: (branch = xdai-deploy-test) + if: (branch = feature/#1421-setup-deployment-and-ci AND type = pull_request) cache: yarn: true before_script: @@ -68,7 +68,7 @@ deploy: on: # branch: master all_branches: true - condition: $TRAVIS_BRANCH =~ ^(master|xdai-deploy-test)$ + condition: $TRAVIS_BRANCH =~ ^(master|feature/#1421-setup-deployment-and-ci)$ # Prepare production deployment - provider: s3 diff --git a/src/config/networks/xdai.ts b/src/config/networks/xdai.ts index 86dd160429..45bb58a1e1 100644 --- a/src/config/networks/xdai.ts +++ b/src/config/networks/xdai.ts @@ -1,15 +1,22 @@ -import { ETHEREUM_NETWORK, NetworkConfig } from 'src/config/networks/network.d' +import { EnvironmentSettings, ETHEREUM_NETWORK, NetworkConfig } from 'src/config/networks/network.d' + +const baseConfig: EnvironmentSettings = { + txServiceUrl: 'https://safe-transaction.xdai.gnosis.io/api/v1', + safeAppsUrl: 'http://safe-apps-xdai.staging.gnosisdev.com/', + gasPrice: 1e9, + rpcServiceUrl: 'https://rpc.xdaichain.com', + networkExplorerName: 'Blockscout', + networkExplorerUrl: 'https://blockscout.com/poa/xdai', + networkExplorerApiUrl: 'https://blockscout.com/poa/xdai/api', +} const xDai: NetworkConfig = { environment: { + staging: { + ...baseConfig + }, production: { - txServiceUrl: 'https://safe-transaction.xdai.gnosis.io/api/v1', - safeAppsUrl: 'https://apps.gnosis-safe.io', - gasPrice: 1e9, - rpcServiceUrl: 'https://rpc.xdaichain.com', - networkExplorerName: 'Blockscout', - networkExplorerUrl: 'https://blockscout.com/poa/xdai', - networkExplorerApiUrl: 'https://blockscout.com/poa/xdai/api', + ...baseConfig }, }, network: { From 9a777f220fc06b4b26f4961f44f349f7b0366f75 Mon Sep 17 00:00:00 2001 From: Daniel Sanchez Date: Fri, 9 Oct 2020 19:36:18 +0200 Subject: [PATCH 11/15] Fix typo in travis file --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index beb71a8f7f..9d8ef12773 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,4 +1,4 @@ -if: (branch = development) OR (branch = master) OR OR (type = pull_request) OR (tag IS present) +if: (branch = development) OR (branch = master) OR (type = pull_request) OR (tag IS present) sudo: required dist: bionic language: node_js From 69ccc9616d078e7beaa2e14c4be512a37b660f7d Mon Sep 17 00:00:00 2001 From: Daniel Sanchez Date: Fri, 9 Oct 2020 19:38:24 +0200 Subject: [PATCH 12/15] Add safe apps production url for xdai --- src/config/networks/xdai.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/config/networks/xdai.ts b/src/config/networks/xdai.ts index 45bb58a1e1..f881636c57 100644 --- a/src/config/networks/xdai.ts +++ b/src/config/networks/xdai.ts @@ -2,7 +2,7 @@ import { EnvironmentSettings, ETHEREUM_NETWORK, NetworkConfig } from 'src/config const baseConfig: EnvironmentSettings = { txServiceUrl: 'https://safe-transaction.xdai.gnosis.io/api/v1', - safeAppsUrl: 'http://safe-apps-xdai.staging.gnosisdev.com/', + safeAppsUrl: 'http://safe-apps-xdai.staging.gnosisdev.com', gasPrice: 1e9, rpcServiceUrl: 'https://rpc.xdaichain.com', networkExplorerName: 'Blockscout', @@ -16,7 +16,9 @@ const xDai: NetworkConfig = { ...baseConfig }, production: { - ...baseConfig + ...baseConfig, + safeAppsUrl: 'http://apps-xdai.gnosis-safe.io', + }, }, network: { From 7c40bbc9b1dff811d7fb457714cac35667addbd0 Mon Sep 17 00:00:00 2001 From: Daniel Sanchez Date: Fri, 9 Oct 2020 19:50:21 +0200 Subject: [PATCH 13/15] Set correct branch for xDai deploy on staging --- .travis.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 9d8ef12773..d9b73318cc 100644 --- a/.travis.yml +++ b/.travis.yml @@ -19,7 +19,7 @@ matrix: - env: - REACT_APP_NETWORK='xdai' - STAGING_BUCKET_NAME=${STAGING_XDAI_BUCKET_NAME} - if: (branch = feature/#1421-setup-deployment-and-ci AND type = pull_request) + if: (branch = feature/#1353-xDai-compatibility AND type = pull_request) cache: yarn: true before_script: @@ -68,7 +68,7 @@ deploy: on: # branch: master all_branches: true - condition: $TRAVIS_BRANCH =~ ^(master|feature/#1421-setup-deployment-and-ci)$ + condition: $TRAVIS_BRANCH =~ ^(master|feature/#1353-xDai-compatibility)$ # Prepare production deployment - provider: s3 From c00bdc081a85e3b5fb9c4bfa9e12b35a54f0fbf5 Mon Sep 17 00:00:00 2001 From: Daniel Sanchez Date: Fri, 9 Oct 2020 20:27:20 +0200 Subject: [PATCH 14/15] Deploy on test and integration travis branch --- .travis.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index d9b73318cc..c79ce4a163 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,4 +1,4 @@ -if: (branch = development) OR (branch = master) OR (type = pull_request) OR (tag IS present) +if: (branch = development) OR (branch = master) OR (feature/#1353-xDai-compatibility) OR (feature/#1421-setup-deployment-and-ci) OR (type = pull_request) OR (tag IS present) sudo: required dist: bionic language: node_js @@ -19,7 +19,7 @@ matrix: - env: - REACT_APP_NETWORK='xdai' - STAGING_BUCKET_NAME=${STAGING_XDAI_BUCKET_NAME} - if: (branch = feature/#1353-xDai-compatibility AND type = pull_request) + if: (branch = feature/#1353-xDai-compatibility OR branch = feature/#1421-setup-deployment-and-ci) cache: yarn: true before_script: @@ -68,7 +68,7 @@ deploy: on: # branch: master all_branches: true - condition: $TRAVIS_BRANCH =~ ^(master|feature/#1353-xDai-compatibility)$ + condition: $TRAVIS_BRANCH =~ ^(master|feature/#1353-xDai-compatibility|feature/#1421-setup-deployment-and-ci)$ # Prepare production deployment - provider: s3 From 79724a08ea9dd89ab6f6a07f00c3ed8da47bd6e4 Mon Sep 17 00:00:00 2001 From: Daniel Sanchez Date: Fri, 9 Oct 2020 20:50:52 +0200 Subject: [PATCH 15/15] Add travis rule to build xDai on master or integration branch --- .travis.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index c79ce4a163..f374e0adf6 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,4 +1,4 @@ -if: (branch = development) OR (branch = master) OR (feature/#1353-xDai-compatibility) OR (feature/#1421-setup-deployment-and-ci) OR (type = pull_request) OR (tag IS present) +if: (branch = development) OR (branch = master) OR (feature/#1353-xDai-compatibility) OR (type = pull_request) OR (tag IS present) sudo: required dist: bionic language: node_js @@ -19,7 +19,7 @@ matrix: - env: - REACT_APP_NETWORK='xdai' - STAGING_BUCKET_NAME=${STAGING_XDAI_BUCKET_NAME} - if: (branch = feature/#1353-xDai-compatibility OR branch = feature/#1421-setup-deployment-and-ci) + if: ((branch = master OR branch = feature/#1353-xDai-compatibility) AND NOT type = pull_request) OR tag IS present cache: yarn: true before_script: @@ -68,7 +68,7 @@ deploy: on: # branch: master all_branches: true - condition: $TRAVIS_BRANCH =~ ^(master|feature/#1353-xDai-compatibility|feature/#1421-setup-deployment-and-ci)$ + condition: $TRAVIS_BRANCH =~ ^(master|feature/#1353-xDai-compatibility)$ # Prepare production deployment - provider: s3