Skip to content
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

Merged
merged 13 commits into from
Aug 17, 2022

Conversation

michalinacienciala
Copy link
Contributor

@michalinacienciala michalinacienciala commented Aug 16, 2022

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.

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:

TODO after the merge:

  • Verify that job build-and-deploy-testnet-on-push got executed correctly

@michalinacienciala michalinacienciala force-pushed the ci-integration branch 12 times, most recently from 3175756 to 3c4f68b Compare August 16, 2022 10:56
@github-actions
Copy link

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.
@github-actions
Copy link

@nkuba
Copy link
Member

nkuba commented Aug 17, 2022

Set protection for testnet environment (@nkuba)

Done

.github/workflows/dashboard-ci.yml Outdated Show resolved Hide resolved
.github/workflows/dashboard-ci.yml Outdated Show resolved Hide resolved
.github/workflows/dashboard-ci.yml Outdated Show resolved Hide resolved
.github/workflows/dashboard-ci.yml Outdated Show resolved Hide resolved
.github/actions/build-and-deploy-to-bucket/action.yml Outdated Show resolved Hide resolved
.github/actions/build-and-deploy-to-bucket/action.yml Outdated Show resolved Hide resolved
.github/actions/build-and-deploy-to-bucket/action.yml Outdated Show resolved Hide resolved
.github/actions/build-and-deploy-to-bucket/action.yml Outdated Show resolved Hide resolved
.github/actions/build-and-deploy-to-bucket/action.yml Outdated Show resolved Hide resolved
.github/actions/build-and-deploy-to-bucket/action.yml Outdated Show resolved Hide resolved
@michalsmiarowski michalsmiarowski added the ☁️ infrastructure CI, Infrastructure, Workflows label Aug 17, 2022
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.
@github-actions
Copy link

Preview uploaded to preview.dashboard.test.threshold.network/ci-integration/index.html.

@github-actions
Copy link

Preview uploaded to preview.dashboard.test.threshold.network/ci-integration/index.html.

1 similar comment
@github-actions
Copy link

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.
.github/actions/build-and-deploy-to-bucket/action.yml Outdated Show resolved Hide resolved
.github/actions/build-and-deploy-to-bucket/action.yml Outdated Show resolved Hide resolved
.github/actions/build-and-deploy-to-bucket/action.yml Outdated Show resolved Hide resolved
.github/actions/build-and-deploy-to-bucket/action.yml Outdated Show resolved Hide resolved
.github/actions/build-and-deploy-to-bucket/action.yml Outdated Show resolved Hide resolved
.github/actions/build-and-deploy-to-bucket/action.yml Outdated Show resolved Hide resolved
The adress was missing `https://`.
@github-actions
Copy link

Preview uploaded to preview.dashboard.test.threshold.network/ci-integration/index.html.

We want to run `yarn build` for all events starting the workflow.
@github-actions
Copy link

@github-actions
Copy link

environment: goerli
ethUrlHttp: ${{ secrets.GOERLI_ETH_HOSTNAME_HTTP }}
ethUrlWS: ${{ secrets.GOERLI_ETH_HOSTNAME_WS }}
useUpstreamBuilds: true
Copy link
Member

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?

Suggested change
useUpstreamBuilds: true
useUpstreamBuilds: false

Copy link
Contributor Author

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.
@nkuba nkuba merged commit 6906445 into main Aug 17, 2022
@nkuba nkuba deleted the ci-integration branch August 17, 2022 15:59
@github-actions
Copy link

georgeweiler pushed a commit that referenced this pull request Sep 8, 2022
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.
@r-czajkowski r-czajkowski added this to the v1.3.0 milestone Oct 3, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
☁️ infrastructure CI, Infrastructure, Workflows
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants