From 721ebb69c6727e8cd6f2246ba3f0a99302c736fa Mon Sep 17 00:00:00 2001 From: Javier Cortejoso Date: Fri, 23 Jun 2023 15:45:31 +0200 Subject: [PATCH 1/4] Manual trigger for CircleCi workflow --- .circleci/config.yml | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index ef5bafcc335..598d44e572a 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -2,9 +2,12 @@ # and https://github.com/facebook/react-native/blob/master/.circleci/config.yml version: 2.1 - +setup: true parameters: + run-workflow: + type: boolean + default: false # When you need to force a rebuild of the node modules cache then bump this version node-modules-cache-version: type: integer @@ -891,6 +894,9 @@ jobs: workflows: version: 2 celo-monorepo-build: + # Contitionally triggered + when: + or: [<< pipeline.parameters.run-workflow >>] jobs: - install_dependencies - certora-test: @@ -1013,9 +1019,9 @@ workflows: npm-install-testing-cron-workflow: triggers: - schedule: - # 7 PM in UTC = noon in PDT. - # Best for test to fail during SF afternoon, so that, someone can fix it during the day time. - cron: '0 19 * * *' + # cron: '0 19 * * *' + # Feb 30th to disable + cron: '0 19 30 2 *' filters: branches: only: @@ -1028,9 +1034,8 @@ workflows: protocol-testing-with-code-coverage-cron-workflow: triggers: - schedule: - # 1 PM in UTC = 6 AM in PDT. - # Best for this slow test (~3 hours) to run during SF early morning. - cron: '0 13 * * *' + # Feb 30th to disable + cron: '0 13 30 2 *' filters: branches: only: From d403eab76db871edd02b09d65dfe7d8540927c2e Mon Sep 17 00:00:00 2001 From: Javier Cortejoso Date: Fri, 23 Jun 2023 15:51:52 +0200 Subject: [PATCH 2/4] Manual trigger for all workflows --- .circleci/config.yml | 51 +++++++++++++++++++++++++++----------------- 1 file changed, 31 insertions(+), 20 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 598d44e572a..a25a9f7a5c8 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -5,7 +5,13 @@ version: 2.1 setup: true parameters: - run-workflow: + run-workflow-general: + type: boolean + default: false + run-workflow-npm-install: + type: boolean + default: false + run-workflow-protocol-coverage: type: boolean default: false # When you need to force a rebuild of the node modules cache then bump this version @@ -896,7 +902,7 @@ workflows: celo-monorepo-build: # Contitionally triggered when: - or: [<< pipeline.parameters.run-workflow >>] + or: [<< pipeline.parameters.run-workflow-general >>] jobs: - install_dependencies - certora-test: @@ -1017,29 +1023,34 @@ workflows: - end-to-end-cip35-eth-compatibility-test - odis-test npm-install-testing-cron-workflow: - triggers: - - schedule: - # cron: '0 19 * * *' - # Feb 30th to disable - cron: '0 19 30 2 *' - filters: - branches: - only: - - master + # triggers: + # - schedule: + # # cron: '0 19 * * *' + # # Feb 30th to disable + # cron: '0 19 30 2 *' + # filters: + # branches: + # only: + # - master + # Contitionally triggered + when: + or: [<< pipeline.parameters.run-workflow-npm-install >>] jobs: - test-typescript-npm-package-install - test-utils-npm-package-install - test-contractkit-npm-package-install - test-celocli-npm-package-install protocol-testing-with-code-coverage-cron-workflow: - triggers: - - schedule: - # Feb 30th to disable - cron: '0 13 30 2 *' - filters: - branches: - only: - - master + # triggers: + # - schedule: + # # Feb 30th to disable + # cron: '0 13 30 2 *' + # filters: + # branches: + # only: + # - master + when: + or: [<< pipeline.parameters.run-workflow-protocol-coverage >>] jobs: - install_dependencies - lint-checks: @@ -1047,4 +1058,4 @@ workflows: - install_dependencies - protocol-test-with-code-coverage: requires: - - lint-checks + - lint-checks \ No newline at end of file From 33efc7d0285ece7113bf9e5fe285082b1b6c0e9b Mon Sep 17 00:00:00 2001 From: Javier Cortejoso Date: Fri, 23 Jun 2023 16:09:55 +0200 Subject: [PATCH 3/4] boolean workaround --- .circleci/config.yml | 43 ++++++++++++++++--------------------------- 1 file changed, 16 insertions(+), 27 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index a25a9f7a5c8..1a0bb14f04a 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -6,14 +6,14 @@ setup: true parameters: run-workflow-general: - type: boolean - default: false + type: string + default: "false" run-workflow-npm-install: - type: boolean - default: false + type: string + default: "false" run-workflow-protocol-coverage: - type: boolean - default: false + type: string + default: "false" # When you need to force a rebuild of the node modules cache then bump this version node-modules-cache-version: type: integer @@ -902,7 +902,9 @@ workflows: celo-monorepo-build: # Contitionally triggered when: - or: [<< pipeline.parameters.run-workflow-general >>] + matches: + pattern: "^(true|True|yes|Yes|Y|y)$" + value: << pipeline.parameters.run-workflow-general >> jobs: - install_dependencies - certora-test: @@ -1023,34 +1025,21 @@ workflows: - end-to-end-cip35-eth-compatibility-test - odis-test npm-install-testing-cron-workflow: - # triggers: - # - schedule: - # # cron: '0 19 * * *' - # # Feb 30th to disable - # cron: '0 19 30 2 *' - # filters: - # branches: - # only: - # - master # Contitionally triggered when: - or: [<< pipeline.parameters.run-workflow-npm-install >>] + matches: + pattern: "^(true|True|yes|Yes|Y|y)$" + value: << pipeline.parameters.run-workflow-npm-install >> jobs: - test-typescript-npm-package-install - test-utils-npm-package-install - test-contractkit-npm-package-install - test-celocli-npm-package-install protocol-testing-with-code-coverage-cron-workflow: - # triggers: - # - schedule: - # # Feb 30th to disable - # cron: '0 13 30 2 *' - # filters: - # branches: - # only: - # - master when: - or: [<< pipeline.parameters.run-workflow-protocol-coverage >>] + matches: + pattern: "^(true|True|yes|Yes|Y|y)$" + value: << pipeline.parameters.run-workflow-protocol-coverage >> jobs: - install_dependencies - lint-checks: @@ -1058,4 +1047,4 @@ workflows: - install_dependencies - protocol-test-with-code-coverage: requires: - - lint-checks \ No newline at end of file + - lint-checks From 00213d03a5e380bd8ff7085eafe726af05a82296 Mon Sep 17 00:00:00 2001 From: Javier Cortejoso Date: Fri, 23 Jun 2023 16:11:28 +0200 Subject: [PATCH 4/4] Revert change --- .circleci/config.yml | 24 +++++++++--------------- 1 file changed, 9 insertions(+), 15 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 1a0bb14f04a..666206e3475 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -6,14 +6,14 @@ setup: true parameters: run-workflow-general: - type: string - default: "false" + type: boolean + default: false run-workflow-npm-install: - type: string - default: "false" + type: boolean + default: false run-workflow-protocol-coverage: - type: string - default: "false" + type: boolean + default: false # When you need to force a rebuild of the node modules cache then bump this version node-modules-cache-version: type: integer @@ -902,9 +902,7 @@ workflows: celo-monorepo-build: # Contitionally triggered when: - matches: - pattern: "^(true|True|yes|Yes|Y|y)$" - value: << pipeline.parameters.run-workflow-general >> + or: [<< pipeline.parameters.run-workflow-general >>] jobs: - install_dependencies - certora-test: @@ -1027,9 +1025,7 @@ workflows: npm-install-testing-cron-workflow: # Contitionally triggered when: - matches: - pattern: "^(true|True|yes|Yes|Y|y)$" - value: << pipeline.parameters.run-workflow-npm-install >> + or: [<< pipeline.parameters.run-workflow-npm-install >>] jobs: - test-typescript-npm-package-install - test-utils-npm-package-install @@ -1037,9 +1033,7 @@ workflows: - test-celocli-npm-package-install protocol-testing-with-code-coverage-cron-workflow: when: - matches: - pattern: "^(true|True|yes|Yes|Y|y)$" - value: << pipeline.parameters.run-workflow-protocol-coverage >> + or: [<< pipeline.parameters.run-workflow-protocol-coverage >>] jobs: - install_dependencies - lint-checks: