-
Notifications
You must be signed in to change notification settings - Fork 608
Build circleci config with Mustache #883
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
Build circleci config with Mustache #883
Conversation
package.json
Outdated
@@ -32,7 +32,7 @@ | |||
}, | |||
"husky": { | |||
"hooks": { | |||
"pre-commit": "./hooks/circleci && npm run lint && pretty-quick --staged" | |||
"pre-commit": "npm run lint && pretty-quick --staged" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Qu: don't you want to validate at least on pre-commit?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually, went a little bit further. This is now handled in the pack.js script, and will only run circleci if available in the OS.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How is that happening?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It uses execa to run the circleci command, and catches failures: https://github.com/Synthetixio/synthetix/pull/883/files#diff-7906ff03d65275e67cb294aedd9c5f682a4301f8ba0d0ebeeb44aac8cc9a07c1R49-R54
Of course, it can also fail because the circleci command was run and exited with 1. In that case, the developer will have to pay attention to the output.
package.json
Outdated
@@ -129,6 +129,7 @@ | |||
"@eth-optimism/contracts": "0.0.2-alpha.7", | |||
"abi-decoder": "2.3.0", | |||
"commander": "5.1.0", | |||
"mustache": "^4.0.1", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Isn't this more of a dev dependency? It's really just to build CI config when we change it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Moved to devDependencies
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall a good direction for sure, but a few things to consider
…op-circleci-mustache-mastertrigger
28f0c29
to
80234ee
Compare
* Sending rewards into L2 * Fixing broken parts * Unit tests * New unit tests * Adding coverage for migrate * Remove duplicate tests * Use smock to test L2 contracts (#820) * Remove MintableSynthetixMock.sol * Remove test:multi (implemented in external PR) * Remove secondary contract refs (#823) * New messenger interface (#825) * Add initial tests * Add loop for initializing the array * Add test for importVestingEntries() * Comment out expected data tests * Import new IRewardEscrowV2 interface * Fix SynthetixBridgeToOptimism unit tests * Fix SynthetixBridgeToBase unit tests * Add more tests * Use V2 suffix for rewardEscrow view function * Add RewardEscrowV2 for mocking * Minor fix * Adds a new script to connect l2 bridge (#894) * Adds a new script to connect l2 bridge * Bugfix on new command * Skip vsynth prod test (#895) * Adds a --clean-build flag to the build command (#896) * Fix lint pre-commit hook (#900) * Disable etherscan checks in CI (#897) * Skip vsynth prod test (#902) * Adds a few options to connect-bridge (#906) * Adds a few options to connect-bridge * Fix connect-bridge pks * Minor fix * Another minor fix * Fix * Logging more output * Fix * Fix * Fixing prod test for vSynth and verifying more rinkeby contracts in etherscan * remove aggregator feed for BCH prices (#905) * Prepublish step * 2.32.2-sip-95-remove-BCH-aggregator * Prepublish step * 2.32.3 * Develop - Merge master into develop (#911) * Address list renamed to address set and make adding elements idempotent. (#917) * Preparations for L2 Phase C deployment (#901) * Improved lint pre-commit hook (#918) * Build circleci config with Mustache (#883) * L2 Phase C Release (#919) * Prepublish step * 2.33.0-ovm * Updating versions for ovm * Add circleci paths to prettierignore for pretty-quick (#921) * Do not ignore dotfiles in js linter (#923) * reset iETH prices (#922) * reset iETH prices * update StakingRewardsiETH address and ABI * merge master into develop (#926) * reset iETH prices (#922) and update StakingRewardsiETH address and ABI Co-authored-by: Alejandro Santander <Palebluedot@gmail.com> Co-authored-by: justin j. moses <justinjmoses@gmail.com> Co-authored-by: Synthetix Team <team@synthetix.io> * Prepublish step * 2.33.1 * Added dockerhub authetication to circleci (#924) * Improved connect-bridge script (#928) * Use new rewardEscrowV2 * Modify burnForMigration() to return a strcut array * Use structs to avoid stack too deep errors * Use new interface * Use new importedVestingEntries() and fix unit tests * sip99 (#936) * Prepublish step * 2.33.2 * sip 98 double swing trade exchange fees (#935) * update calculation of exchangeFeeRate for swing trades from long <-> short synths without sUSD step * fix audit findings on missing exchangeFeeRate assignment and update Exchanger tests * release adhara 2.33.0 adhara (#939) * release adhara kovan 2.33.0 * release Exchanger 2.33.0 Adhara to mainnet * Prepublish step * 2.33.0 * Prepublish step * 2.34.0 * Version fix for master along with some fork fixes (#941) * Fixing versions * merge 2.34.0 release into develop (#940) * Add 0-debt requirement for withdrawals (#942) * update migrateAccountEscrowBalances * use escrowMigrationPending flag for accounts to only migrate once from old esccrow to new * add stub for vest() and _amountClaimable calcs * Deploy bug fix: adding synths (#920) * Deployed fix for SynthetixBridgeToBase (#945) * Prepublish step * 2.34.1-ovm * add create escrow entry function * reset iSynths (#946) * Prepublish step * 2.34.2 * add vest function for entryIDs[] and claimableAmount calculation * implement vest and getVestingQuantity view * Adding Shaula entry on releases * Prepublish step * 2.35.0-ovm * remove duplicate function * Disable coverage in ci until its fixed (#950) * update BaseRewardEscrow test and update events * update BaseRewardEscrowV2 test * add revert tests for appendVestingEntry * update tests and ratePerSecond calculation * add approve snx for creating reward * SIP 100 Resolver & cache improvements (#951) * add quantity > duration test * add tests for ratePerSecond * add deltaOf public function and tests. Test failing as deltaOf is failing * Adding a new command to deploy an ovm instance pair for testing * Minor lint fix * Progress detecting unsafe deployments * More robust OVM safety checks * First OVM local deploy * Working * refactor deltaOf to timeSinceLastVested and update claimableAmount * remove only * update now -> block.timestamp and add tests for approve and create esrow entry * add stub test cases in BaseRewardEscrow * Return the right messenger addresses * Predict deploy addresses in L2 deploys * Tidier output in connect-bridge * Remove log * Add new logic and fix tests * Use alt key * update TODO require()'s for account merging * fix vest function loop * add vesting tests * fix getVestingQuantity view iteration and add vesting tests * Refactoring L2 prod tests * Update interfaces * Deposits working in L2 tests * Progress with L2 withdrawal tests * Linter fixes * Withdrawals working in L2 prod tests * Refactor depositAndMigrateEscrow() and add unit tests * Add extra safety checks * Use new addressResolver * Deploy RewardEscrowV2 on local and local-ovm * add smockit for issuer and issuer() contract for debtBalanceOf to BaseRewardEscrowV2 * update IRewardEscrowV2 interface and BaseRewardEscrow tests to smock * update smockit and mocking SNX token for vesting * remove unused var * update BaseRewardEscrowV2 tests with new MixinResolver * add NominateAccountToMerge event and test * add tests to vesting schedule merging fix lint Co-authored-by: justin j. moses <justinjmoses@gmail.com> Co-authored-by: i-stam <i.stamelakos@gmail.com> Co-authored-by: Alejandro Santander <Palebluedot@gmail.com> Co-authored-by: Synthetix Team <team@synthetix.io> Co-authored-by: Anton Jurisevic <zyzek@users.noreply.github.com> Co-authored-by: Clinton Ennis <clinton@synthetix.io> Co-authored-by: justin j. moses <justin@synthetix.io>
* Sending rewards into L2 * Fixing broken parts * Unit tests * New unit tests * Adding coverage for migrate * Remove duplicate tests * Use smock to test L2 contracts (#820) * Remove MintableSynthetixMock.sol * Remove test:multi (implemented in external PR) * Remove secondary contract refs (#823) * New messenger interface (#825) * Add initial tests * Add loop for initializing the array * Add test for importVestingEntries() * Comment out expected data tests * Import new IRewardEscrowV2 interface * Fix SynthetixBridgeToOptimism unit tests * Fix SynthetixBridgeToBase unit tests * Add more tests * Use V2 suffix for rewardEscrow view function * Add RewardEscrowV2 for mocking * Minor fix * Adds a new script to connect l2 bridge (#894) * Adds a new script to connect l2 bridge * Bugfix on new command * Skip vsynth prod test (#895) * Adds a --clean-build flag to the build command (#896) * Fix lint pre-commit hook (#900) * Disable etherscan checks in CI (#897) * Skip vsynth prod test (#902) * Adds a few options to connect-bridge (#906) * Adds a few options to connect-bridge * Fix connect-bridge pks * Minor fix * Another minor fix * Fix * Logging more output * Fix * Fix * Fixing prod test for vSynth and verifying more rinkeby contracts in etherscan * remove aggregator feed for BCH prices (#905) * Prepublish step * 2.32.2-sip-95-remove-BCH-aggregator * Prepublish step * 2.32.3 * Develop - Merge master into develop (#911) * Address list renamed to address set and make adding elements idempotent. (#917) * Preparations for L2 Phase C deployment (#901) * Improved lint pre-commit hook (#918) * Build circleci config with Mustache (#883) * L2 Phase C Release (#919) * Prepublish step * 2.33.0-ovm * Updating versions for ovm * Add circleci paths to prettierignore for pretty-quick (#921) * Do not ignore dotfiles in js linter (#923) * reset iETH prices (#922) * reset iETH prices * update StakingRewardsiETH address and ABI * merge master into develop (#926) * reset iETH prices (#922) and update StakingRewardsiETH address and ABI Co-authored-by: Alejandro Santander <Palebluedot@gmail.com> Co-authored-by: justin j. moses <justinjmoses@gmail.com> Co-authored-by: Synthetix Team <team@synthetix.io> * Prepublish step * 2.33.1 * Added dockerhub authetication to circleci (#924) * Improved connect-bridge script (#928) * Use new rewardEscrowV2 * Modify burnForMigration() to return a strcut array * Use structs to avoid stack too deep errors * Use new interface * Use new importedVestingEntries() and fix unit tests * sip99 (#936) * Prepublish step * 2.33.2 * sip 98 double swing trade exchange fees (#935) * update calculation of exchangeFeeRate for swing trades from long <-> short synths without sUSD step * fix audit findings on missing exchangeFeeRate assignment and update Exchanger tests * release adhara 2.33.0 adhara (#939) * release adhara kovan 2.33.0 * release Exchanger 2.33.0 Adhara to mainnet * Prepublish step * 2.33.0 * Prepublish step * 2.34.0 * Version fix for master along with some fork fixes (#941) * Fixing versions * merge 2.34.0 release into develop (#940) * Add 0-debt requirement for withdrawals (#942) * update migrateAccountEscrowBalances * use escrowMigrationPending flag for accounts to only migrate once from old esccrow to new * add stub for vest() and _amountClaimable calcs * Deploy bug fix: adding synths (#920) * Deployed fix for SynthetixBridgeToBase (#945) * Prepublish step * 2.34.1-ovm * add create escrow entry function * reset iSynths (#946) * Prepublish step * 2.34.2 * add vest function for entryIDs[] and claimableAmount calculation * implement vest and getVestingQuantity view * Adding Shaula entry on releases * Prepublish step * 2.35.0-ovm * remove duplicate function * Disable coverage in ci until its fixed (#950) * update BaseRewardEscrow test and update events * update BaseRewardEscrowV2 test * add revert tests for appendVestingEntry * update tests and ratePerSecond calculation * add approve snx for creating reward * SIP 100 Resolver & cache improvements (#951) * add quantity > duration test * add tests for ratePerSecond * add deltaOf public function and tests. Test failing as deltaOf is failing * Adding a new command to deploy an ovm instance pair for testing * Minor lint fix * Progress detecting unsafe deployments * More robust OVM safety checks * First OVM local deploy * Working * refactor deltaOf to timeSinceLastVested and update claimableAmount * remove only * update now -> block.timestamp and add tests for approve and create esrow entry * add stub test cases in BaseRewardEscrow * Return the right messenger addresses * Predict deploy addresses in L2 deploys * Tidier output in connect-bridge * Remove log * Add new logic and fix tests * Use alt key * update TODO require()'s for account merging * fix vest function loop * add vesting tests * fix getVestingQuantity view iteration and add vesting tests * Refactoring L2 prod tests * Update interfaces * Deposits working in L2 tests * Progress with L2 withdrawal tests * Linter fixes * Withdrawals working in L2 prod tests * Refactor depositAndMigrateEscrow() and add unit tests * Add extra safety checks * Use new addressResolver * Deploy RewardEscrowV2 on local and local-ovm * add smockit for issuer and issuer() contract for debtBalanceOf to BaseRewardEscrowV2 * update IRewardEscrowV2 interface and BaseRewardEscrow tests to smock * update smockit and mocking SNX token for vesting * remove unused var * update BaseRewardEscrowV2 tests with new MixinResolver * add NominateAccountToMerge event and test * add tests to vesting schedule merging fix lint * Update FeePool to use RewardEsrowV2 and feepool.js tests Co-authored-by: justin j. moses <justinjmoses@gmail.com> Co-authored-by: i-stam <i.stamelakos@gmail.com> Co-authored-by: Alejandro Santander <Palebluedot@gmail.com> Co-authored-by: Synthetix Team <team@synthetix.io> Co-authored-by: Anton Jurisevic <zyzek@users.noreply.github.com> Co-authored-by: Clinton Ennis <clinton@synthetix.io> Co-authored-by: justin j. moses <justin@synthetix.io>
* Sending rewards into L2 * Fixing broken parts * Unit tests * New unit tests * Adding coverage for migrate * Remove duplicate tests * Use smock to test L2 contracts (#820) * Remove MintableSynthetixMock.sol * Remove test:multi (implemented in external PR) * Remove secondary contract refs (#823) * New messenger interface (#825) * Add initial tests * Add loop for initializing the array * Add test for importVestingEntries() * Comment out expected data tests * Import new IRewardEscrowV2 interface * Fix SynthetixBridgeToOptimism unit tests * Fix SynthetixBridgeToBase unit tests * Add more tests * Use V2 suffix for rewardEscrow view function * Add RewardEscrowV2 for mocking * Minor fix * Adds a new script to connect l2 bridge (#894) * Adds a new script to connect l2 bridge * Bugfix on new command * Skip vsynth prod test (#895) * Adds a --clean-build flag to the build command (#896) * Fix lint pre-commit hook (#900) * Disable etherscan checks in CI (#897) * Skip vsynth prod test (#902) * Adds a few options to connect-bridge (#906) * Adds a few options to connect-bridge * Fix connect-bridge pks * Minor fix * Another minor fix * Fix * Logging more output * Fix * Fix * Fixing prod test for vSynth and verifying more rinkeby contracts in etherscan * remove aggregator feed for BCH prices (#905) * Prepublish step * 2.32.2-sip-95-remove-BCH-aggregator * Prepublish step * 2.32.3 * Develop - Merge master into develop (#911) * Address list renamed to address set and make adding elements idempotent. (#917) * Preparations for L2 Phase C deployment (#901) * Improved lint pre-commit hook (#918) * Build circleci config with Mustache (#883) * L2 Phase C Release (#919) * Prepublish step * 2.33.0-ovm * Updating versions for ovm * Add circleci paths to prettierignore for pretty-quick (#921) * Do not ignore dotfiles in js linter (#923) * reset iETH prices (#922) * reset iETH prices * update StakingRewardsiETH address and ABI * merge master into develop (#926) * reset iETH prices (#922) and update StakingRewardsiETH address and ABI Co-authored-by: Alejandro Santander <Palebluedot@gmail.com> Co-authored-by: justin j. moses <justinjmoses@gmail.com> Co-authored-by: Synthetix Team <team@synthetix.io> * Prepublish step * 2.33.1 * Added dockerhub authetication to circleci (#924) * Improved connect-bridge script (#928) * Use new rewardEscrowV2 * Modify burnForMigration() to return a strcut array * Use structs to avoid stack too deep errors * Use new interface * Use new importedVestingEntries() and fix unit tests * sip99 (#936) * Prepublish step * 2.33.2 * sip 98 double swing trade exchange fees (#935) * update calculation of exchangeFeeRate for swing trades from long <-> short synths without sUSD step * fix audit findings on missing exchangeFeeRate assignment and update Exchanger tests * release adhara 2.33.0 adhara (#939) * release adhara kovan 2.33.0 * release Exchanger 2.33.0 Adhara to mainnet * Prepublish step * 2.33.0 * Prepublish step * 2.34.0 * Version fix for master along with some fork fixes (#941) * Fixing versions * merge 2.34.0 release into develop (#940) * Add 0-debt requirement for withdrawals (#942) * Deploy bug fix: adding synths (#920) * Deployed fix for SynthetixBridgeToBase (#945) * Prepublish step * 2.34.1-ovm * reset iSynths (#946) * Prepublish step * 2.34.2 * Adding Shaula entry on releases * Prepublish step * 2.35.0-ovm * Disable coverage in ci until its fixed (#950) * SIP 100 Resolver & cache improvements (#951) * Adding a new command to deploy an ovm instance pair for testing * Minor lint fix * Progress detecting unsafe deployments * More robust OVM safety checks * First OVM local deploy * Working * Return the right messenger addresses * Predict deploy addresses in L2 deploys * Tidier output in connect-bridge * Remove log * Add new logic and fix tests * Use alt key * Refactoring L2 prod tests * Update interfaces * Deposits working in L2 tests * Progress with L2 withdrawal tests * Linter fixes * Withdrawals working in L2 prod tests * Refactor depositAndMigrateEscrow() and add unit tests * Add extra safety checks * Use new addressResolver * Deploy RewardEscrowV2 on local and local-ovm * Connect-bridge command: Check if resolver needs imports and if bridge needs sync separately (#944) * Prevent withdrawals on a suspended L2 system (#949) * Prevent withdrawals on a suspended L2 system * Also mocking SystemStatus on MintableSynthetix tests Co-authored-by: justin j. moses <justin@synthetix.io> * Adds a command that deploys an OVM pair of instances on local chains (#954) * Adding a new command to deploy an ovm instance pair for testing * Minor lint fix * Progress detecting unsafe deployments * More robust OVM safety checks * First OVM local deploy * Working * Predict deploy addresses in L2 deploys * Tidier output in connect-bridge * Remove log * Renamed some L2 functions (#961) * New command: migrate-bridge (#925) * Linter fixes * Migrate bridge cmd uses getVersions * Get latest bridge version directly from deployments * Update to develop * Added SystemSettings.crossDomainMessageGasLimit (#962) * Added a system setting * Minor fixes * Added FlexibleStorage in L2 bridge unit tests * Updates deploy-ovm-pair cmd to latest optimism-integration (#964) * WIP: add initial deployment and tests * Update interface * Build ci * Comment out tests * Comment out test file Co-authored-by: justin j. moses <justinjmoses@gmail.com> Co-authored-by: Alejandro Santander <Palebluedot@gmail.com> Co-authored-by: Jackson <jackosmacko@gmail.com> Co-authored-by: Synthetix Team <team@synthetix.io> Co-authored-by: Anton Jurisevic <zyzek@users.noreply.github.com> Co-authored-by: Clinton Ennis <clinton@synthetix.io> Co-authored-by: justin j. moses <justin@synthetix.io>
* Adds a new script to connect l2 bridge (#894) * Adds a new script to connect l2 bridge * Bugfix on new command * Skip vsynth prod test (#895) * Adds a --clean-build flag to the build command (#896) * Fix lint pre-commit hook (#900) * Disable etherscan checks in CI (#897) * Skip vsynth prod test (#902) * Adds a few options to connect-bridge (#906) * Adds a few options to connect-bridge * Fix connect-bridge pks * Minor fix * Another minor fix * Fix * Logging more output * Fix * Fix * Fixing prod test for vSynth and verifying more rinkeby contracts in etherscan * remove aggregator feed for BCH prices (#905) * Prepublish step * 2.32.2-sip-95-remove-BCH-aggregator * Prepublish step * 2.32.3 * Develop - Merge master into develop (#911) * Address list renamed to address set and make adding elements idempotent. (#917) * Preparations for L2 Phase C deployment (#901) * Improved lint pre-commit hook (#918) * Build circleci config with Mustache (#883) * L2 Phase C Release (#919) * Prepublish step * 2.33.0-ovm * Updating versions for ovm * Add circleci paths to prettierignore for pretty-quick (#921) * Do not ignore dotfiles in js linter (#923) * reset iETH prices (#922) * reset iETH prices * update StakingRewardsiETH address and ABI * merge master into develop (#926) * reset iETH prices (#922) and update StakingRewardsiETH address and ABI Co-authored-by: Alejandro Santander <Palebluedot@gmail.com> Co-authored-by: justin j. moses <justinjmoses@gmail.com> Co-authored-by: Synthetix Team <team@synthetix.io> * Prepublish step * 2.33.1 * Added dockerhub authetication to circleci (#924) * Improved connect-bridge script (#928) * sip99 (#936) * Prepublish step * 2.33.2 * sip 98 double swing trade exchange fees (#935) * update calculation of exchangeFeeRate for swing trades from long <-> short synths without sUSD step * fix audit findings on missing exchangeFeeRate assignment and update Exchanger tests * release adhara 2.33.0 adhara (#939) * release adhara kovan 2.33.0 * release Exchanger 2.33.0 Adhara to mainnet * Prepublish step * 2.33.0 * Prepublish step * 2.34.0 * Version fix for master along with some fork fixes (#941) * Fixing versions * merge 2.34.0 release into develop (#940) * Add 0-debt requirement for withdrawals (#942) * Deploy bug fix: adding synths (#920) * Deployed fix for SynthetixBridgeToBase (#945) * Prepublish step * 2.34.1-ovm * reset iSynths (#946) * Prepublish step * 2.34.2 * Adding Shaula entry on releases * Prepublish step * 2.35.0-ovm * Disable coverage in ci until its fixed (#950) * SIP 100 Resolver & cache improvements (#951) * Connect-bridge command: Check if resolver needs imports and if bridge needs sync separately (#944) * Prevent withdrawals on a suspended L2 system (#949) * Prevent withdrawals on a suspended L2 system * Also mocking SystemStatus on MintableSynthetix tests Co-authored-by: justin j. moses <justin@synthetix.io> * Adds a command that deploys an OVM pair of instances on local chains (#954) * Adding a new command to deploy an ovm instance pair for testing * Minor lint fix * Progress detecting unsafe deployments * More robust OVM safety checks * First OVM local deploy * Working * Predict deploy addresses in L2 deploys * Tidier output in connect-bridge * Remove log * Renamed some L2 functions (#961) * New command: migrate-bridge (#925) * Linter fixes * Migrate bridge cmd uses getVersions * Get latest bridge version directly from deployments * Update to develop * Added SystemSettings.crossDomainMessageGasLimit (#962) * Added a system setting * Minor fixes * Added FlexibleStorage in L2 bridge unit tests * Updates deploy-ovm-pair cmd to latest optimism-integration (#964) Co-authored-by: Alejandro Santander <Palebluedot@gmail.com> Co-authored-by: justin j. moses <justinjmoses@gmail.com> Co-authored-by: Jackson <jackosmacko@gmail.com> Co-authored-by: Synthetix Team <team@synthetix.io> Co-authored-by: Anton Jurisevic <zyzek@users.noreply.github.com> Co-authored-by: Clinton Ennis <clinton@synthetix.io> Co-authored-by: justin j. moses <justin@synthetix.io>
The CircleCI CLI has a command for packing a config file called "pack", but we found it to be very limited in terms of what it can do. Using Mustache would seem to be a much more powerful approach.
This PR also removes the complex circleci hook that often caused weird situations. Devs tweaking ci should know what they're doing (it's documented in the README within the .circleci folder).
PLEASE IGNORE FAILING NON-REQUIRED CI WORKFLOWS