Commit Graph

31 Commits

Author SHA1 Message Date
Thomas Eizinger
d26df944c0 ci: reference GitHub actions by hash (#7724)
To improve supply-chain security, reference all GitHub actions using the
hash of the released tag. GitHub recommends to do this for third-party
actions
(https://docs.github.com/en/actions/security-for-github-actions/security-guides/security-hardening-for-github-actions#using-third-party-actions).
In order to make our CI more deterministic, I opted to do it for all our
actions. This means any change to our workflow configuration requires a
source code change and thus passing CI on our end.

Dependabot will automatically issue PRs for these actions and update the
comment with the new version next to them.

Resolves: #2497.
2025-01-12 17:35:52 +00:00
dependabot[bot]
7a4a1cccc3 build(deps): Bump hashicorp/tfc-workflows-github from 1.3.1 to 1.3.2 (#7622)
Bumps
[hashicorp/tfc-workflows-github](https://github.com/hashicorp/tfc-workflows-github)
from 1.3.1 to 1.3.2.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/hashicorp/tfc-workflows-github/releases">hashicorp/tfc-workflows-github's
releases</a>.</em></p>
<blockquote>
<h2>v1.3.2</h2>
<ul>
<li>Bug fixes and enhancements from <a
href="https://github.com/hashicorp/tfc-workflows-tooling/releases/tag/v1.3.2">tfc-workflows-tooling@v1.3.2</a></li>
</ul>
</blockquote>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/hashicorp/tfc-workflows-github/blob/main/CHANGELOG.md">hashicorp/tfc-workflows-github's
changelog</a>.</em></p>
<blockquote>
<h1>v1.3.2</h1>
<ul>
<li>Bug fixes and enhancements from <a
href="https://github.com/hashicorp/tfc-workflows-tooling/releases/tag/v1.3.2">tfc-workflows-tooling@v1.3.2</a></li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="8e08d1ba95"><code>8e08d1b</code></a>
Prepare v1.3.2 release (<a
href="https://redirect.github.com/hashicorp/tfc-workflows-github/issues/2981">#2981</a>)</li>
<li><a
href="2a0a556cba"><code>2a0a556</code></a>
[COMPLIANCE] Update MPL-2.0 LICENSE (<a
href="https://redirect.github.com/hashicorp/tfc-workflows-github/issues/2980">#2980</a>)</li>
<li><a
href="b15578fa52"><code>b15578f</code></a>
Merge pull request <a
href="https://redirect.github.com/hashicorp/tfc-workflows-github/issues/2976">#2976</a>
from salilsub/main</li>
<li><a
href="030a2307e5"><code>030a230</code></a>
Adding GITHUB_TOKEN link to README</li>
<li><a
href="833d60e689"><code>833d60e</code></a>
Adding information about setting the GITHUB_TOKEN permissions</li>
<li>See full diff in <a
href="https://github.com/hashicorp/tfc-workflows-github/compare/v1.3.1...v1.3.2">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=hashicorp/tfc-workflows-github&package-manager=github_actions&previous-version=1.3.1&new-version=1.3.2)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-01-02 18:25:43 +00:00
Jamil
6f7f6a4f34 style: Enforce code style across all supported languages using Prettier (#7322)
This ensure that we run prettier across all supported filetypes to check
for any formatting / style inconsistencies. Previously, it was only run
for files in the website/ directory using a deprecated pre-commit
plugin.

The benefit to keeping this in our pre-commit config is that devs can
optionally run these checks locally with `pre-commit run --config
.github/pre-commit-config.yaml`.

---------

Signed-off-by: Jamil <jamilbk@users.noreply.github.com>
Co-authored-by: Thomas Eizinger <thomas@eizinger.io>
2024-11-13 00:19:15 +00:00
dependabot[bot]
43b8a97ee1 build(deps): Bump hashicorp/tfc-workflows-github from 1.3.0 to 1.3.1 (#6118)
Bumps
[hashicorp/tfc-workflows-github](https://github.com/hashicorp/tfc-workflows-github)
from 1.3.0 to 1.3.1.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/hashicorp/tfc-workflows-github/releases">hashicorp/tfc-workflows-github's
releases</a>.</em></p>
<blockquote>
<h2>v1.3.1</h2>
<ul>
<li>Bug fixes and enhancements from <a
href="https://github.com/hashicorp/tfc-workflows-tooling/releases/tag/v1.3.1">tfc-workflows-tooling@v1.3.1</a></li>
<li>Compiles for Linux regardless of current CPU architecture when using
the provided Dockerfile by <a
href="https://github.com/ggambetti"><code>@​ggambetti</code></a> <a
href="https://redirect.github.com/hashicorp/tfc-workflows-tooling/pull/113">hashicorp/tfc-workflows-tooling#113</a></li>
</ul>
</blockquote>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/hashicorp/tfc-workflows-github/blob/main/CHANGELOG.md">hashicorp/tfc-workflows-github's
changelog</a>.</em></p>
<blockquote>
<h1>v1.3.1</h1>
<ul>
<li>Bug fixes and enhancements from <a
href="https://github.com/hashicorp/tfc-workflows-tooling/releases/tag/v1.3.1">tfc-workflows-tooling@v1.3.1</a></li>
<li>Compiles for Linux regardless of current CPU architecture when using
the provided Dockerfile by <a
href="https://github.com/ggambetti"><code>@​ggambetti</code></a> <a
href="https://redirect.github.com/hashicorp/tfc-workflows-tooling/pull/113">hashicorp/tfc-workflows-tooling#113</a></li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="5bd1031f2e"><code>5bd1031</code></a>
Merge pull request <a
href="https://redirect.github.com/hashicorp/tfc-workflows-github/issues/2974">#2974</a>
from hashicorp/release/v1.3.1</li>
<li><a
href="b2e72f369d"><code>b2e72f3</code></a>
fix: link in changelog entry</li>
<li><a
href="29b0596744"><code>29b0596</code></a>
prepare v1.3.1 release</li>
<li><a
href="3fa28309b9"><code>3fa2830</code></a>
Merge pull request <a
href="https://redirect.github.com/hashicorp/tfc-workflows-github/issues/2950">#2950</a>
from lucymhdavies/patch-1</li>
<li><a
href="485f3828af"><code>485f382</code></a>
Correct links to starter workflow templates</li>
<li><a
href="0207987bdb"><code>0207987</code></a>
Merge pull request <a
href="https://redirect.github.com/hashicorp/tfc-workflows-github/issues/1675">#1675</a>
from hashicorp/mjyocca/disable-workflows</li>
<li><a
href="0c302783ed"><code>0c30278</code></a>
chore: disable sync workflow</li>
<li><a
href="9d17c9cb09"><code>9d17c9c</code></a>
Merge pull request <a
href="https://redirect.github.com/hashicorp/tfc-workflows-github/issues/45">#45</a>
from hashicorp/TF-11430/rebrand</li>
<li><a
href="a39678613f"><code>a396786</code></a>
docs: update workflow file refs to HCP Terraform</li>
<li><a
href="b793b8fe2e"><code>b793b8f</code></a>
chore: rename workflow filenames</li>
<li>Additional commits viewable in <a
href="https://github.com/hashicorp/tfc-workflows-github/compare/v1.3.0...v1.3.1">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=hashicorp/tfc-workflows-github&package-manager=github_actions&previous-version=1.3.0&new-version=1.3.1)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

You can trigger a rebase of this PR by commenting `@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

> **Note**
> Automatic rebases have been disabled on this pull request as it has
been open for over 30 days.

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-09-17 16:12:42 -06:00
Jamil
9d8a15ebee ci: Use the same version of buildx for building, tagging, and merging images (#6066)
In debugging https://firezone.statuspage.io/incidents/3vjmjmbh92mw, we
realized that we use potentially different versions of buildx. This PR
fixes that.
2024-07-30 15:05:09 +00:00
Jamil
1b7338e5c3 fix(website): fix sha of deployed portal (#5782)
Needs a storage key, not an env var to read.
2024-07-06 17:25:00 -07:00
Jamil
3b0f54ec3c ci: Push infra images to ghcr.io (#5669)
Fixes #5447

---------

Signed-off-by: Jamil <jamilbk@users.noreply.github.com>
2024-07-03 19:36:06 +00:00
Jamil
2d7162aa7b feat(website): Add deployed sha to changelog page (#5520)
It would be good to track the currently deployed SHA in production.

refs #5447
2024-06-24 14:02:01 -07:00
Jamil
1974ef9332 fix(infra): Copy artifacts from github.sha to edge in prod when deploying (#5416)
This will allow us to run prod smoke tests using the `SHA` from `main`
when deploying, without having to release/publish the Gateway first.


Fixes this issue seen in logs:

```
{
  "insertId": "tz43hng1m3lbbe",
  "jsonPayload": {
    "message": "Jun 17 22:36:57 gateway-cn9m firezone-gateway-init[3413]: curl: (22) The requested URL returned error: 404"
  },
  "resource": {
    "type": "gce_instance",
    "labels": {
      "project_id": "firezone-prod",
      "zone": "us-east1-d",
      "instance_id": "8536982484474988766"
    }
  },
  "timestamp": "2024-06-17T22:36:57.601613147Z",
  "labels": {
    "compute.googleapis.com/resource_name": "gateway-cn9m"
  },
  "logName": "projects/firezone-prod/logs/syslog",
  "receiveTimestamp": "2024-06-17T22:36:57.745513999Z"
},
{
  "insertId": "tz43hng1m3lbbd",
  "jsonPayload": {
    "message": "Jun 17 22:36:57 gateway-cn9m firezone-gateway-init[3411]: Downloading 6c310610f3 version from https://storage.googleapis.com/firezone-prod-artifacts/firezone-gateway..."
  },
  "resource": {
    "type": "gce_instance",
    "labels": {
      "project_id": "firezone-prod",
      "zone": "us-east1-d",
      "instance_id": "8536982484474988766"
    }
  },
  "timestamp": "2024-06-17T22:36:57.501343894Z",
  "labels": {
    "compute.googleapis.com/resource_name": "gateway-cn9m"
  },
  "logName": "projects/firezone-prod/logs/syslog",
  "receiveTimestamp": "2024-06-17T22:36:57.745513999Z"
}
```
2024-06-17 18:29:06 -07:00
Jamil
bcccd1cae6 ci: Auth to GCP before copying artifacts (#5405) 2024-06-17 10:43:04 -07:00
Jamil
7c20243733 fix(ci): Copy artifacts to prod on publish, not deploy (#5388)
Fixes hopefully the last remaining issue from #4397 


Fixes #5370
2024-06-17 07:30:53 -07:00
Jamil
7e533c42f8 refactor: Split releases for Clients and Gateways (#5287)
- Removes version numbers from infra components (elixir/relay)
- Removes version bumping from Rust workspace members that don't get
published
- Splits release publishing into `gateway-`, `headless-client-`, and
`gui-client-`
- Removes auto-deploying new infrastructure when a release is published.
Use the Deploy Production workflow instead.

Fixes #4397
2024-06-10 16:47:49 +00:00
Jamil
7c5669ef51 chore: bump version to 1.0.5 for linux/windows (#5093)
Just need a rubberstamp. This was generated with `make -f
scripts/Makefile version`
2024-05-22 18:25:12 +00:00
Andrew Dryga
687bebd4b4 Move GCP deployments to separate GitHub environments 2024-05-14 16:10:56 -06:00
Jamil
e50b3bd865 chore: bump versions for 1.0.4 release (#4985)
Update download links etc for the 1.0.4 release
2024-05-14 16:11:12 +00:00
Andrew Dryga
67356650d7 Try to use deployment environments 2024-05-13 14:43:25 -06:00
Andrew Dryga
5167e15b74 Also copy versioned binaries to prod when deploying 2024-05-13 14:05:24 -06:00
Andrew Dryga
ddbe84bd26 Fix typo in hotfix inputs 2024-05-13 13:37:39 -06:00
Andrew Dryga
d4c5fef5ee Copy images before deploying production 2024-05-13 13:36:05 -06:00
Jamil
1be77d4e2d chore: Bump versions to link 1.0.3 packages (#4924)
Link to latest binaries

Generated with `make -f scripts/Makefile`.

Just need a rubber-stamp, changes should be GTG
2024-05-08 21:09:50 +00:00
dependabot[bot]
61a2d3b78a build(deps): Bump hashicorp/tfc-workflows-github from 1.2.0 to 1.3.0 (#4841)
Bumps
[hashicorp/tfc-workflows-github](https://github.com/hashicorp/tfc-workflows-github)
from 1.2.0 to 1.3.0.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/hashicorp/tfc-workflows-github/releases">hashicorp/tfc-workflows-github's
releases</a>.</em></p>
<blockquote>
<h2>v1.3.0</h2>
<ul>
<li>Adds support for <code>target</code> input for
<code>create-run</code> action by <a
href="https://github.com/trutled3"><code>@​trutled3</code></a> <a
href="https://redirect.github.com/hashicorp/tfc-workflows-tooling/pull/97">#97</a></li>
<li>Bug fixes and enhancements from <a
href="https://github.com/hashicorp/tfc-workflows-tooling/releases/tag/v1.3.0">tfc-workflows-tooling@v1.3.0</a></li>
</ul>
</blockquote>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/hashicorp/tfc-workflows-github/blob/main/CHANGELOG.md">hashicorp/tfc-workflows-github's
changelog</a>.</em></p>
<blockquote>
<h1>v1.3.0</h1>
<ul>
<li>Adds support for <code>target</code> input for
<code>create-run</code> action by <a
href="https://github.com/trutled3"><code>@​trutled3</code></a> <a
href="https://redirect.github.com/hashicorp/tfc-workflows-tooling/pull/97">#97</a></li>
<li>Bug fixes and enhancements from <a
href="https://github.com/hashicorp/tfc-workflows-tooling/releases/tag/v1.3.0">tfc-workflows-tooling@v1.3.0</a></li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="34866d21f6"><code>34866d2</code></a>
Prepare v1.3.0 release (<a
href="https://redirect.github.com/hashicorp/tfc-workflows-github/issues/43">#43</a>)</li>
<li>See full diff in <a
href="https://github.com/hashicorp/tfc-workflows-github/compare/v1.2.0...v1.3.0">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=hashicorp/tfc-workflows-github&package-manager=github_actions&previous-version=1.2.0&new-version=1.3.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-05-05 13:58:16 +00:00
Jamil
4dc656c90a chore(ci): bump versions (#4840) 2024-04-30 16:31:20 -07:00
Jamil
b79ce96bc6 chore(website): Bump versions (#4821)
- Bump versions to point to latest binaries
- Stage versions for next release
2024-04-29 22:06:00 +00:00
Jamil
5dc52edecc ci: Bump versions and fix release overwrites (#4769) 2024-04-24 11:43:19 -07:00
Andrew Dryga
e60fd1c665 Add global concurrency group to production deployments 2024-04-16 11:59:28 -06:00
Jamil
f73508e40d fix(gateway): Publish all platforms for Gateway, not just amd64 (#4459)
Fixes #4458
2024-04-03 00:18:30 +00:00
Andrew Dryga
a85b9ab185 chore(infra): Deploy domain app on a separate instance and enable background jobs on it (#4160)
Closes #3801
2024-03-16 08:58:20 -06:00
Jamil
b1871ea24d Fix typo in _deploy_production.yml (#4113) 2024-03-12 17:02:20 -07:00
Jamil
574585d146 chore(ci): Add debug/ and perf/ prefix to some images (#4104)
Followup from #4100:


- Add `perf/relay` and `debug/relay` etc data plane images in
`firezone-staging`.
- The `perf` images are `debug` stage images and have tooling installed,
but use release binaries.
- The `debug` images are `debug` binaries inside `debug` images
- `firezone-prod` contains only release binaries -- these image names
haven't changed
2024-03-12 20:27:32 +00:00
Jamil
eb01de0285 chore(ci): Use tool versions action to parse terraform version (#4076)
Extracted from feedback on #4049
2024-03-12 17:13:31 +00:00
Jamil
6575e0ca26 chore(ci): Refactor CI to use prod images in staging and prevent accidental hotfix breakages (#4049)
- Runs release asset builds simultaneously with `deploy-staging`. Those
don't depend on each other.
- Prevents running some build workflows in CD because they're run
already in the PR and in the merge group, and the risk of semantic
conflict is negligible
- Run `release` assets in staging
- Adds `compatibility_tests`: **To successfully introduce a breaking
change in the control / data plane APIs, you must now "Merge as
Administrator"**
- Since `CI` is no longer run on `main`, caching needed to be refactored
to make sense again
- Since `CI` is no longer run on `main`, the Elixir
`migrations_and_seeds_test` had to be rewritten. This now tests
migrations using `git checkout` instead of importing `main`'s DB dump.
- Move tauri builds to its own workflow so we can trigger Linux and
Windows builds manually on an adhoc basis like we do for the Swift and
Kotlin builds
- Add a new `hotfix` workflow that will run `compatibility_tests` with
the latest published images
- Add `workflow_dispatch` to trigger `CD` manually for testing purposes
(cc @ReactorScram)


Refs #3995
2024-03-11 20:01:34 +00:00