-
Notifications
You must be signed in to change notification settings - Fork 27
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
Manual approval of deployment to dashboard.test.threshold.network #157
Conversation
3175756
to
3c4f68b
Compare
Preview uploaded to https://preview.dashboard.test.threshold.network/ci-integration/index.html. |
We've integrated deployment of the testnet Token Dashboard into our CI flow (deployment of new goerli packages with contracts triggers start of the `Dashboard / CI` workflow). But we don't want to start the dashboard deploy right away, because first the manual restart of the client nodes is needed. Due to that we're introducing protection of the `testnet` environment. Jobs which will use this environment will need to be manually approved in GH Actions run's details. We don't need to halt the deployment when workflow gets triggered by the merge to `main`, because this trigger is not related to changes to contracts / client and there is no need for the rotation of the client pods. This difference in the need for use of environment protection meant that we needed to split the `build-and-deploy-testnet` job to two separate jobs (another reason for that was that we wanted to use `upstream builds` in case of `workflow_dispatch` trigger). As after the split we would have three jobs that had quite similar steps, we decided to extract the steps to a separate action.
3c4f68b
to
7e72cc3
Compare
Preview uploaded to https://preview.dashboard.test.threshold.network/ci-integration/index.html. |
Done |
Instad of having the `gcpProject` input, we'll read the project name from the `ci/config/env/goerli.env` config file. We'll aso read the CHAIN_ID from there.
Input will be used to determine the versions of the legacy contracts which will be used to build the dashboard. It will also be used to read environment variables.
Bucket name parametrized. Thanks to this we could merge the deploy steps for preview bucket and for main bucket to one step (now in both cases we'll use `set-website: true`). If in the future the need for different configuration of `set-website` arises, we could parametrize the action further.
Also order of the inputs got changed. First we have parameters relating to building of the code, then inputs related to deployment to GCP bucket.
Preview uploaded to preview.dashboard.test.threshold.network/ci-integration/index.html. |
ab9b71c
to
ed99c3a
Compare
Preview uploaded to preview.dashboard.test.threshold.network/ci-integration/index.html. |
1 similar comment
Preview uploaded to preview.dashboard.test.threshold.network/ci-integration/index.html. |
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.
The adress was missing `https://`.
Preview uploaded to preview.dashboard.test.threshold.network/ci-integration/index.html. |
We want to run `yarn build` for all events starting the workflow.
Preview uploaded to https://preview.dashboard.test.threshold.network/ci-integration/index.html. |
Preview uploaded to https://preview.dashboard.test.threshold.network/ci-integration/index.html. |
.github/workflows/dashboard-ci.yml
Outdated
environment: goerli | ||
ethUrlHttp: ${{ secrets.GOERLI_ETH_HOSTNAME_HTTP }} | ||
ethUrlWS: ${{ secrets.GOERLI_ETH_HOSTNAME_WS }} | ||
useUpstreamBuilds: true |
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.
Shouldn't it be false
?
useUpstreamBuilds: true | |
useUpstreamBuilds: false |
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.
We shouldn't use `upstreamBuilds` as `upstream_builds` are not available for workflows triggered by ``pull_request` event.
Preview uploaded to https://preview.dashboard.test.threshold.network/ci-integration/index.html. |
Manual approval of deployment to dashboard.test.threshold.network We've integrated deployment of the testnet Token Dashboard into our CI flow (deployment of new goerli packages with contracts triggers start of the `Dashboard / CI` workflow). But we don't want to start the dashboard deploy right away, because first the manual restart of the client nodes is needed. Due to that we're introducing protection of the `testnet` environment. Jobs which will use this environment will need to be manually approved in GH Actions run's details. We don't need to halt the deployment when workflow gets triggered by the merge to `main`, because this trigger is not related to changes to contracts / client and there is no need for the rotation of the client pods. This difference in the need for use of environment protection meant that we needed to split the `build-and-deploy-testnet` job to two separate jobs (another reason for that was that we wanted to use `upstream builds` in case of `workflow_dispatch` trigger). As after the split we would have three jobs that had quite similar steps, we decided to extract the steps to a separate action.
We've integrated deployment of the testnet Token Dashboard into our
CI flow (deployment of new goerli packages with contracts triggers
start of the
Dashboard / CI
workflow). But we don't want to start thedashboard deploy right away, because first the manual restart of the
client nodes is needed. Due to that we're introducing protection of the
testnet
environment. Jobs which will use this environment will need tobe manually approved in GH Actions run's details. We don't need to halt
the deployment when workflow gets triggered by the merge to
main
,because this trigger is not related to changes to contracts / client and
there is no need for the rotation of the client pods. This difference in
the need for use of environment protection meant that we needed to split
the
build-and-deploy-testnet
job to two separate jobs (another reasonfor that was that we wanted to use
upstream builds
in case ofworkflow_dispatch
trigger). As after the split we would have threejobs that had quite similar steps, we decided to extract the steps to
a separate action.
Some further optimization of the new action is possible (like adjusting it for the use in the workflow publishing storybook for
components
repo, or in a workflow publishing to mainnet bucket), but I think it can be done in separate PRs.TODO:
NETWORK_ID
togoerli.env
keep-network/ci#32 is merged tomain
testnet
environment (@nkuba)@keep-network/random-beacon
,@keep-network/ecdsa
and@keep-network/tbtc-v2
contracts if they'll be added as dashboard's dependencies before merge of this PR (see https://github.com/threshold-network/token-dashboard/pull/120/files)TODO after the merge:
build-and-deploy-testnet-on-push
got executed correctly