Commit Graph

51 Commits

Author SHA1 Message Date
dependabot[bot] 6549357dbc
build(deps): bump actions/checkout from 3.5.2 to 3.5.3 (#6901)
Bumps [actions/checkout](https://github.com/actions/checkout) from 3.5.2 to 3.5.3.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v3.5.2...v3.5.3)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-06-10 00:59:58 +00:00
dependabot[bot] af3c90155b
build(deps): bump google-github-actions/setup-gcloud from 1.1.0 to 1.1.1 (#6653)
Bumps [google-github-actions/setup-gcloud](https://github.com/google-github-actions/setup-gcloud) from 1.1.0 to 1.1.1.
- [Release notes](https://github.com/google-github-actions/setup-gcloud/releases)
- [Changelog](https://github.com/google-github-actions/setup-gcloud/blob/main/CHANGELOG.md)
- [Commits](https://github.com/google-github-actions/setup-gcloud/compare/v1.1.0...v1.1.1)

---
updated-dependencies:
- dependency-name: google-github-actions/setup-gcloud
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-05-14 01:34:22 +00:00
dependabot[bot] 6c0b51df8d
build(deps): bump google-github-actions/auth from 1.1.0 to 1.1.1 (#6639)
Bumps [google-github-actions/auth](https://github.com/google-github-actions/auth) from 1.1.0 to 1.1.1.
- [Release notes](https://github.com/google-github-actions/auth/releases)
- [Changelog](https://github.com/google-github-actions/auth/blob/main/CHANGELOG.md)
- [Commits](https://github.com/google-github-actions/auth/compare/v1.1.0...v1.1.1)

---
updated-dependencies:
- dependency-name: google-github-actions/auth
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-05-11 02:39:36 +00:00
Gustavo Valverde 21391999a6
ci(deploy): templates do not allow the `zone` argument (#6646) 2023-05-10 02:06:18 +00:00
Gustavo Valverde d3d3f2827b
ci: unpin specific `buildkit` version and fix deployment subnets (#6645)
* ci(build): unpin specific `buildkit` version

We previously had an issue with the following error: `cannot reuse body, request must be retried`

This commonly was a wrong error, caused by a containerd issue which has being tracked and solved here: https://github.com/docker/build-push-action/issues/761#issuecomment-1406261692

We're having errors when building, and this might be caused by an underliying error which containerd is not showing us correctly.

* ci(deploy): Use specific subnetworks on GCP VMs
2023-05-10 00:45:32 +00:00
Gustavo Valverde b3691c514a
fix(deployment): explicitly use a service account and region (#6643) 2023-05-09 21:13:26 +00:00
dependabot[bot] f5426e0a6c
build(deps): bump google-github-actions/auth from 1.0.0 to 1.1.0 (#6540)
Bumps [google-github-actions/auth](https://github.com/google-github-actions/auth) from 1.0.0 to 1.1.0.
- [Release notes](https://github.com/google-github-actions/auth/releases)
- [Changelog](https://github.com/google-github-actions/auth/blob/main/CHANGELOG.md)
- [Commits](https://github.com/google-github-actions/auth/compare/v1.0.0...v1.1.0)

---
updated-dependencies:
- dependency-name: google-github-actions/auth
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-04-18 18:56:02 +00:00
dependabot[bot] 1790d4889c
build(deps): bump actions/checkout from 3.5.1 to 3.5.2 (#6504)
Bumps [actions/checkout](https://github.com/actions/checkout) from 3.5.1 to 3.5.2.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v3.5.1...v3.5.2)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-04-16 23:36:01 +00:00
Gustavo Valverde 455db91f10
refactor(ci): use GitHub variables for non-sensitive info (#6357)
* refactor(ci): use GitHub secrets and variables

We've been using values that are variable across multiple workflows,
and those can only be changed if modifying the workflows, but we should
be able to change the values without committing new changes in the code
for this purpose we're now using GitHub Variables, and even moving
non-sensitive information into variables instead of secrets. Allowing
more flexibility and other scenarios that should be easier to manage,
like deploying to Mainnet or Testnet.

* refactor(ci): use new GitHub variables for GCP auth

* fix(ci): typo

* fix(ci): do not use multiple variables for the same value

* fix(ci): typo in variable

* fix(vars): use different variables for machine types

* fix(vars): missing substitution

* fix: typo

* fix: make the input CI network override the default network

* Use the correct network variable for creating disks

---------

Co-authored-by: teor <teor@riseup.net>
2023-04-13 06:56:21 +00:00
dependabot[bot] bd0bf42894
build(deps): bump actions/checkout from 3.5.0 to 3.5.1 (#6490)
Bumps [actions/checkout](https://github.com/actions/checkout) from 3.5.0 to 3.5.1.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v3.5.0...v3.5.1)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-04-13 04:58:24 +00:00
dependabot[bot] de546ff7d7
build(deps): bump actions/checkout from 3.4.0 to 3.5.0 (#6403)
Bumps [actions/checkout](https://github.com/actions/checkout) from 3.4.0 to 3.5.0.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v3.4.0...v3.5.0)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-03-24 18:04:28 +00:00
dependabot[bot] f58771fdda
build(deps): bump actions/checkout from 3.3.0 to 3.4.0 (#6345)
Bumps [actions/checkout](https://github.com/actions/checkout) from 3.3.0 to 3.4.0.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v3.3.0...v3.4.0)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-03-16 21:57:42 +00:00
dependabot[bot] 37af87cdfb
build(deps): bump google-github-actions/setup-gcloud from 1.0.1 to 1.1.0 (#6100)
Bumps [google-github-actions/setup-gcloud](https://github.com/google-github-actions/setup-gcloud) from 1.0.1 to 1.1.0.
- [Release notes](https://github.com/google-github-actions/setup-gcloud/releases)
- [Changelog](https://github.com/google-github-actions/setup-gcloud/blob/main/CHANGELOG.md)
- [Commits](https://github.com/google-github-actions/setup-gcloud/compare/v1.0.1...v1.1.0)

---
updated-dependencies:
- dependency-name: google-github-actions/setup-gcloud
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-02-09 19:55:09 +00:00
dependabot[bot] 2117ee403a
build(deps): bump actions/checkout from 3.2.0 to 3.3.0 (#5918)
Bumps [actions/checkout](https://github.com/actions/checkout) from 3.2.0 to 3.3.0.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v3.2.0...v3.3.0)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-01-05 18:08:18 +00:00
dependabot[bot] 3e00426de4
build(deps): bump actions/checkout from 3.1.0 to 3.2.0 (#5855)
Bumps [actions/checkout](https://github.com/actions/checkout) from 3.1.0 to 3.2.0.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v3.1.0...v3.2.0)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-12-13 21:24:49 +00:00
teor a763eec9f3
fix(ci): Fix network parameter in continous-delivery.yml, and add network labels to GCP jobs (#5710)
* chore: add Network as a label

* Fix network parameter in continous-delivery.yml

* Standardise network usage in zcashd-manual-deploy

* Use lowercase network labels

* Fix some shellcheck errors

* Hard-code a Mainnet default to support contexts where env is not available

* Fix string syntax

* Fix more shellcheck errors

* Update .github/workflows/zcashd-manual-deploy.yml

Co-authored-by: Gustavo Valverde <gustavo@iterativo.do>
Co-authored-by: Arya <aryasolhi@gmail.com>
2022-11-25 21:11:22 +00:00
Gustavo Valverde c7745415b6
feat(gcp): add label to instances for cost and logs grouping (#5693)
* feat(gcp): add label to instances for cost and logs grouping

Previous behavior:
We couldn't search GCP logs using the instance name if that instance was
already deleted. And if we want to know how we're spending our budget its
also difficult to know if specific tests or type of instances are the one
responsible for a certain % of the costs

Fixes #5153
Fixses #5543

Expected behavior:
Be able to search logs using the test ID or at least the github reference,
and be able to group GCP costs by labels

Solution:
- Add labels to instances

* chore: add Network as a label

* Revert "chore: add Network as a label"

This reverts commit 146f747d50.

* Update .github/workflows/zcashd-manual-deploy.yml

Co-authored-by: teor <teor@riseup.net>

Co-authored-by: teor <teor@riseup.net>
2022-11-24 03:34:31 +00:00
Gustavo Valverde 7b73aa0c84
ci: use Container-Optimized OS public image on the VM (#5617)
* ci(compute): use debian public image on the VM, not the container

Previous behavior:

We were pulling the debian image the wrong way, as this was being used
as a container but it was meant to be the VM image

The image being pulled to create the internal container has been causing
crashes as this images do not exists on Google's container repositories

Expected behavior:

Use a public image as debian-11 to get multiple benefits from it, as being
able to use machine-images (#5615) and automatic disk resizing (which
is now possible as we're using COS images, but those are more restrictive)

Solution

Add `--image-project=debian-cloud` and `--image-family=debian-11` as
stated in the official documentation: https://cloud.google.com/sdk/gcloud/reference/compute/instances/create-with-container#--image-project

More info: https://cloud.google.com/compute/docs/images/os-details#import

* fix: use a public image with docker on the host

* fix(logs): missing sudo before docker command

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2022-11-16 23:08:28 +00:00
dependabot[bot] cbc2e393ca
build(deps): bump google-github-actions/setup-gcloud from 1.0.0 to 1.0.1 (#5614)
Bumps [google-github-actions/setup-gcloud](https://github.com/google-github-actions/setup-gcloud) from 1.0.0 to 1.0.1.
- [Release notes](https://github.com/google-github-actions/setup-gcloud/releases)
- [Changelog](https://github.com/google-github-actions/setup-gcloud/blob/main/CHANGELOG.md)
- [Commits](https://github.com/google-github-actions/setup-gcloud/compare/v1.0.0...v1.0.1)

---
updated-dependencies:
- dependency-name: google-github-actions/setup-gcloud
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-11-10 17:16:52 +00:00
Gustavo Valverde a815e9d252
fix(gcloud): setup the GCP CLI after authenticating (#5606)
Previous behavior:
`gcloud` commands have been running without an appropiate authentication
as the `auth` auction was sucessfully executed, but the actual gcloud
CLI being used in further jobs was not using the correct configuration
nor credentials

Expected behavior:
All `gcloud` commands should be properly configured and authenticated.

Solution:
Add the `google-github-actions/setup-gcloud` action after each
`google-github-actions/auth` invocation, and before running any `gcloud`
command.

Remove the need of an OAuth Access token when not required by following
steps
2022-11-10 06:32:21 +00:00
dependabot[bot] be24a364da
build(deps): bump google-github-actions/auth from 0.8.3 to 1.0.0 (#5596)
Bumps [google-github-actions/auth](https://github.com/google-github-actions/auth) from 0.8.3 to 1.0.0.
- [Release notes](https://github.com/google-github-actions/auth/releases)
- [Changelog](https://github.com/google-github-actions/auth/blob/main/CHANGELOG.md)
- [Commits](https://github.com/google-github-actions/auth/compare/v0.8.3...v1.0.0)

---
updated-dependencies:
- dependency-name: google-github-actions/auth
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-11-10 00:12:39 +00:00
dependabot[bot] 3cbf8dafaf
build(deps): bump google-github-actions/auth from 0.8.2 to 0.8.3 (#5413)
Bumps [google-github-actions/auth](https://github.com/google-github-actions/auth) from 0.8.2 to 0.8.3.
- [Release notes](https://github.com/google-github-actions/auth/releases)
- [Changelog](https://github.com/google-github-actions/auth/blob/main/CHANGELOG.md)
- [Commits](https://github.com/google-github-actions/auth/compare/v0.8.2...v0.8.3)

---
updated-dependencies:
- dependency-name: google-github-actions/auth
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-10-17 21:54:05 +00:00
dependabot[bot] 291b85d8ec
build(deps): bump google-github-actions/auth from 0.8.1 to 0.8.2 (#5404)
Bumps [google-github-actions/auth](https://github.com/google-github-actions/auth) from 0.8.1 to 0.8.2.
- [Release notes](https://github.com/google-github-actions/auth/releases)
- [Changelog](https://github.com/google-github-actions/auth/blob/main/CHANGELOG.md)
- [Commits](https://github.com/google-github-actions/auth/compare/v0.8.1...v0.8.2)

---
updated-dependencies:
- dependency-name: google-github-actions/auth
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-10-16 12:34:36 +00:00
dependabot[bot] 58b0ed1d85
build(deps): bump actions/checkout from 3.0.2 to 3.1.0 (#5329)
Bumps [actions/checkout](https://github.com/actions/checkout) from 3.0.2 to 3.1.0.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v3.0.2...v3.1.0)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2022-10-05 21:45:06 +00:00
dependabot[bot] 594f4c41cf
build(deps): bump google-github-actions/auth from 0.8.0 to 0.8.1 (#5029)
Bumps [google-github-actions/auth](https://github.com/google-github-actions/auth) from 0.8.0 to 0.8.1.
- [Release notes](https://github.com/google-github-actions/auth/releases)
- [Changelog](https://github.com/google-github-actions/auth/blob/main/CHANGELOG.md)
- [Commits](https://github.com/google-github-actions/auth/compare/v0.8.0...v0.8.1)

---
updated-dependencies:
- dependency-name: google-github-actions/auth
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-09-01 23:48:28 +00:00
Gustavo Valverde bcc325d7f8
ci(auth): retry GCP authentication if fails (#4940)
Previous behavior:
Sometimes Google Cloud authentication fails, this might happen before
IAM permissions are fully propagated

Expected behavior:
If the authentication fails, retry at least 3 times before exiting with
a non zero exit code

Applied solution:
Google GitHub Actions for auth recently added this a `retries` feature
which is now implemented to workaround this issue.

Note: 95a6bc2a27

Fixes https://github.com/ZcashFoundation/zebra/issues/4846
2022-08-24 03:49:55 +00:00
dependabot[bot] 703e621734
build(deps): bump google-github-actions/auth from 0.7.3 to 0.8.0 (#4478)
Bumps [google-github-actions/auth](https://github.com/google-github-actions/auth) from 0.7.3 to 0.8.0.
- [Release notes](https://github.com/google-github-actions/auth/releases)
- [Changelog](https://github.com/google-github-actions/auth/blob/main/CHANGELOG.md)
- [Commits](https://github.com/google-github-actions/auth/compare/v0.7.3...v0.8.0)

---
updated-dependencies:
- dependency-name: google-github-actions/auth
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-05-24 19:16:18 +00:00
dependabot[bot] 2d7b7c2c5b
build(deps): bump google-github-actions/auth from 0.7.2 to 0.7.3 (#4419)
Bumps [google-github-actions/auth](https://github.com/google-github-actions/auth) from 0.7.2 to 0.7.3.
- [Release notes](https://github.com/google-github-actions/auth/releases)
- [Changelog](https://github.com/google-github-actions/auth/blob/main/CHANGELOG.md)
- [Commits](https://github.com/google-github-actions/auth/compare/v0.7.2...v0.7.3)

---
updated-dependencies:
- dependency-name: google-github-actions/auth
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-05-18 21:38:39 +00:00
dependabot[bot] acccb9896c
build(deps): bump google-github-actions/auth from 0.7.1 to 0.7.2 (#4404)
Bumps [google-github-actions/auth](https://github.com/google-github-actions/auth) from 0.7.1 to 0.7.2.
- [Release notes](https://github.com/google-github-actions/auth/releases)
- [Changelog](https://github.com/google-github-actions/auth/blob/main/CHANGELOG.md)
- [Commits](https://github.com/google-github-actions/auth/compare/v0.7.1...v0.7.2)

---
updated-dependencies:
- dependency-name: google-github-actions/auth
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-05-17 20:28:38 +00:00
dependabot[bot] 6c073a9017
build(deps): bump google-github-actions/auth from 0.7.0 to 0.7.1 (#4188)
Bumps [google-github-actions/auth](https://github.com/google-github-actions/auth) from 0.7.0 to 0.7.1.
- [Release notes](https://github.com/google-github-actions/auth/releases)
- [Changelog](https://github.com/google-github-actions/auth/blob/main/CHANGELOG.md)
- [Commits](https://github.com/google-github-actions/auth/compare/v0.7.0...v0.7.1)

---
updated-dependencies:
- dependency-name: google-github-actions/auth
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-04-25 21:47:13 +00:00
dependabot[bot] a613fb1682
build(deps): bump actions/checkout from 3.0.1 to 3.0.2 (#4163)
Bumps [actions/checkout](https://github.com/actions/checkout) from 3.0.1 to 3.0.2.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v3.0.1...v3.0.2)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-04-22 03:00:02 +00:00
dependabot[bot] 90a8401308
build(deps): bump actions/checkout from 3.0.0 to 3.0.1 (#4126)
Bumps [actions/checkout](https://github.com/actions/checkout) from 3.0.0 to 3.0.1.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v3...v3.0.1)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-04-16 02:01:20 +00:00
Gustavo Valverde 831a2009bd
style(ci): lint and standardize the actions structure (#3940)
* style(ci): comply with https://json.schemastore.org/github-workflow.json

Some substituions were harder to make as files were not standardized

* fix(mergify): use correct name for macos

* style(actions): revert to single quotes

* style: lint dependabot and mergify conf files

* style: remove conditions with missing context

* imp(lint): automate GH Actions linting

* fix(lint): some actions need to be triggered by PR event

* fix(lint): consider all workflow YAMLs

* Use the same paths in the patch file

* revert: keep condition as is

* add TODO

* fix: add missing checkpoint_sync input

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2022-04-12 15:06:37 +10:00
dependabot[bot] 47c77f57d1
build(deps): bump google-github-actions/auth from 0.6.0 to 0.7.0 (#4050)
Bumps [google-github-actions/auth](https://github.com/google-github-actions/auth) from 0.6.0 to 0.7.0.
- [Release notes](https://github.com/google-github-actions/auth/releases)
- [Changelog](https://github.com/google-github-actions/auth/blob/main/CHANGELOG.md)
- [Commits](https://github.com/google-github-actions/auth/compare/v0.6.0...v0.7.0)

---
updated-dependencies:
- dependency-name: google-github-actions/auth
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-04-06 19:28:39 +00:00
Gustavo Valverde 39765534f1
fix(actions): use a specific shortening length for SHAs (#3929)
* fix(actions): use a specific shortening length for SHAs

The rlespinasse/github-slug-action now works without checking out the code, reduce time and improving security with following actions.

This requires to specify the GITHUB_SHA_SHORT variable length, as git uses 8 by default, but docker uses 7 by default.

* fix(actions): target correct rlespinasse/github-slug-action version

* fix(actions): just use major version

* fix(actions): github-slug-action is not being correctly referenced
2022-03-21 23:07:01 +00:00
Gustavo Valverde e1eb916b6d
refactor(ci): use improved OIDC for gcloud authentication (#3885)
* refactor(ci): use improved OIDC authentication

* fix(ci): standardize OIDC on all required jobs

* fix: wrong indentation

* fix(ci): remove non existing depency in clean job
2022-03-18 21:25:35 +00:00
dependabot[bot] b0a4e7d487
build(deps): bump google-github-actions/setup-gcloud from 0.5.1 to 0.6.0 (#3814)
Bumps [google-github-actions/setup-gcloud](https://github.com/google-github-actions/setup-gcloud) from 0.5.1 to 0.6.0.
- [Release notes](https://github.com/google-github-actions/setup-gcloud/releases)
- [Changelog](https://github.com/google-github-actions/setup-gcloud/blob/master/CHANGELOG.md)
- [Commits](https://github.com/google-github-actions/setup-gcloud/compare/v0.5.1...v0.6.0)

---
updated-dependencies:
- dependency-name: google-github-actions/setup-gcloud
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-03-10 04:01:20 +00:00
Conrado Gouvea 0d2c7154ea
build(deps): bump actions/checkout from 2.4.0 to 3.0.0 (#3806) 2022-03-09 03:38:38 +00:00
Gustavo Valverde 5004c4d3a1
refactor(build): use OCI Image Format Specification for labels (#3728)
* refactor(build): use OCI Image Format Specification for labels

This should also fix when an image gets built multiple times using the cache, as each image differs in labels

* refactor(tags): use PR context sha and ref

Remove the needed of PR Head SHA and Ref, as those can cause conflict depending on how the branch name has been established
2022-03-04 02:33:29 -04:00
dependabot[bot] 61d3243da5
build(deps): bump google-github-actions/setup-gcloud from 0.5.0 to 0.5.1 (#3560)
Bumps [google-github-actions/setup-gcloud](https://github.com/google-github-actions/setup-gcloud) from 0.5.0 to 0.5.1.
- [Release notes](https://github.com/google-github-actions/setup-gcloud/releases)
- [Changelog](https://github.com/google-github-actions/setup-gcloud/blob/master/CHANGELOG.md)
- [Commits](https://github.com/google-github-actions/setup-gcloud/compare/v0.5.0...v0.5.1)

---
updated-dependencies:
- dependency-name: google-github-actions/setup-gcloud
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2022-02-16 22:21:15 +00:00
Gustavo Valverde 8c07d3906d
fix(actions): allow branches with dots in the name (#3557)
Dependabot creates branches with versions using a dot notation, and some tests fails because of this

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2022-02-16 15:47:02 +00:00
Gustavo Valverde fe2edca1ba
refactor(test): dockerize tests and run sync in detached mode (#3459)
* refactor (cd): overall pipeline improvement

- Use a more ENV configurable Dockerfile
- Remove cloudbuild dependency
- Use compute optimized machine types
- Use SSD instead of normal hard drives
- Move Sentry endpoint to secrets
- Use a single yml for auto & manual deploy
- Migrate to Google Artifact Registry

* refactor (cd): overall pipeline improvement

- Use a more ENV configurable Dockerfile
- Remove cloudbuild dependency
- Use compute optimized machine types
- Use SSD instead of normal hard drives
- Move Sentry endpoint to secrets
- Use a single yml for auto & manual deploy
- Migrate to Google Artifact Registry

* refactor (cd): use newer google auth action

* fix (cd): use newer secret as gcp credential

* fix (docker): do not create extra directories

* fix (docker): ignore .github for caching purposes

* fix (docker): use latest rust

* fix (cd): bump build timeout

* fix: use a better name for manual deployment

* refactor (docker): use standard directories for executable

* fix (cd): most systems expect a "latest" tag

Caching from the latest image is one of the main reasons to add this extra tag. Before this commit, the inline cache was not being used.

* fix (cd): push the build image and the cache separately

The inline cache exporter only supports `min` cache mode. To enable `max` cache mode, push the image and the cache separately by using the registry cache exporter.

This also allows for smaller release images.

* fix (cd): remove unused GHA cache

We're leveraging the registry to cache the actions, instead of using the 10GB limits from Github Actions cache storage

* refactor (cd): use cargo-chef for caching rust deps

* fix: move build system deps before cargo cheg cook

* fix (release): use newer debian to reduce vulnerabilities

* fix (cd): use same zone, region and service accounts

* fix (cd): use same disk size and type for all deployments

* refactor (cd): activate interactive shells

Use interactive shells for manual and test deployments. This allow greater flexibility if troubleshooting is needed inside the machines

* refactor (test): use docker artifact from registry

Instead of using a VM to SSH into in to build and test. Build in GHA (to have the logs available), run the workspace tests in GHA, and just run the sync tests in GCP

Use a cintainer VM with zebra's image directly on it, and pass the needed parameters to run the Sync past mandatory checkpoint.

* tmp (cd): bump timeout for building from scratch

* tmp (test): bump build time

* fix (cd, test): bump build time-out to 210 minutes

* fix (docker): do not build with different settings

Compiling might be slow because different steps are compiling the same code 2-4 times because of the variations

* revert (docker): do not fix the rust version

* fix (docker): build on the root directory

* refactor(docker): Use base image commands and tools

* fix (cd): use correct variables & values, add build concurrency

* fix(cd): use Mainnet instead of mainnet

* imp: remove checkout as Buildkit uses the git context

* fix (docker): just Buildkit uses a .dockerignore in a path

* imp (cd): just use needed variables in the right place

* imp (cd): do not checkout if not needed

* test: run on push

* refactor(docker): reduce build changes

* fix(cd): not checking out was limiting some variables

* refactor(test): add an multistage exclusive for testing

* fix(cd): remove tests as a runtime dependency

* fix(cd): use default service account with cloud-platform scope

* fix(cd): revert checkout actions

* fix: use GA c2 instead of Preview c2d machine types

* fix(actions): remove workflow_dispatch from patched actions

This causes GitHub confusion as it can't determined which of the actions using workflow_dispatch is the right one

* fix(actions): remove patches from push actions

* test: validate changes on each push

* fix(test): wrong file syntax on test job

* fix(test): add missing env parameters

* fix(docker): Do not rebuild to download params and run tests

* fix(test): setup gcloud and loginto artifact just when needed

Try not to rebuild the tests

* fix(test): use GCP container to sync past mandatory checkpoint

* fix(test): missing separators

* test

* fix(test): mount the available disk

* push

* refactor(test): merge disk regeneration into test.yml

* fix(cd): minor typo fixes

* fix(docker): rebuild on .github changes

* fix(cd): keep compatibility with gcr.io

To prevent conflicts between registries, and migrate when the time is right, we'll keep pushing to both registries and use github actions cache to prevent conflicts between artifacts.

* fix(cd): typo and scope

* fix(cd): typos everywhere

* refactor(test): use smarter docker wait and keep old registry

* fix(cd): do not constraint the CPUs for bigger machines

* revert(cd): reduce PR diff as there's a separate one for tests

* fix(docker): add .github as it has no impact on caching

* fix(test): run command correctly

* fix(test): wiat and create image if previous step succeded

* force rebuild

* fix(test): do not restrict interdependant steps based on event

* force push

* feat(docker): add google OS Config agent

Use a separate step to have better flexibility in case a better approach is available

* fix(test): remove all hardoced values and increase disks

* fix(test): use correct commands on deploy

* fix(test): use args as required by google

* fix(docker): try not to invalidate zebrad download cache

* fix(test): minor typo

* refactor(test): decouple jobs for better modularity

This also allows faster tests as testing Zunstable won't be a dependency and it can't stop already started jobs if it fails.

* fix(test): Do not try to execute ss and commands in one line

* fix(test): do not show undeeded information in the terminal

* fix(test): sleep befor/after machine creation/deletion

* fix(docker): do not download zcash params twice

* feat(docker): add google OS Config agent

Use a separate step to have better flexibility in case a better approach is available

* merge: docker-actions-refactor into docker-test-refactor

* test docker wait scenarios

* fix(docker): $HOME variables is not being expanded

* fix(test): allow docker wait to work correctly

* fix(docker): do not use variables while using COPY

* fix(docker): allow to use zebrad as a command

* fix(cd): use test .yml from main

* fix(cd): Do not duplicate network values

The Dockerfile has an ARG with a default value of 'Mainnet', if this value is changed it will be done manually on a workflow_dispatch, making the ENV option a uneeded duplicate in this workflow

* fix(test): use bigger machine type for compute intensive tasks

* refactor(test): add tests in CI file

* fix(test): remove duplicated tests

* fix(test): typo

* test: build on .github changes temporarily

* fix(test): bigger machines have no effect on sync times

* feat: add an image to inherit from with zcash params

* fix(cd): use the right image name and allow push to test

* fix(cd): use the right docker target and remove extra builds

* refactor(docker): use cached zcash params from previous build

* fix(cd): finalize for merging

* imp(cd): add double safety measure for production

* fix(cd): use specific SHA for containers

* fix(cd): use latest gcloud action version

* fix(test): use the network as Mainnet and remove the uppercase from tests

* fix(test): run disk regeneration on specific file change

Just run this regeneration when changing the following files:

https://github.com/ZcashFoundation/zebra/blob/main/zebra-state/src/service/finalized_state/disk_format.rs
https://github.com/ZcashFoundation/zebra/blob/main/zebra-state/src/service/finalized_state.rs
https://github.com/ZcashFoundation/zebra/blob/main/zebra-state/src/constants.rs

* refactor(test): seggregate disks regeneration from tests

Allow to regenerate disks without running tests, and to run tests from previous disk regeneration.

Disk will be regenerated just if specific files were changed, or triggered manually.

Tests will run just if a disk regeneration was not manually triggered.

* fix(test): gcp disks require lower case conventions

* fix(test): validate logs being emmited by docker

GHA is transforming is somehow transforwing the variable to lowercase also, so we're changint it to adapt to it

* test

* fix(test): force tty terminal

* fix(test): use a one line command to test terminal output

* fix(test): always delete test instance

* fix(test): use short SHA from the PR head

Using the SHA from the base, creates confusion and it's not accurate with the SHA being shown and used on GitHub.

We have to keep both as manual runs with `workflow_dispatch` does not have a PR SHA

* fix(ci): do not trigger CI on docker changes

There's no impact in this workflow when a change is done in the dockerfile

* Instead of runing cargo test when the instance gets created, run this commands afterwards in a different step.

As GHA TTY is not working as expected, and workarounds does not play nicely with `gcloud compute ssh` actions/runner#241 (comment) we decided to get the container name from the logs, log directly to the container and run the cargo command from there.

* doc(test): document reasoning for new steps

* fix(test): increase machine type and ssh timeout

* fix(test): run tests on creation and follow container logs

This allows to follow logs in Github Actions terminal, while the GCP container is still running.

Just delete the instance when following the logs ends successfully or fails

* finalize(test): do not rebuild image when changing actions

* fix(test): run tests on creation and follow container logs

This allows to follow logs in Github Actions terminal, while the GCP container is still running.

Just delete the instance when following the logs ends successfully or fails

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2022-02-16 00:54:16 +00:00
Gustavo Valverde a872f1727a
refactor(cd): improve Docker and gcloud usage without Cloud Build (#3431)
* refactor (cd): overall pipeline improvement

- Use a more ENV configurable Dockerfile
- Remove cloudbuild dependency
- Use compute optimized machine types
- Use SSD instead of normal hard drives
- Move Sentry endpoint to secrets
- Use a single yml for auto & manual deploy
- Migrate to Google Artifact Registry

* refactor (cd): overall pipeline improvement

- Use a more ENV configurable Dockerfile
- Remove cloudbuild dependency
- Use compute optimized machine types
- Use SSD instead of normal hard drives
- Move Sentry endpoint to secrets
- Use a single yml for auto & manual deploy
- Migrate to Google Artifact Registry

* refactor (cd): use newer google auth action

* fix (cd): use newer secret as gcp credential

* fix (docker): do not create extra directories

* fix (docker): ignore .github for caching purposes

* fix (docker): use latest rust

* fix: use a better name for manual deployment

* refactor (docker): use standard directories for executable

* fix (cd): most systems expect a "latest" tag

Caching from the latest image is one of the main reasons to add this extra tag. Before this commit, the inline cache was not being used.

* fix (cd): push the build image and the cache separately

The inline cache exporter only supports `min` cache mode. To enable `max` cache mode, push the image and the cache separately by using the registry cache exporter.

This also allows for smaller release images.

* fix (cd): remove unused GHA cache

We're leveraging the registry to cache the actions, instead of using the 10GB limits from Github Actions cache storage

* refactor (cd): use cargo-chef for caching rust deps

* fix (release): use newer debian to reduce vulnerabilities

* fix (cd): use same zone, region and service accounts

* fix (cd): use same disk size and type for all deployments

* refactor (cd): activate interactive shells

Use interactive shells for manual and test deployments. This allow greater flexibility if troubleshooting is needed inside the machines

* fix (docker): do not build with different settings

Compiling might be slow because different steps are compiling the same code 2-4 times because of the variations

* fix(cd): use Mainnet instead of mainnet

* fix(docker): remove tests as a runtime dependency

* fix(cd): use default service account with cloud-platform scope

* fix(cd): keep compatibility with gcr.io

To prevent conflicts between registries, and migrate when the time is right, we'll keep pushing to both registries and use github actions cache to prevent conflicts between artifacts.

* fix(docker): do not download zcash params twice

* feat(docker): add google OS Config agent

Use a separate step to have better flexibility in case a better approach is available

* fix(docker): allow to use zebrad as a command

* feat: add an image to inherit from with zcash params

* refactor(docker): use cached zcash params from previous build

* imp(cd): add double safety measure for production
2022-02-08 20:50:13 -04:00
dependabot[bot] 35222fb30f
Bump google-github-actions/setup-gcloud from 0.4.0 to 0.5.0 (#3471)
Bumps [google-github-actions/setup-gcloud](https://github.com/google-github-actions/setup-gcloud) from 0.4.0 to 0.5.0.
- [Release notes](https://github.com/google-github-actions/setup-gcloud/releases)
- [Changelog](https://github.com/google-github-actions/setup-gcloud/blob/master/CHANGELOG.md)
- [Commits](https://github.com/google-github-actions/setup-gcloud/compare/v0.4.0...v0.5.0)

---
updated-dependencies:
- dependency-name: google-github-actions/setup-gcloud
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2022-02-08 10:37:26 +00:00
Gustavo Valverde 5fa40216df
refactor (actions): make better use of variables, secrets and versions (#3393)
* style: use global variables and don't double print

Remove repeated instances of global environment variables. Do not print ENV variables on the terminal as GitHub Actions already shows it.

* fix (actions): Use fixed major versions for actions

As actions get recurrent fixes, using a specific version causes more maintance on the pipelines.

On the other hand, using @master versions could make some action unreliable, as breaking changes might be included without further notice, and even change behavior on a daily basis.

* refactor: make better use of ENV variables

A whole step with refex was being used to extract different variables from GitHub's environment. This gets depecrated in favor of using `rlespinasse/github-slug-action@v4` which has slug URL variables.

A SLUG on a variable will:
- put the variable content in lower case
- replace any character by - except 0-9, a-z, ., and _
- remove leading and trailing - character
- limit the string size to 63 characters

This changes also takes care of using the Head or Base branch for deployments. This will allow us tomerge of workflows, as most steps on this deployment actions are very similar, with little variations between workflows.

* fix (actions): use secrets for sensitive information

* revert: use specific versions for dependabot

Reverting commit 8c93409902
2022-01-26 21:46:18 -04:00
dependabot[bot] bdf5f70557
Bump actions/checkout from 2.3.5 to 2.4.0 (#3009)
Bumps [actions/checkout](https://github.com/actions/checkout) from 2.3.5 to 2.4.0.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v2.3.5...v2.4.0)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: teor <teor@riseup.net>
2021-11-05 15:08:39 +10:00
dependabot[bot] 0b25257bef
Bump actions/checkout from 2.3.4 to 2.3.5 (#2898)
Bumps [actions/checkout](https://github.com/actions/checkout) from 2.3.4 to 2.3.5.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v2.3.4...v2.3.5)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: teor <teor@riseup.net>
2021-10-19 04:03:10 +00:00
teor 5684667a31
Update to google-github-actions/setup-gcloud in workflows (#2533)
* Update to google-github-actions/setup-gcloud in workflows

See https://github.com/google-github-actions/setup-gcloud#use-google-github-actionssetup-gcloud

* Also update the Google Cloud test workflow

* Also update regenerate stateful test disks

* Also update Manual Deploy

* Also update zcashd deploy
2021-07-27 12:13:04 -04:00
teor dd7747bc69
Security: Remove checkout credentials from GitHub actions (#2158)
* Remove checkout credentials from CD action
* Remove checkout credentials from CI action
* Remove checkout credentials from coverage action
* Remove checkout credentials from docs action
* Remove checkout credentials from manual deploy action
* Remove checkout credentials from test action
* Remove checkout credentials from zcashd action
2021-05-17 09:32:38 +10:00
dependabot[bot] e4ed072c28
build(deps): bump actions/checkout from 2 to 2.3.4 (#2143)
Bumps [actions/checkout](https://github.com/actions/checkout) from 2 to 2.3.4.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v2...v2.3.4)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-05-13 07:51:12 +10:00