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>
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>
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>
* 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>
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>
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>