Commit graph

42 commits

Author SHA1 Message Date
Gabriel Adrian Samfira
913388ed3b Trigger tests on release branches
This change triggers tests for PRs created against release/* branches.

Signed-off-by: Gabriel Adrian Samfira <gsamfira@cloudbasesolutions.com>
2025-05-29 17:16:48 +00:00
Gabriel Adrian Samfira
d27bd40531
Update all dependencies
Signed-off-by: Gabriel Adrian Samfira <gsamfira@cloudbasesolutions.com>
2025-04-17 18:07:33 +03:00
Gabriel
e255c90213
Update integration-tests.yml 2025-01-31 20:59:25 +02:00
Gabriel
1f3c7cd34a
Create dependabot.yml 2024-12-20 20:35:04 +02:00
Gabriel Adrian Samfira
9a6f0e7926 Pin go version
Signed-off-by: Gabriel Adrian Samfira <gsamfira@cloudbasesolutions.com>
2024-08-14 20:52:10 +00:00
Gabriel Adrian Samfira
f5992b7344 Allow using LXD image mirror
This change allows GARM tests to use a mirror for LXD images, allowing
for faster image downloads.

Signed-off-by: Gabriel Adrian Samfira <gsamfira@cloudbasesolutions.com>
2024-08-14 19:44:23 +00:00
Gabriel Adrian Samfira
d5cbc5bfb2 Switch to self hosted runner
GitHub hosted runners seem to have issues with LXD containers.

Signed-off-by: Gabriel Adrian Samfira <gsamfira@cloudbasesolutions.com>
2024-08-12 21:15:47 +00:00
Gabriel Adrian Samfira
e1e46211a1 Replace ngrok
This change switches the integration tests to an alternate tunneling
service.

Signed-off-by: Gabriel Adrian Samfira <gsamfira@cloudbasesolutions.com>
2024-08-12 19:22:52 +00:00
Gabriel Adrian Samfira
926797dda5 Pin provider versions and switch to busybox
Thic change pins all providers to a released version. We also switched
the GARM image to busybox. This adds an extra ~45MB, but we get an image
we can exec into.

Signed-off-by: Gabriel Adrian Samfira <gsamfira@cloudbasesolutions.com>
2024-08-08 12:22:16 +00:00
Fabian Fulga
9d4c0a953c Adding garm test suite 2024-06-17 12:36:00 +03:00
Gabriel Adrian Samfira
ccf51053b5 Add github endpoint operations e2e test
Signed-off-by: Gabriel Adrian Samfira <gsamfira@cloudbasesolutions.com>
2024-04-24 14:54:29 +00:00
Gabriel Adrian Samfira
1256473089 Fetch credentials from DB
Do not rely on the entity object to hold updated or detailed credentials,
fetch them from the DB every time.

This change also ensures that we pass in the user context instead of the
runner context to the DB methods.

Signed-off-by: Gabriel Adrian Samfira <gsamfira@cloudbasesolutions.com>
2024-04-24 13:59:15 +00:00
Gabriel Adrian Samfira
f5682e6323 Work around actions/runner-images#7210
Signed-off-by: Gabriel Adrian Samfira <gsamfira@cloudbasesolutions.com>
2024-04-24 11:30:15 +00:00
Gabriel Adrian Samfira
cbb2134f0e Add GitHub App support
This change adds the ability to use GitHub Apps to authenticate against the
GitHub API. This gives us a larger quota for API requests (15k vs 5k for PATs).

Also, each GitHub App has its own quota, whereas PATs share the same user quota.

Signed-off-by: Gabriel Adrian Samfira <gsamfira@cloudbasesolutions.com>
2024-03-01 19:47:50 +00:00
Gabriel Adrian Samfira
b5e3552776 Fix variable name
Signed-off-by: Gabriel Adrian Samfira <gsamfira@cloudbasesolutions.com>
2024-02-26 19:04:48 +00:00
Gabriel Adrian Samfira
111b93f062 simplify integration test job
Signed-off-by: Gabriel Adrian Samfira <gsamfira@cloudbasesolutions.com>
2024-02-26 17:58:04 +00:00
Gabriel Adrian Samfira
b9b185d1c1 Install dependencies and set RUN_USER
Install make dependencies and default to current user

Signed-off-by: Gabriel Adrian Samfira <gsamfira@cloudbasesolutions.com>
2024-02-26 16:38:27 +00:00
Mario Constanti
73eb21438a fix: run make lint same way as in ci
Signed-off-by: Mario Constanti <mario.constanti@mercedes-benz.com>
2024-02-22 16:54:20 +01:00
Mario Constanti
9ea2a312d2 feat: introduce golangci config and help in make
Signed-off-by: Mario Constanti <mario.constanti@mercedes-benz.com>
2024-02-22 15:06:53 +01:00
Ionut Balutoiu
318bc52b57 Refactor integration E2E tests
* General cleanup of the integration tests Golang code. Move the
  `e2e.go` codebase into its own package and separate files.
* Reduce the overall log spam from the integration tests output.
* Add final GitHub workflow step that stops GARM server, and does the
  GitHub cleanup of any orphaned resources.
* Add `TODO` to implement cleanup of the orphaned GitHub webhooks.
  This is useful, if the uninstall of the webhooks failed.
* Add `TODO` for extra missing checks on the GitHub webhooks
  install / uninstall logic.

Signed-off-by: Ionut Balutoiu <ibalutoiu@cloudbasesolutions.com>
2023-08-24 15:22:46 +03:00
Gabriel
bc0a34bae9
Merge pull request #164 from gabriel-samfira/use-apg-for-password
Use apg to generate passwords
2023-08-22 22:32:40 +03:00
Gabriel Adrian Samfira
6e98c3e088 Use apg to generate passwords
It appears that in some cases, generating passwords by reading /dev/urandom
and piping to tr, fails. Use apg.

Signed-off-by: Gabriel Adrian Samfira <gsamfira@cloudbasesolutions.com>
2023-08-22 19:32:15 +00:00
Mihaela Balutoiu
300ad110f0 Add webhooks integration tests
Signed-off-by: Mihaela Balutoiu <mbalutoiu@cloudbasesolutions.com>
2023-08-22 21:23:56 +03:00
Ionut Balutoiu
5ced5c4b1c Fix spacing
Remove extra spaces from the `integration-tests.yml` file.

Signed-off-by: Ionut Balutoiu <ibalutoiu@cloudbasesolutions.com>
2023-08-22 11:47:48 +03:00
Ionut Balutoiu
3d3ce2922d Silence tr stderr output
This seems to be related to the distribution used by the GitHub
`ubuntu-latest` runners, as I can't reproduce it locally on my
Ubuntu 22.04 server.

An useful discussion on this topic:
https://stackoverflow.com/questions/48725875/is-there-a-workaround-for-this-broken-pipe-error

Signed-off-by: Ionut Balutoiu <ibalutoiu@cloudbasesolutions.com>
2023-08-22 11:43:06 +03:00
Ionut Balutoiu
8900de7a1b [integration-tests] Update randomStringGenerator bash function
Some integration tests workflows failed with:
```
Error: Invalid format 'ORG_WEBHOOK_SECRET=***'
```
or
```
Error: Invalid format 'GARM_PASSWORD=***'
```

Workflow runs logs:
* https://github.com/cloudbase/garm/actions/runs/5920389694/job/16051606203#step:7:26
* https://github.com/cloudbase/garm/actions/runs/5908193226/job/16027297143#step:7:26

This is a transient error, as it only happens sometimes.

I suspect that sometimes there is some illegal sequence of characters
in the random generated strings. Thus, the GitHub actions logic to
parse the environment fails.

This change removes the special characters that would have a special
meaning in bash, from the `randomStringGenerator` function, in hopes
to fix the transient issue.

Signed-off-by: Ionut Balutoiu <ibalutoiu@cloudbasesolutions.com>
2023-08-22 11:17:43 +03:00
Mihaela Balutoiu
aa956ae939 Cleaning up leftover runners for org/repo
Signed-off-by: Mihaela Balutoiu <mbalutoiu@cloudbasesolutions.com>
2023-08-09 16:31:50 +03:00
Mihaela Balutoiu
1bd288f56d Set pipefail to the script
Signed-off-by: Mihaela Balutoiu <mbalutoiu@cloudbasesolutions.com>
2023-08-07 12:37:09 +03:00
Gabriel Adrian Samfira
8c82864e11
Add workflow dispatch trigger
Signed-off-by: Gabriel Adrian Samfira <gsamfira@cloudbasesolutions.com>
2023-08-07 10:30:50 +03:00
Mihaela Balutoiu
a7198a7d51 Add upload artifacts
Signed-off-by: Mihaela Balutoiu <mbalutoiu@cloudbasesolutions.com>
2023-08-04 23:24:43 +03:00
Mihaela Balutoiu
cf0c1f188b Fix org_name/repo_name
Signed-off-by: Mihaela Balutoiu <mbalutoiu@cloudbasesolutions.com>
2023-08-02 20:24:44 +03:00
Mihaela Balutoiu
528f521897 Set schedule workflow to run every day at midnight
Signed-off-by: Mihaela Balutoiu <mbalutoiu@cloudbasesolutions.com>
2023-08-02 19:34:41 +03:00
Gabriel Adrian Samfira
9927a18b9a
Update ngrok action
Signed-off-by: Gabriel Adrian Samfira <gsamfira@cloudbasesolutions.com>
2023-08-02 18:54:07 +03:00
Gabriel Adrian Samfira
d02292bd1a
Fix config dir location
Signed-off-by: Gabriel Adrian Samfira <gsamfira@cloudbasesolutions.com>
2023-08-02 17:29:08 +03:00
Gabriel Adrian Samfira
d2ffa22204
Set up ngrok and use sudo
Signed-off-by: Gabriel Adrian Samfira <gsamfira@cloudbasesolutions.com>
2023-08-02 17:14:27 +03:00
Mihaela Balutoiu
6f69f942cf Add GitHub workflow for integration tests
Signed-off-by: Mihaela Balutoiu <mbalutoiu@cloudbasesolutions.com>
2023-08-02 16:11:55 +03:00
Gabriel Adrian Samfira
f96ea1edcf Add dockerfile and workflow
Signed-off-by: Gabriel Adrian Samfira <gsamfira@cloudbasesolutions.com>
2023-07-15 23:22:32 +00:00
Gabriel
baa02dde98
Create codeql.yml 2023-01-21 01:21:03 +02:00
Gabriel Adrian Samfira
70fd3f47d0
Remove unused functions
Signed-off-by: Gabriel Adrian Samfira <gsamfira@cloudbasesolutions.com>
2023-01-20 23:57:03 +02:00
Gabriel Adrian Samfira
4063265478
Add checks for gofmt
Signed-off-by: Gabriel Adrian Samfira <gsamfira@cloudbasesolutions.com>
2023-01-20 23:43:48 +02:00
Gabriel Adrian Samfira
38b2ef5966
Add linters workflow
Signed-off-by: Gabriel Adrian Samfira <gsamfira@cloudbasesolutions.com>
2023-01-20 22:26:52 +02:00
Ionut Balutoiu
30c1510967 Add Go Tests GitHub workflow
Signed-off-by: Ionut Balutoiu <ibalutoiu@cloudbasesolutions.com>
2022-09-07 16:33:13 +03:00