Commit Graph

57 Commits

Author SHA1 Message Date
Daniel Bennett
3ed91193ec ci: windows 2022 runners (upcoming 2019 eol) (#25984)
fix for:
> This is a scheduled Windows Server 2019 brownout.
> The Windows Server 2019 image will be removed on 2025-06-30.
> For more details, see actions/runner-images#12045
2025-06-04 16:55:41 -04:00
James Rasell
c85c723336 ci: Run core tests groups workflow on amd64 and arm64 runners. (#25695) 2025-04-17 15:16:29 +01:00
James Rasell
c44f847cbb ci: Compile on Ubuntu arm64 within core test workflow. (#25692)
Nomad is released as a Linux arm64 binary, so having a compilation
step on this OS/ARCH within our core test workflow will help
ensure basic arm64 problems do not get into our release branches.
2025-04-17 07:46:49 +01:00
Piotr Kazmierczak
b26995c3d5 ci: migrate runners to ubuntu-22.04 (#25651)
* ci: migrate runners to ubuntu-22.04
* find a supported build for custom-linux-xl
2025-04-14 16:12:10 -04:00
James Rasell
0a29c2f017 ci: Use custom runner for core tests with more CPU and memory. (#25475) 2025-03-21 13:52:36 +00:00
James Rasell
7b156e928a github: Update Vault and Consul versions used in core workflow. (#25287) 2025-03-07 07:20:24 +00:00
James Rasell
ec0cf86a37 github: update numerous workflow dependencies (#25160) 2025-02-20 08:32:29 +00:00
dependabot[bot]
08c72b0e07 chore(deps): bump actions/setup-go from 5.1.0 to 5.2.0 (#24670)
Bumps [actions/setup-go](https://github.com/actions/setup-go) from 5.1.0 to 5.2.0.
- [Release notes](https://github.com/actions/setup-go/releases)
- [Commits](41dfa10bad...3041bf56c9)

---
updated-dependencies:
- dependency-name: actions/setup-go
  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>
2025-01-08 12:26:32 +01:00
James Rasell
e3ac00f30e github: notify Slack when CI fails on merge to main/release (#24690)
This change creates a reusable workflow for notifying Slack on CI
failures. The message will include useful links and information
about the failure, so product engineers can investigate and fix
any problems.

The new workflow is used by selected workflows which trigger on
merges to main or release/* branches. The notification is only
sent on failure and when the event was a push (PR merge) meaning
the number of notifications should be minimal.

The aim is to help identify and draw attention to failure across
our release branches, in particular when automated processes
happen.
2024-12-18 08:07:44 +00:00
dependabot[bot]
f75e2c276e chore(deps): bump actions/checkout from 4.2.1 to 4.2.2 (#24298) 2024-11-04 11:42:37 +00:00
dependabot[bot]
2df473c561 chore(deps): bump actions/setup-go from 5.0.2 to 5.1.0 (#24299)
Bumps [actions/setup-go](https://github.com/actions/setup-go) from 5.0.2 to 5.1.0.
- [Release notes](https://github.com/actions/setup-go/releases)
- [Commits](0a12ed9d6a...41dfa10bad)

---
updated-dependencies:
- dependency-name: actions/setup-go
  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>
2024-10-28 11:26:29 +01:00
dependabot[bot]
294ebd1540 chore(deps): bump actions/checkout from 4.2.0 to 4.2.1 (#24183)
Bumps [actions/checkout](https://github.com/actions/checkout) from 4.2.0 to 4.2.1.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](d632683dd7...eef61447b9)

---
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>
2024-10-14 08:26:34 -05:00
dependabot[bot]
52b2711874 chore(deps): bump actions/checkout from 4.1.7 to 4.2.0 (#24083)
Bumps [actions/checkout](https://github.com/actions/checkout) from 4.1.7 to 4.2.0.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](692973e3d9...d632683dd7)

---
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>
2024-09-30 08:11:54 -05:00
Seth Hoenig
8bb94ec32d WIP: try less hard to cache go modules (#24016) 2024-09-20 09:37:13 -05:00
Seth Hoenig
68ecf67c99 ci: (ent) specify instance types when using self hosted runners (#24015) 2024-09-20 07:53:34 -05:00
Seth Hoenig
0bcfd9a266 build: apt update before apt install (#23806) 2024-08-14 08:58:15 -05:00
Charlie Voiselle
9bdaab4f9c [actions] Update projects GitHub actions (#23483)
* Updated actions

* actions/checkout v4.1.1 ==> v4.1.7
* actions/download-artifact v3.0.2 ==> v4.1.7
* actions/setup-go v4.0.1 ==> v5.0.1
* actions/setup-node v3.7.0 ==> v4.0.2
* actions/upload-artifact v3.1.2 ==> v4.3.3
* andstor/file-existence-action v2.0.0 ==> v3.0.0
* browser-actions/setup-chrome v1.2.0 ==> v1.7.1
* dessant/lock-threads v4.0.1 ==> v5.0.1
* marocchino/sticky-pull-request-comment v2.6.2 ==> v2.9.0
* mshick/add-pr-comment v2.8.1 ==> v2.8.2
* nanasess/setup-chromedriver v2.1.2 ==> v2.2.2
* slackapi/slack-github-action v1.24.0 ==> v1.26.0

* Update HashiCorp actions

* hashicorp/actions-docker-build v1 ==> v2.0.0
* hashicorp/actions-generate-metadata v1.1.1 ==> v1.1.1(pinned)
* hashicorp/actions-packaging-linux v1 ==> v1.8.0
* hashicorp/setup-copywrite v1.1.2 ==> v1.1.3

* fix parameter
2024-07-01 22:32:10 -04:00
Tim Gross
eedbd36fef qemu: pass task resources into driver for cgroup setup (#23466)
As part of the work for 1.7.0 we moved portions of the task cgroup setup down
into the executor. This requires that the executor constructor get the
`TaskConfig.Resources` struct, and this was missing from the `qemu` driver. We
fixed a panic caused by this change in #19089 before we shipped, but this fix
was effectively undo after we added plumbing for custom cgroups for `raw_exec`
in 1.8.0. As a result, running `qemu` tasks always fail on Linux.

This was undetected in testing because our CI environment doesn't have QEMU
installed. I've got all the unit tests running locally again and have added QEMU
installation when we're running the drivers tests.

Fixes: https://github.com/hashicorp/nomad/issues/23250
2024-07-01 11:41:10 -04:00
Dianne Laguerta
cabdd7eddb migrate GHA workflows to using single runner labels (#20581) 2024-05-16 13:35:10 +01:00
Seth Hoenig
06a4fcb7d5 build: update the actions/checkout version (#20067) 2024-03-04 13:01:38 -06:00
Seth Hoenig
a66f7ba888 ci: update macos runners to macos-14 (apple silicon) (#20054) 2024-02-29 14:31:59 -06:00
Seth Hoenig
0c08f94c8e build: use setup-golang@v3 to handle auto caching (#19707)
* wip: try on branch

* build: use setup-golang@v3 to handle auto caching
2024-01-11 08:51:56 -06:00
Seth Hoenig
23e5ffbfd0 build: bump setup-golang action version to v2 (#19568) 2024-01-02 09:41:50 -06:00
Seth Hoenig
77e139ea25 build: use modtool to format go.mod file (#18195) 2023-08-15 07:26:46 -05:00
Tim Gross
b17c0f7ff9 GHA pinning updates (#18093)
Trusted Supply Chain Component Registry (TSCCR) enforcement starts Monday and an
internal report shows our semgrep action is pinned to a version that's not
currently permitted. Update all the action versions to whatever's the new
hotness to maximum the time-to-live on these until we have automated pinning
setup.

Also version bumps our chromedriver action, which randomly broke upstream today.
2023-07-28 11:49:57 -04:00
Daniel Bennett
243429be11 ci: pull secrets from Vault in nomad-enterprise (#17841) 2023-07-07 14:27:12 -05:00
Daniel Bennett
4738d305c5 ci: dynamic runs-on values for oss/ent (#17775)
so in enterprise we can use Vault for secrets,
without merge conflicts from oss->ent.

also:
* use hashicorp/setup-golang
* setup-js for self-hosted runners
  they don't come with yarn, nor chrome,
  and might not always match node version.
2023-07-06 12:41:17 -05:00
Luiz Aoqui
354e4b2ef2 ci: run 'make check' as reusable workflow (#17600)
Some of the paths ignored by `test-core.yaml` need to be checked by
`make check`. The `checks.yaml` workflow run on these paths and can also
be used as a reusable workflow.
2023-06-20 08:17:13 +01:00
hc-github-team-es-release-engineering
e41b99b6d3 ci: finish migration from CCI to GHA (#17103)
namely, these workflows:
  test-e2e, test-ui, and test-windows

extra-curricularly, as part of the overall
migration effort company-wide, this also includes
some standardization such as:
 * explicit permissions:read on various workflows
 * pinned action version shas (per https://github.com/hashicorp/security-public-tsccr)
 * actionlint, which among other things runs
   shellcheck on GHA run steps

Co-authored-by: emilymianeil <eneil@hashicorp.com>
Co-authored-by: Daniel Kimsey <daniel.kimsey@hashicorp.com>
2023-06-02 14:35:55 -05:00
hashicorp-tsccr[bot]
1b7668c17f build: trusted workflow pinning (#16992)
Co-authored-by: Tim Gross <tgross@hashicorp.com>
2023-05-17 10:38:10 -04:00
Seth Hoenig
e1dfaddf5c tests: reduce timeout on test-api (#16107)
Sometimes GHA gets wedged, and there is no need to waste 30 minutes
on a job that usually takes < 3.

e.g. stuck loading module cache, which is out of our control
https://github.com/hashicorp/nomad/actions/runs/4135098558/jobs/7147128419
2023-02-09 10:26:10 -06:00
Seth Hoenig
4a7a721ef5 tests: bump consul and vault versions in test-core (#15979) 2023-01-31 10:00:27 -06:00
Tim Gross
21f72137e7 CI: run tests on pull_request and push to main/release (#15690)
Running tests `on: push` prevents GitHub from showing the workflow approval
button, which prevents tests from being run on community-contributed (or even
just non-Nomad HashiCorp folks) PRs. Running `on: pull_request` automatically
picks up opened, reopened, and synchronize hooks (where "synchronize" means a
push to HEAD on the PR's branch, so that'll pick up rebases and updates).

But we also want to run tests on `main` and the various `release` backport
branches, so retain a `on: push` for those.
2023-01-04 14:34:23 -05:00
Seth Hoenig
12034f90a3 api: make api tests fast and more concurrency safe (#15543)
This PR tries to make API tests run fast, as an experiment to later apply
to all packages. Key changes include

- Swapping freeport for test/portal for port allocations
- Swappng some uses of WaitForResult with test/wait
- Turning on parallelism in api/testutil/slow.go
- Switching to custom public runner (32 vcpu)

There's also chunk of cleanup brought in for the ride
2022-12-16 12:25:28 -06:00
Seth Hoenig
732adae999 ci: use hashicorp/setup-golang for setting up go compiler, cache (#15271)
This PR changes test-core to make use of

https://github.com/hashicorp/setup-golang

to consolidate the setting up of the Go compiler and the Go modules cache
used for the CI job.

Fixes: #14905
2022-11-17 07:50:45 -06:00
Luiz Aoqui
e20af3cf20 ci: re-enable tests on main (#15204)
Now that the tests are grouped more tightly we don't use as many runners
as before, so we can re-enable these without clogging the queue.
2022-11-10 13:51:37 -05:00
Seth Hoenig
152f8af960 build: update to go1.19.3 (#15099) 2022-11-01 15:54:49 -05:00
Seth Hoenig
f715cc1488 ci: use groups of tests in gha (#15018)
* [no ci] use json for grouping packages for testing

* [no ci] able to get packages in group

* [no ci] able to run groups of tests

* [no ci] more

* [no ci] try disable circle unit tests

* ci: use actions/checkout@v3

* ci: rename to quick

* ci: need make dev in mods cache step

* ci: make compile step depend on checks step

* ci: bump consul and vault versions

* ci: need make dev for group tests

* ci: update ci unit testing docs

* docs: spell plumbing correctly

Co-authored-by: Tim Gross <tgross@hashicorp.com>

Co-authored-by: Tim Gross <tgross@hashicorp.com>
2022-10-27 09:02:58 -05:00
Seth Hoenig
4ffb8c0ffa ci: add -core suffix to mods action (#15015)
Forgot to add this line to the new mods action; without it, it
creates a cache different from the one used by the other jobs.
2022-10-24 08:49:01 -05:00
Seth Hoenig
dbd742d805 ci: use the same go mod cache across test-core jobs (#15006)
* ci: use the same go mod cache for test-core jobs

* ci: precache go modules

* ci: add a mods precache job
2022-10-21 17:38:45 -05:00
Tim Gross
d063845177 deps: use install from current HEAD for hc-install (#14786)
The `hc-install` tool we're using needed a patch for a specific bug, but that's
since been merged. We definitely want to switch to using a standard release from
that project once one is shipped with the CLI, but pinning to HEAD should keep
us for now.
2022-10-04 08:22:30 -04:00
Seth Hoenig
7a8b1368b7 build: update go version to go1.19.1 (#14653)
minor update, no CL needed
2022-09-22 09:40:01 -05:00
Seth Hoenig
5a9b3e5a63 ci: no need to run unit tests for e2e/ui changes (#14607) 2022-09-16 09:58:06 -05:00
Seth Hoenig
aebd61f5c5 build: update to go1.19 2022-08-16 08:40:57 -05:00
Seth Hoenig
527f2a97de build: update to go1.18.5 2022-08-02 07:36:35 -05:00
Seth Hoenig
78fb9c0150 build: update to go1.18.3
Release Notes:
https://groups.google.com/g/golang-announce/c/TzIC9-t8Ytg

Contains 4 security fixes - the 2 related to Windows might be relevant.
2022-07-01 10:12:56 -05:00
Seth Hoenig
04ceba2bfb build: update golang version to 1.18.2
This PR update to Go 1.18.2. Also update the versions of hclfmt
and go-hclogfmt which includes newer dependencies necessary for dealing
with go1.18.

The hcl v2 branch is now 'nomad-v2.9.1+tweaks2', to include a fix for
newer macOS versions: 8927e75e82
2022-05-25 10:04:04 -05:00
Seth Hoenig
6d92e9b738 ci: switch to 22.04 LTS for GHA Core CI tests 2022-05-25 08:19:40 -05:00
Seth Hoenig
91d91e28e4 build: update golang to 1.17.9 2022-04-21 11:43:01 -05:00
Seth Hoenig
72a4677415 ci: ensure package coverage of test-core 2022-04-14 19:04:06 -05:00