-
Notifications
You must be signed in to change notification settings - Fork 36
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
Add job deploying contracts from dapp-development
branch
#392
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This was referenced Aug 2, 2022
Merged
michalinacienciala
force-pushed
the
ci-dapp-dev
branch
from
August 2, 2022 16:20
8933502
to
4bddc06
Compare
There are situations when team developing T Token Dashboard needs to locally test some functionalities using modified contracts, for example ones with shorter authorization decrease delay. We decided to create a `dapp-development` branch in each of the upstream modules of `threshold-network/token-dashboard` CI module, which would store the code of these modified contracts. In this PR we create a `contracts-dapp-development-deployment-testnet` job which deploys the contracts, creates an NPM package (with `dappdev<environment>` suffix and `dapp-development-<environment>` tag) and publishes it to the NPM registry. At the end of the job we don't have a step informing CI about completion of the workflow because we don't want to start the deployment of the T Token Dashboard (which will soon be added as a downstream module to the CI config) on a public testnet using modified contracts. The job gets triggered only as a result of `workflow_dispath` event from a `dapp-development` branch. Currently only `goerli` environment is supported. We don't run system and unit tests for `dapp-development` branch, as the tests are not configured to work with the modified contracts. Generally, the goal of the changes is to have the full set of dapp-development-friendly contracts deployed to the NPM registry, so that the dApp developers could quickly use them by upgrading the `token-dashboard` dependencies using `yarn upgrade <package-name>@dapp-development-goerli`. If the workflow gets dispatched from a different branch than `dapp-development`, the deploy will behave as it used to, publishing package with deployed unmodified contracts to the NPM registry under `<environment>` tag.
michalinacienciala
force-pushed
the
ci-dapp-dev
branch
from
August 3, 2022 09:20
4bddc06
to
07ef60f
Compare
The contracts deployed in the `contracts-dapp-development-deployment-testnet` job will be used by dApp developers to build their local environments and deploy dApp previews. We want more flexibility there than on the public-facing testnet dApp and we want to use different deployer accounts for those two different types of testnet dApps.
This was referenced Aug 4, 2022
Newer versions of actions used in our workflows are available.
Changes not intended for merge to `main`.
We don't want to fill the default value with value that is supported, to prevent from accidental dispatches of the workflow by people who don't fully understand how the inputs should be configured. Previously we used explicitely incorrect default value, but that may be too much and may be a bit confusing. Let's leave the input without default.
Previously `-` was not supported as a value of `environment` property in the `npm-version-bump` action. Now action supports hyphens and we can change the suffix to more readible format.
We no longer use `/solidity` in the name of the `keep-core` CI modules. We already replaced the old names with the new ones, but we missed one place where the old names were still being used. This commit fixes that.
Deployment tested on a branch that combines code from #392 and #403: https://github.com/keep-network/tbtc-v2/actions/runs/3052208927 |
1 task
nkuba
approved these changes
Sep 19, 2022
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There are situations when team developing T Token Dashboard needs to
locally test some functionalities using modified contracts, for example
ones with shorter authorization decrease delay. We decided to create a
dapp-development
branch in each of the upstream modules ofthreshold-network/token-dashboard
CI module, which would store thecode of these modified contracts. In this PR we create a
contracts-dapp-development-deployment-testnet
job which deploys thecontracts, creates an NPM package (with
dappdev<environment>
suffixand
dapp-development-<environment>
tag) and publishes it to the NPMregistry. At the end of the job we don't have a step informing CI about
completion of the workflow because we don't want to start the deployment
of the T Token Dashboard (which will soon be added as a downstream
module to the CI config) on a public testnet using modified contracts.
The job gets triggered only as a result of
workflow_dispath
event froma
dapp-development
branch. Currently onlygoerli
environment issupported. We don't run system and unit tests for
dapp-development
branch, as the tests are not configured to work with the modified
contracts.
Generally, the goal of the changes is to have the full set of
dapp-development-friendly contracts deployed to the NPM registry, so
that the dApp developers could quickly use them by upgrading the
token-dashboard
dependencies usingyarn upgrade <package-name>@dapp-development-goerli
.If the workflow gets dispatched from a different branch than
dapp-development
, the deploy will behave as it used to, publishingpackage with deployed unmodified contracts to the NPM registry under
<environment>
tag.TODO:
contracts-dapp-development-deployment-testnet
jobmain
anddapp-development-goerli
-taggedrandom-beacon
andecdsa
packages publishedmain
dapp-development
branch createddry-run
from the codeRefs:
threshold-network/token-dashboard#136
threshold-network/solidity-contracts#119
keep-network/keep-core#3121