Commit Graph

150 Commits

Author SHA1 Message Date
Derek Nola
2148e3129c [Release-1.32] GHA Artifacts + Testing Backports July 2025 (#12609)
* Move to more secure split trivy workflow based on labels, not comments (#12592)

Signed-off-by: Derek Nola <derek.nola@suse.com>

* Add basic fuzz test

Signed-off-by: Derek Nola <derek.nola@suse.com>

* Add retry around common timeout for hardened docker test (#12601)

Signed-off-by: Derek Nola <derek.nola@suse.com>

* Remove ghcr build cache (#12602)

Signed-off-by: Derek Nola <derek.nola@suse.com>

* Migrate K3s Release Artifacts to GHA (#12606)

Signed-off-by: Derek Nola <derek.nola@suse.com>

---------

Signed-off-by: Derek Nola <derek.nola@suse.com>
2025-07-11 10:55:58 -07:00
Derek Nola
d2f90f049f Build and push k3s image to GHCR
Signed-off-by: Derek Nola <derek.nola@suse.com>
2025-06-10 09:18:55 -07:00
Derek Nola
39b855843d Build k3s overhaul (#12200)
* Add full ci support without Dapper
* Seperate git and other version tags, improves caching on binary builds
* Use new local targets for build-k3s.yaml workflow
* Allow optional ghcr build caching
* Build binary using GHA native commands
* Use internal setup-go action for e2e.yaml
* Add emulation builds to k3s-build.yaml (for arm32 and future riscv64)
* Be consistent in k3s artifact names
* Fix package/dockerfile warnings
* Fix install script for PR installs

Signed-off-by: Derek Nola <derek.nola@suse.com>
2025-06-10 09:18:55 -07:00
Brad Davidson
2b0107a935 Fix e2e startup test
Do more cleanup between runs, collect more logs on failure.

Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2025-05-16 09:55:56 -07:00
Derek Nola
cf525af229 Migrate test-mods from Drone to GHA
Signed-off-by: Derek Nola <derek.nola@suse.com>
2025-04-16 11:37:55 -07:00
Brad Davidson
e3fc476a35 Move Windows test out of Install Script workflow
Placing this in the install script test, which only runs when specific files are changed, was preventing it from being run on code changes.

In addition to moving this into the integration workflow, fix codecov for Windows and upload data after running a test pod.

Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
(cherry picked from commit cd4be0b8c1)
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2025-04-11 14:27:56 -07:00
Derek Nola
e523b729e2 Consolidate build-k3s GHA workflow for OS and ARCH (#12080)
Signed-off-by: Derek Nola <derek.nola@suse.com>
(cherry picked from commit 7c552f89c8)
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2025-04-11 14:27:56 -07:00
Brad Davidson
d61005692d Silence vagrant progress output
Add --no-tty flag to all `vagrant up` commands to silence the printing of box loading progress

Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
(cherry picked from commit 08c6c7423b)
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2025-04-11 14:27:56 -07:00
Derek Nola
4c2de6ddfc Migrate svcpolicies E2E test to docker
Signed-off-by: Derek Nola <derek.nola@suse.com>
2025-03-06 09:15:00 -08:00
Derek Nola
0be54708b8 Expand E2E test matrix to cover all possible tests that fit on GHA
Fix rootless test

Fix svc firewall E2E test, broken by #11711

Signed-off-by: Derek Nola <derek.nola@suse.com>
2025-03-06 09:15:00 -08:00
Derek Nola
3a35b3ac56 Migrate E2E SecretsEncryption to Docker test
Remove secrets encryption E2E from Drone

Signed-off-by: Derek Nola <derek.nola@suse.com>
2025-03-06 09:15:00 -08:00
Derek Nola
02abed3a72 Don't run snapshotrestore on flaky arm64 runners
Signed-off-by: Derek Nola <derek.nola@suse.com>
2025-03-06 09:15:00 -08:00
Derek Nola
86c84e1375 Migrate E2E autoimport to Docker test
Simplify DockerNode structs
Remove autoimport from E2E
Signed-off-by: Derek Nola <derek.nola@suse.com>
2025-03-06 09:15:00 -08:00
Derek Nola
e8223b3895 Migrate hardened docker test
Signed-off-by: Derek Nola <derek.nola@suse.com>
2025-03-06 09:15:00 -08:00
Derek Nola
7c824e599b Migrate E2E Token test into a Docker Token test
Remove E2E token test

Signed-off-by: Derek Nola <derek.nola@suse.com>
2025-03-06 09:15:00 -08:00
Derek Nola
8adb6dafdd Reduce cache thrashing on E2E vagrant boxes. Don't cache for windows unit tests. (#11769)
Signed-off-by: Derek Nola <derek.nola@suse.com>
2025-03-06 09:15:00 -08:00
Brad Davidson
c5a53bccc7 Move windows build to separate job
Don't block other linux steps on building the windows binary

Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
(cherry picked from commit 20a9a6bfc3)
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2025-02-10 10:16:03 -08:00
Brad Davidson
d2f13bd9b8 Add windows smoke test
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
(cherry picked from commit 3aa24cdde8)
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2025-02-10 10:16:03 -08:00
Brad Davidson
0efd5d7758 Fix linux-specific clientaccess test
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
(cherry picked from commit 0d15457c77)
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2025-02-10 10:16:03 -08:00
Brad Davidson
4aceb37b1a Move Windows compilation test to GH Actions and enable integration/coverage
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
(cherry picked from commit 5c8f2364c4)
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2025-02-10 10:16:03 -08:00
Derek Nola
5509a86b0b Consolidate test utility functions into top level package (#11711)
* [e2e] Convert RunCmdOnNode to method
* Consolidate e2e variables into TestConfig struct
* Consolidate docker and integration test helper functions
* E2E: Directly count daemonsets, not their pods
* Add missing Context levels for E2E tests
* Migrate e2e.ParsePods to new tests client package
* Run the go test compile test on their respective architectures

Signed-off-by: Derek Nola <derek.nola@suse.com>
2025-02-07 12:39:49 -08:00
Derek Nola
9e2dd07921 Run Docker test on Github Actions arm64 runners (#11705)
* Build and Run Arm64 Docker Tests
* Compile go tests for both amd64 and arm64
* Use version.sh to determine channel, not git
* Consolidate docker tests into 2D matrix
* Remove old Docker test from Drone and Github Actions

Signed-off-by: Derek Nola <derek.nola@suse.com>
2025-02-07 12:39:49 -08:00
Derek Nola
f4062557ef Convert snapshotrestore from E2E to Docker test
Signed-off-by: Derek Nola <derek.nola@suse.com>
2025-02-07 12:39:49 -08:00
Derek Nola
0b414715af Upload E2E logs on failure as GHA artifacts (#11514)
* Upload E2E journald logs as artifacts in GHA

Signed-off-by: Derek Nola <derek.nola@suse.com>

* Improve fork information for parent extraction

Signed-off-by: Derek Nola <derek.nola@suse.com>

---------

Signed-off-by: Derek Nola <derek.nola@suse.com>
2025-01-13 12:16:36 -08:00
Vitor Savian
39f4cbb336 Add auto import images for containerd image store
* Add auto import images for containerd image store

* Add auto import images

Signed-off-by: Vitor Savian <vitor.savian@suse.com>

* Fix EOF error log when importing tarball files

Signed-off-by: Vitor Savian <vitor.savian@suse.com>

* Delaying queue

Signed-off-by: Vitor Savian <vitor.savian@suse.com>

* Add parse for images

Signed-off-by: Vitor Savian <vitor.savian@suse.com>

---------

Signed-off-by: Vitor Savian <vitor.savian@suse.com>
2025-01-11 01:59:00 -03:00
Derek Nola
c669600c8f Fix Branch Name logic for Dependabot and UpdateCLI pushes to k3s-io (#11376)
* Improve node checking for etcd docker test
* Fix branch name for dependabot and updatecli PRs

Signed-off-by: Derek Nola <derek.nola@suse.com>
2024-11-27 09:50:14 -08:00
Derek Nola
b5e2fa77a6 Convert legacy docker tests from bash to golang (#11357)
* Convert the following Docker test from Bash to Go
    - basics
    - bootstraptoken
    - cacerts
    - compat -> skew
    - etcd
    - lazypull
    - upgrade

Signed-off-by: Derek Nola <derek.nola@suse.com>

* Add Docker go tests to GHA
* Prebuild K3s Go Tests
* Strip go test binaries to reduce size
* Handle complex branch options

Signed-off-by: Derek Nola <derek.nola@suse.com>

* Implement basic golang tests on arm and arm64 pipelines

Signed-off-by: Derek Nola <derek.nola@suse.com>
2024-11-26 12:30:52 -08:00
dependabot[bot]
1b7dd765a5 Bump aquasecurity/trivy-action from 0.28.0 to 0.29.0 (#11364)
Bumps [aquasecurity/trivy-action](https://github.com/aquasecurity/trivy-action) from 0.28.0 to 0.29.0.
- [Release notes](https://github.com/aquasecurity/trivy-action/releases)
- [Commits](https://github.com/aquasecurity/trivy-action/compare/0.28.0...0.29.0)

---
updated-dependencies:
- dependency-name: aquasecurity/trivy-action
  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-11-26 10:15:46 -08:00
dependabot[bot]
ff23fb57a9 Bump aquasecurity/trivy-action from 0.27.0 to 0.28.0 (#11138)
Bumps [aquasecurity/trivy-action](https://github.com/aquasecurity/trivy-action) from 0.27.0 to 0.28.0.
- [Release notes](https://github.com/aquasecurity/trivy-action/releases)
- [Commits](https://github.com/aquasecurity/trivy-action/compare/0.27.0...0.28.0)

---
updated-dependencies:
- dependency-name: aquasecurity/trivy-action
  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-21 09:35:16 -07:00
dependabot[bot]
14eee80f69 Bump aquasecurity/trivy-action from 0.24.0 to 0.27.0 (#11105)
Bumps [aquasecurity/trivy-action](https://github.com/aquasecurity/trivy-action) from 0.24.0 to 0.27.0.
- [Release notes](https://github.com/aquasecurity/trivy-action/releases)
- [Commits](https://github.com/aquasecurity/trivy-action/compare/0.24.0...0.27.0)

---
updated-dependencies:
- dependency-name: aquasecurity/trivy-action
  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-16 12:22:17 -07:00
Derek Nola
4888376682 Fix Github Actions for Ubuntu-24.04 (#11112)
* Fix vagrant/libvirt composite action for ubuntu-24.04

* Don't ignore changes to internal actions

* Fix unit tests for ubuntu 24.04, new lsof version

* Pin os version for unit and E2E workflows

Signed-off-by: Derek Nola <derek.nola@suse.com>
2024-10-16 12:22:07 -07:00
manuelbuil
536fa44eb0 Revert "Make svclb as simple as possible"
This reverts commit 1befd65a0a.

Signed-off-by: manuelbuil <mbuil@suse.com>
2024-10-15 20:30:03 +02:00
Derek Nola
a44cb16ce1 Rollback GHA to Ubuntu 22.04 (#11111)
Signed-off-by: Derek Nola <derek.nola@suse.com>
2024-10-15 09:37:51 -07:00
manuelbuil
660c6052c2 Make svclb as simple as possible
Signed-off-by: manuelbuil <mbuil@suse.com>
2024-10-11 10:52:47 +02:00
Brad Davidson
b1a42e5d43 Add ca-cert rotation integration test
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2024-10-08 17:03:31 -07:00
Derek Nola
ab89363e18 Fix trivy vex line (#10970)
Signed-off-by: Derek Nola <derek.nola@suse.com>
2024-10-01 15:06:49 -07:00
Guilherme Macedo
0553a1a1d9 Pass Rancher's VEX report to Trivy to remove known false-positives CVEs (#10956)
Signed-off-by: Guilherme Macedo <guilherme@gmacedo.com>
2024-10-01 17:20:35 -04:00
Derek Nola
2739f50d77 Trivy workflow: Checkout repo to use gh cli (#10949)
Signed-off-by: Derek Nola <derek.nola@suse.com>
2024-09-25 13:20:26 -07:00
Derek Nola
97e8486032 Fix trivy report download (#10943)
Signed-off-by: Derek Nola <derek.nola@suse.com>
2024-09-25 10:09:09 -07:00
Derek Nola
3a268acb78 Check k3s-io organization membership not team membership for trivy scans (#10940)
Signed-off-by: Derek Nola <derek.nola@suse.com>
2024-09-24 14:37:32 -07:00
Derek Nola
6731f4a70d Fix getMembershipForUserInOrg call (#10937)
Signed-off-by: Derek Nola <derek.nola@suse.com>
2024-09-24 13:06:27 -07:00
Derek Nola
005711fad6 Breakup trivy scan and check comment author (#10935)
* Check comment author on trivy scan
* Breakup trivy workflow for better permission security

Signed-off-by: Derek Nola <derek.nola@suse.com>
2024-09-24 12:10:31 -07:00
Derek Nola
61c7011cab Give good report if no CVEs found in trivy (#10853)
Signed-off-by: Derek Nola <derek.nola@suse.com>
2024-09-06 14:58:26 -07:00
Brad Davidson
378edb939d Tag PR image build as latest before scanning
This is less effort than passing the tag across steps 🤷‍♂️

Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2024-09-05 15:21:56 -07:00
Brad Davidson
3d6e4a793a Fix /trivy action running against target branch instead of PR branch
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2024-09-04 15:57:39 -07:00
dependabot[bot]
dacc636cf4 Bump aquasecurity/trivy-action from 0.20.0 to 0.24.0 (#10795)
Bumps [aquasecurity/trivy-action](https://github.com/aquasecurity/trivy-action) from 0.20.0 to 0.24.0.
- [Release notes](https://github.com/aquasecurity/trivy-action/releases)
- [Commits](https://github.com/aquasecurity/trivy-action/compare/0.20.0...0.24.0)

---
updated-dependencies:
- dependency-name: aquasecurity/trivy-action
  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-03 09:14:54 -07:00
Derek Nola
fa6940d03d Add trivy scanning trigger for PRs (#10758)
Signed-off-by: Derek Nola <derek.nola@suse.com>
2024-08-30 09:00:50 -07:00
Derek Nola
38df76708d Fix caching name for e2e vagrant box (#10695)
Signed-off-by: Derek Nola <derek.nola@suse.com>
2024-08-13 09:22:56 -07:00
Derek Nola
ac247d29cf Update to newer OS images for install testing (#10681)
* Update to newer OS images for install testing
* Update vagrant images used for E2E

Signed-off-by: Derek Nola <derek.nola@suse.com>
2024-08-12 09:26:19 -07:00
Vitor Savian
3aceb85c22 Add a change for killall to not unmount server and agent directory
Signed-off-by: Vitor Savian <vitor.savian@suse.com>

Add recursive search and deletion of unmounted/mounted dirs in killall

Signed-off-by: Vitor Savian <vitor.savian@suse.com>

Only clean the server and agent directory if it is uninstall

Signed-off-by: Vitor Savian <vitor.savian@suse.com>

Add uninstall test to check mount points

Signed-off-by: Vitor Savian <vitor.savian@suse.com>

Add uninstall test in CI

Signed-off-by: Vitor Savian <vitor.savian@suse.com>
2024-08-07 10:06:12 -07:00