Gabriel
a66cbccdd9
Merge pull request #261 from fabi200123/integration-tests
...
Refactor Integration tests
2024-06-17 13:57:42 +03:00
Fabian Fulga
9d4c0a953c
Adding garm test suite
2024-06-17 12:36:00 +03:00
Gabriel
4c7c9b0e1e
Merge pull request #259 from gabriel-samfira/fix-readme-typos
...
Fix typos
2024-06-08 12:38:50 +03:00
Gabriel Adrian Samfira
1058c40c43
Fix typos
...
Signed-off-by: Gabriel Adrian Samfira <gsamfira@cloudbasesolutions.com>
2024-06-07 18:24:58 +00:00
Gabriel
214cb05072
Merge pull request #256 from gabriel-samfira/move-urls-to-db
...
Move URLs from default section of config to DB
2024-06-07 13:09:04 +03:00
Gabriel Adrian Samfira
aea328bab9
Remove URLs from sample config
...
Signed-off-by: Gabriel Adrian Samfira <gsamfira@cloudbasesolutions.com>
2024-06-07 10:04:34 +00:00
Gabriel Adrian Samfira
37ae7520b8
Update docs
...
Update the quickstart and the "using garm" sections.
Signed-off-by: Gabriel Adrian Samfira <gsamfira@cloudbasesolutions.com>
2024-06-07 09:27:38 +00:00
Gabriel Adrian Samfira
3992f97d8c
Fix tests and make URLs optional in config
...
Signed-off-by: Gabriel Adrian Samfira <gsamfira@cloudbasesolutions.com>
2024-06-07 09:27:38 +00:00
Gabriel Adrian Samfira
9748aa47af
Move URLs from default section of config to DB
...
This change moves the callback_url, metadata_url and webhooks_url from
the config to the database. The goal is to move as much as possible from
the config to the DB, in preparation for a potential refactor that will
allow GARM to scale out. This would allow multiple nodes to share a single
source of truth.
Signed-off-by: Gabriel Adrian Samfira <gsamfira@cloudbasesolutions.com>
2024-06-07 09:27:24 +00:00
Gabriel
7ee235aeb0
Merge pull request #255 from mercedes-benz/remove_runner_name_lookup_via_job_id
...
fix: remove unnecessary github api call
2024-06-05 15:05:16 +03:00
Mario Constanti
b4e7dead1c
fix: check if runner name is empty and return
...
Signed-off-by: Mario Constanti <mario.constanti@mercedes-benz.com>
2024-06-05 13:48:53 +02:00
Mario Constanti
dc74c45317
fix: remove unnecessary github api call
...
There are only a few cases, where we get a job information from github
where the runner name is not set.
For all this cases we do not need to check github API at all because
these jobs are never ever get scheduled to a runner:
job.Action is:
* queued:
a queued job is just queued and not scheduled to a runner so we do
not get a runner name from the GH API
* completed:
when conclusion=cancelled|failure github never scheduled the job to a
runner and with that we do not get a runner name from the GH API
Signed-off-by: Mario Constanti <mario.constanti@mercedes-benz.com>
2024-06-05 12:37:20 +02:00
Gabriel
02ff74bfe8
Merge pull request #254 from mercedes-benz/fix_conclusion_typo
...
fix: use the american english type of cancelled
2024-06-05 13:10:36 +03:00
Mario Constanti
7adc48c75f
fix: use the american english type of cancelled
...
github is sending job events where conclusion=cancelled is spelled in american english.
Signed-off-by: Mario Constanti <mario.constanti@mercedes-benz.com>
2024-06-05 11:57:33 +02:00
Gabriel
7538f4add9
Merge pull request #252 from gabriel-samfira/update-readme
...
Add note about stable release documentation
2024-05-25 09:57:34 +03:00
Gabriel Adrian Samfira
ae80ae0442
Add note about stable release documentation
...
Signed-off-by: Gabriel Adrian Samfira <gsamfira@cloudbasesolutions.com>
2024-05-25 06:55:10 +00:00
Gabriel
09f050553c
Merge pull request #251 from gabriel-samfira/update-go-swagger
...
Update go-swagger and run generate
2024-05-23 14:40:52 +03:00
Gabriel Adrian Samfira
ff6db9bd61
Update go-swagger and run generate
...
This updates go-swagger to v0.31.0, which no longer panics when used
with golang v1.22+.
Signed-off-by: Gabriel Adrian Samfira <gsamfira@cloudbasesolutions.com>
2024-05-23 10:24:44 +00:00
Gabriel
ab3bef8b41
Merge pull request #249 from mercedes-benz/new_runners_without_default_labels
...
New runners without default labels
2024-05-22 21:18:57 +03:00
Mario Constanti
debb9696ce
docs: document released provider-common version
...
Signed-off-by: Mario Constanti <mario.constanti@mercedes-benz.com>
2024-05-22 06:04:22 +02:00
Mario Constanti
27e081eb36
remove required tags during update
...
Signed-off-by: Mario Constanti <mario.constanti@mercedes-benz.com>
2024-05-22 06:03:06 +02:00
Mario Constanti
c4f023b6a8
doc: add some notes about default labels
...
Signed-off-by: Mario Constanti <mario.constanti@mercedes-benz.com>
2024-05-21 12:06:54 +02:00
Mario Constanti
40cdf5b639
doc: remove self-hosted label from docs
...
Signed-off-by: Mario Constanti <mario.constanti@mercedes-benz.com>
2024-05-21 11:55:12 +02:00
Mario Constanti
1d14a26325
feat: garm pools do not force default labels
...
Signed-off-by: Mario Constanti <mario.constanti@mercedes-benz.com>
2024-05-21 11:55:12 +02:00
Gabriel
6e416bb494
Merge pull request #246 from gabriel-samfira/remove-duplicate-pool-characteristics-check
...
Remove check for duplicate pool
2024-05-10 20:31:37 +03:00
Gabriel
45d5f152ce
Merge pull request #247 from gabriel-samfira/add-toc-to-docs
...
Add TOC
2024-05-10 11:49:19 +03:00
Gabriel Adrian Samfira
f721d74840
Add TOC
...
Signed-off-by: Gabriel Adrian Samfira <gsamfira@cloudbasesolutions.com>
2024-05-10 08:48:47 +00:00
Gabriel Adrian Samfira
be4f303b82
Remove check for duplicate pool
...
This change removes a check that denies the creation of a pool
if the new pool has the same image and flavor set on the same
provider. The reasoning for that check was that if you need to
create another pool with identical settings to an existing one,
you might as well scale up the min-idle-runners on the old one.
This was done when runner groups were not yet added. This in
turn has forced users to alias images with new names in their
provider, leading to terrible UX. In the end, being too
opinionated in this case has caused more harm than good.
Fixes #245
Signed-off-by: Gabriel Adrian Samfira <gsamfira@cloudbasesolutions.com>
2024-05-10 08:12:44 +00:00
Gabriel
76d45ad83f
Merge pull request #243 from gabriel-samfira/use-db-for-gh-creds
...
Move github credentials to the database
2024-05-09 19:36:04 +03:00
Gabriel Adrian Samfira
b3e2c584bf
Update docs
...
Signed-off-by: Gabriel Adrian Samfira <gsamfira@cloudbasesolutions.com>
2024-05-07 21:22:40 +00:00
Gabriel Adrian Samfira
27e74ef277
Add DB migration test
...
Signed-off-by: Gabriel Adrian Samfira <gsamfira@cloudbasesolutions.com>
2024-05-07 11:52:26 +00:00
Gabriel
75eb45c97a
Update database/sql/sql.go
...
Co-authored-by: Mario Constanti <github@constanti.de>
2024-05-07 13:13:16 +03:00
Gabriel Adrian Samfira
8726cb994e
Move the name check before tx
...
No point in making a DB query if we know we don't want to be able to
delete/update the default endpoint.
Signed-off-by: Gabriel Adrian Samfira <gsamfira@cloudbasesolutions.com>
2024-05-07 10:07:47 +00:00
Gabriel Adrian Samfira
2a3d524a71
Add more unit tests
...
Signed-off-by: Gabriel Adrian Samfira <gsamfira@cloudbasesolutions.com>
2024-04-29 09:47:26 +00:00
Gabriel Adrian Samfira
2b1414d150
Add some unit tests
...
Signed-off-by: Gabriel Adrian Samfira <gsamfira@cloudbasesolutions.com>
2024-04-28 17:20:40 +00:00
Gabriel Adrian Samfira
402c8b70e2
Use different creds than the default ones
...
Signed-off-by: Gabriel Adrian Samfira <gsamfira@cloudbasesolutions.com>
2024-04-27 18:55:30 +00:00
Gabriel Adrian Samfira
349ba1f9e8
Fix nil pointer dereference
...
Signed-off-by: Gabriel Adrian Samfira <gsamfira@cloudbasesolutions.com>
2024-04-27 18:17:35 +00:00
Gabriel Adrian Samfira
87943db62c
Fix lint and add integration tests logging
...
Signed-off-by: Gabriel Adrian Samfira <gsamfira@cloudbasesolutions.com>
2024-04-27 18:10:03 +00:00
Gabriel Adrian Samfira
0128f59344
Add some credentials e2e tests
...
Signed-off-by: Gabriel Adrian Samfira <gsamfira@cloudbasesolutions.com>
2024-04-25 17:38:24 +00:00
Gabriel Adrian Samfira
39a5e14eb1
Add more e2e GH endpoint tests
...
Signed-off-by: Gabriel Adrian Samfira <gsamfira@cloudbasesolutions.com>
2024-04-25 07:45:09 +00: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
c2b974dfa0
Create clone creds for repo update
...
Signed-off-by: Gabriel Adrian Samfira <gsamfira@cloudbasesolutions.com>
2024-04-24 11:39:20 +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
8b5584f083
Add some e2e boilerplate
...
Signed-off-by: Gabriel Adrian Samfira <gsamfira@cloudbasesolutions.com>
2024-04-24 11:21:27 +00:00
Gabriel Adrian Samfira
e8ea7117ce
Fix tests post-rebase
...
Signed-off-by: Gabriel Adrian Samfira <gsamfira@cloudbasesolutions.com>
2024-04-22 14:10:51 +00:00
Gabriel Adrian Samfira
eb1456479b
Deny deleting the default github.com endpoint
...
Signed-off-by: Gabriel Adrian Samfira <gsamfira@cloudbasesolutions.com>
2024-04-22 14:08:37 +00:00
Gabriel Adrian Samfira
208a4eea37
Ensure github endpoint
...
Signed-off-by: Gabriel Adrian Samfira <gsamfira@cloudbasesolutions.com>
2024-04-22 14:08:37 +00:00
Gabriel Adrian Samfira
eadbe784b9
Add github credentials API and cli code
...
Signed-off-by: Gabriel Adrian Samfira <gsamfira@cloudbasesolutions.com>
2024-04-22 14:08:37 +00:00
Gabriel Adrian Samfira
77ecb16166
Add github endpoint API endpoint and CLI code
...
Signed-off-by: Gabriel Adrian Samfira <gsamfira@cloudbasesolutions.com>
2024-04-22 14:08:37 +00:00