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

CI workflows configuration #5

Merged
merged 13 commits into from
Oct 7, 2021
Merged

CI workflows configuration #5

merged 13 commits into from
Oct 7, 2021

Conversation

nkuba
Copy link
Member

@nkuba nkuba commented Sep 21, 2021

Workflow: dashboard.yaml - builds, tests, and deploys for testnet (ropsten)

Invoked on:

  • main merge (push with branches: main),
  • Pull Request commits (pull_request),
  • manually with (workflow_dispatch).

Jobs:

  • format - runs linting and prettier code formatting checks
  • build-and-test - runs build; tests are not yet available in the repository
  • build-and-deploy-testnet - resolves latest dependencies for ropsten, then:
    • for PR commits: builds and deploys a preview to preview.dashboard.test.threshold.network/<REF>
    • for main merge: builds and deploys dashboard.test.threshold.network

Workflow: release-mainnet.yml - builds, tests, and deploys for mainnet

Invoked on:

  • main merge (push with branches: main),
  • Pull Requests on releases/mainnet/** branches,
  • published releases (release with types: published),
  • manually with (workflow_dispatch).

It will pull the latest contracts dependencies pushed to npm registry and tagged with mainnet.
For PR made on releases/mainnet/** branch it won't resolve the latest mainnet dependencies, but use the ones already configured in package.json.

Jobs:

  • build-mainnet - builds dashboard and stores the artifacts for following jobs
  • deploy-preview-mainnet - deploys dashboard automatically to preview.dashboard.threshold.network/<REF>
  • deploy-mainnet - runs for published release or workflow dispatch; requires manual approval to deploy dashboard to dashboard.threshold.network

This PR depends on #1


- uses: actions/setup-node@v2
with:
node-version: "16"
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are there any expectations regarding the node version the dashboard should be built with?

@nkuba

This comment has been minimized.

@nkuba nkuba changed the base branch from main to cra-setup September 22, 2021 10:45
@nkuba nkuba added the ☁️ infrastructure CI, Infrastructure, Workflows label Sep 22, 2021
Base automatically changed from cra-setup to main September 22, 2021 16:43
@nkuba nkuba marked this pull request as ready for review September 23, 2021 06:37
@@ -0,0 +1,107 @@
name: Dashboard
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we align workflows and files naming to what we have in other repos (e.g. keep-core). We could name this file as dashboard-testnet.yml and the workflow as Token Dashboard / Testnet. WDYT?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm cool with these changes & the related change requests so we're keeping things consistent with Keep.

@@ -0,0 +1,95 @@
name: Dashboard Build and Deploy for Mainnet
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And same here regarding naming. What do you think about naming the file dashboard-mainnet.yml and the workflow as Token Dashboard / Mainnet?

.github/workflows/release-mainnet.yml Outdated Show resolved Hide resolved
.github/workflows/release-mainnet.yml Outdated Show resolved Hide resolved
.github/workflows/release-mainnet.yml Outdated Show resolved Hide resolved
.github/workflows/dashboard.yaml Outdated Show resolved Hide resolved
Copy link
Contributor

@michalinacienciala michalinacienciala left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Left one comment - it would be good to fix this at some point, but I don't think it should block the merge.

.github/workflows/dashboard-ci.yaml Outdated Show resolved Hide resolved
.github/workflows/dashboard-mainnet.yml Outdated Show resolved Hide resolved
The workflow will run on each push to main branch or a pull request to
execute a yarn script that checks code formatting.
The dashboard will be built on each pull request and main branch merge.

Dashboard will be build with the latest ropsten contracts for pull
requests and published to a preview bucket.
Once a PR is merged to main the version of dashboard will be built for
ropsten and deployed to testnet bucket.
It is expected that mainnet dashboard releases are created on
`releases/mainnet/*` branches.
The code pushed to the branch should have dependencies updated to the
versions of contracts that we want to use for mainnet. (this could be
changed later to pull the latest npm packages tagged with `mainnet`).

Once a PR is created a dashboard preview will be published and comment
added to the PR.

When the dashboard is ready to publish the deployer should manually
approve the deployment.
The contracts are not yet published to NPM, nor required by the
dashboard. We're leaving it as a placeholder.
We want to publish a preview of mainnet dashboard also when a push to
main happens. We will build the dashboard with the latest mainnet
contract dependencies.
When a new release is published we will deploy the dashboard build with
the latest mainnet contracts.

We also give possibility to manually invoke the workflow with
workflow_dispatch.
We want to resolve the latest version of a dependency package that is a
tag, so we switched to upgrade command.
Renemed the files and jobs for consistency.
The API has changed, hence we need to align with the latest changes.

See more: https://github.com/actions/github-script#breaking-changes-in-v5
georgeweiler
georgeweiler previously approved these changes Sep 28, 2021
yarn-error.log Outdated Show resolved Hide resolved
.github/workflows/dashboard-mainnet.yml Show resolved Hide resolved
@github-actions
Copy link

github-actions bot commented Oct 6, 2021

Point to index.html for smooth reference to the website.
We do similiar for ropsten one, we need to specifiy those paramters so
the bucket correctly reference the website.
@github-actions
Copy link

github-actions bot commented Oct 6, 2021

@github-actions
Copy link

github-actions bot commented Oct 6, 2021

@michalinacienciala michalinacienciala merged commit 4bf65cc into main Oct 7, 2021
@michalinacienciala michalinacienciala deleted the ci-setup branch October 7, 2021 08:44
georgeweiler pushed a commit that referenced this pull request Sep 8, 2022
CI workflows configuration

Workflow: dashboard.yaml - builds, tests, and deploys for testnet (ropsten)

Invoked on:

* main merge (push with branches: main),
* Pull Request commits (pull_request),
* manually with (workflow_dispatch).

Jobs:
* format - runs linting and prettier code formatting checks
* build-and-test - runs build; tests are not yet available in the repository
* build-and-deploy-testnet - resolves latest dependencies for ropsten, then:
  for PR commits: builds and deploys a preview to preview.dashboard.test.threshold.network/<REF>
  for main merge: builds and deploys dashboard.test.threshold.network


Workflow: release-mainnet.yml - builds, tests, and deploys for mainnet

Invoked on:

* main merge (push with branches: main),
* Pull Requests on releases/mainnet/** branches,
* published releases (release with types: published),
* manually with (workflow_dispatch).

It will pull the latest contracts dependencies pushed to npm registry and tagged with mainnet.
For PR made on releases/mainnet/** branch it won't resolve the latest mainnet dependencies, but use the ones already configured in package.json.

Jobs:

* build-mainnet - builds dashboard and stores the artifacts for following jobs
* deploy-preview-mainnet - deploys dashboard automatically to preview.dashboard.threshold.network/<REF>
* deploy-mainnet - runs for published release or workflow dispatch; requires manual approval to deploy dashboard to dashboard.threshold.network
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.

None yet

4 participants