Gabriel
e44786f1d2
Merge pull request #109 from mihaelabalutoiu/fix-pools-typo
...
Fix `runner/pools.go` typo
2023-06-15 15:57:48 +03:00
Mihaela Balutoiu
7ac2455379
Fix runner/pools.go typo
...
Signed-off-by: Mihaela Balutoiu <mbalutoiu@cloudbasesolutions.com>
2023-06-15 14:12:07 +03:00
Gabriel
05168ac994
Merge pull request #106 from gabriel-samfira/reap-failed-agent
...
Reap failed agent
2023-06-14 22:19:20 +03:00
Gabriel
22b410c9b7
Merge pull request #108 from mihaelabalutoiu/add-db-users-unit-tests
...
Add more test cases for the `/database/sql/users.go`
2023-06-14 20:05:00 +03:00
Mihaela Balutoiu
d340200333
Add more test cases for the /database/sql/users.go
...
Add more coverage for the `users.go` using the SQL database interactions.
Signed-off-by: Mihaela Balutoiu <mbalutoiu@cloudbasesolutions.com>
2023-06-14 19:24:42 +03:00
Gabriel
a4933b2836
Merge pull request #107 from mihaelabalutoiu/add-pools-unit-tests
...
Add test cases for the `runner/pools.go`
2023-06-14 15:45:42 +03:00
Mihaela Balutoiu
e1ad300f79
Add test cases for the runner/pools.go
...
Signed-off-by: Mihaela Balutoiu <mbalutoiu@cloudbasesolutions.com>
2023-06-14 14:17:47 +03:00
Gabriel Adrian Samfira
a33b15c6c9
Remove install target
...
Signed-off-by: Gabriel Adrian Samfira <gsamfira@cloudbasesolutions.com>
2023-06-13 23:50:33 +03:00
Gabriel Adrian Samfira
9e18d5d7a9
Add build target to Makefile
...
Add a build target to the Makefile that allows building a non static
version if both garm and garm-cli. This is useful when you just need to
build the binaries locally and make sure the version is properly set.
Signed-off-by: Gabriel Adrian Samfira <gsamfira@cloudbasesolutions.com>
2023-06-13 23:47:36 +03:00
Gabriel Adrian Samfira
9ed9e9eec5
Add retries for curl calls
...
Signed-off-by: Gabriel Adrian Samfira <gsamfira@cloudbasesolutions.com>
2023-06-13 22:37:20 +03:00
Gabriel Adrian Samfira
08bf2bf5a1
Make spacing consistent & add some status updates
...
Convert the templates.go file to contain tabs instead of spaces
consistently.
Add some status messages when installing.
Signed-off-by: Gabriel Adrian Samfira <gsamfira@cloudbasesolutions.com>
2023-06-13 21:27:49 +03:00
Gabriel Adrian Samfira
0e637c10e3
Remove failed runner and some retries
...
* When a runner fails to set up the github agent, we reap it after the
pool timeout is reached.
* add a retry in the userdata when configuring the runner agent
Signed-off-by: Gabriel Adrian Samfira <gsamfira@cloudbasesolutions.com>
2023-06-13 21:01:40 +03:00
Gabriel
939905a725
Merge pull request #105 from mihaelabalutoiu/add-db-users-unit-tests
...
Add more `users.go` unit tests
2023-06-13 17:41:44 +03:00
Mihaela Balutoiu
44c7ac1b7b
Add more users.go unit tests
...
Signed-off-by: Mihaela Balutoiu <mbalutoiu@cloudbasesolutions.com>
2023-06-13 16:52:32 +03:00
Gabriel Adrian Samfira
636164fb18
Exclude a temp cmd used for testing
...
Signed-off-by: Gabriel Adrian Samfira <gsamfira@cloudbasesolutions.com>
2023-06-13 13:24:00 +03:00
Gabriel
a42ad39264
Merge pull request #103 from HippocampusGirl/lxd-extra-packages
...
Allow installing additional packages in lxd container
2023-06-11 18:57:24 +03:00
Lea Waller
e3065d6951
Allow installing additional packages in lxd
2023-06-11 17:32:30 +02:00
Gabriel
d56858a599
Merge pull request #102 from gabriel-samfira/validate-provider-responses
...
Validate provider responses
2023-06-11 15:13:03 +03:00
Gabriel Adrian Samfira
06745eb88a
Validate the result returned by providers
...
Providers may return only 3 possible statuses:
* InstanceRunning
* InstanceError
* InstanceStopped
Every other status is reserved for the controller to set. Provider
responses will be split from the instance response in a future commit.
Signed-off-by: Gabriel Adrian Samfira <gsamfira@cloudbasesolutions.com>
2023-06-11 15:02:36 +03:00
Gabriel Adrian Samfira
e6a4137e3b
properly set version
...
Signed-off-by: Gabriel Adrian Samfira <gsamfira@cloudbasesolutions.com>
2023-06-08 18:07:35 +03:00
Gabriel
dd1569a8da
Merge pull request #101 from gabriel-samfira/do-not-merge-second-column
...
Don't merge the second column in the CLI
2023-06-08 14:16:14 +03:00
Gabriel Adrian Samfira
66dc18c3ff
Don't merge the second column in the CLI
...
Signed-off-by: Gabriel Adrian Samfira <gsamfira@cloudbasesolutions.com>
2023-06-08 13:57:08 +03:00
Gabriel
b46d7eb6fe
Merge pull request #97 from gabriel-samfira/lxd-add-timeouts
...
Parallelization and LXD timeouts
2023-06-08 13:42:47 +03:00
Gabriel
e3bcee89a4
Merge pull request #98 from mihaelabalutoiu/add_db_users_unit_tests
...
Add `users.go` unit tests
2023-06-07 12:55:44 +03:00
Mihaela Balutoiu
a25991ee2f
Add users.go unit tests
...
Signed-off-by: Mihaela Balutoiu <mbalutoiu@cloudbasesolutions.com>
2023-06-07 12:46:47 +03:00
Gabriel
65c86c96f0
Merge pull request #99 from ionutbalutoiu/fix-makefile-typo
...
Fix Makefile typo
2023-06-07 10:10:11 +03:00
Ionut Balutoiu
38d3b6100b
Fix Makefile typo
...
Signed-off-by: Ionut Balutoiu <ibalutoiu@cloudbasesolutions.com>
2023-06-07 10:01:03 +03:00
Gabriel Adrian Samfira
d8ed55288f
Small comment change
...
Signed-off-by: Gabriel Adrian Samfira <gsamfira@cloudbasesolutions.com>
2023-06-06 14:55:08 +00:00
Gabriel Adrian Samfira
829933559d
Allow installing runners to finish
...
Signed-off-by: Gabriel Adrian Samfira <gsamfira@cloudbasesolutions.com>
2023-06-06 14:49:28 +00:00
Gabriel Adrian Samfira
bd2f103743
Wait for addPendingInstances to finish
...
Signed-off-by: Gabriel Adrian Samfira <gsamfira@cloudbasesolutions.com>
2023-06-06 16:40:27 +03:00
Gabriel Adrian Samfira
e9f66c2035
Wait for deletePendingInstances() to finish
...
Use an errgroup to wait for all instance deletion operations before
returning. Log any failure.
Signed-off-by: Gabriel Adrian Samfira <gsamfira@cloudbasesolutions.com>
2023-06-06 16:36:08 +03:00
Gabriel Adrian Samfira
05a79d298c
Move some code around
...
Signed-off-by: Gabriel Adrian Samfira <gsamfira@cloudbasesolutions.com>
2023-06-06 16:31:30 +03:00
Gabriel Adrian Samfira
9efefc0d6a
Parallelization and LXD timeouts
...
* cleanupOrphanedGithubRunners() now uses errgroup to parallelize and
report errors when removing runners from the provider.
* retryFailedInstancesForOnePool() now uses errgroup
* Removed some setPoolRunningState which should be treated in the loop
where those errors eventually bubble up and can be handled.
* Added a number of timeouts in the LXD provider for delete and list
instances. This provider should be converted into an external
provider.
Signed-off-by: Gabriel Adrian Samfira <gsamfira@cloudbasesolutions.com>
2023-06-06 16:07:07 +03:00
Gabriel
aee4eb24b2
Merge pull request #95 from gabriel-samfira/lxd-disable-updates
...
Allow disabling updates
2023-06-05 01:35:26 +03:00
Gabriel Adrian Samfira
88a39220f5
Allow disabling updates
...
Signed-off-by: Gabriel Adrian Samfira <gsamfira@cloudbasesolutions.com>
2023-06-04 22:28:50 +00:00
Gabriel
524ed99950
Merge pull request #94 from gabriel-samfira/lxd-set-image-expiration
...
Let CreateInstance download and cache image
2023-06-05 01:03:49 +03:00
Gabriel Adrian Samfira
06d2e6f6cd
Send a fail status if chcon fails
...
Signed-off-by: Gabriel Adrian Samfira <gsamfira@cloudbasesolutions.com>
2023-06-04 21:50:49 +00:00
Gabriel Adrian Samfira
19118008b1
Properly set security context
...
Signed-off-by: Gabriel Adrian Samfira <gsamfira@cloudbasesolutions.com>
2023-06-04 21:47:34 +00:00
Gabriel Adrian Samfira
132823b453
Let CreateInstance download and cache image
...
Signed-off-by: Gabriel Adrian Samfira <gsamfira@cloudbasesolutions.com>
2023-06-04 21:20:22 +00:00
Gabriel
9d200d5352
Merge pull request #92 from gabriel-samfira/fix-lxd-list-instances
...
Fix pool ID check when listing instances
2023-06-04 15:44:46 +03:00
Gabriel Adrian Samfira
234095e456
Fix pool ID check when listing instances
...
We should be looking for the poolIDKey in the extended LXD config.
Signed-off-by: Gabriel Adrian Samfira <gsamfira@cloudbasesolutions.com>
2023-06-04 15:43:03 +03:00
Gabriel
fdfcc619ad
Merge pull request #87 from mercedes-benz/userdata-options
...
Add Userdata options to disable package update during boot / cloud-init
2023-04-19 12:29:15 +02:00
Michael Kuhnt
535c875eb8
add userdata options to allow disabling package updates during boot / cloud-init
2023-04-19 11:40:51 +02:00
Michael Kuhnt
37c8af0fb1
formatting stuff
2023-04-19 11:39:55 +02:00
Gabriel
690db913c3
Merge pull request #84 from mercedes-benz/skip-runner-install
...
check if runner needs to be installed
2023-04-19 11:01:07 +02:00
Michael Kuhnt
7719f4e54c
remove insecure flag in curl
2023-04-18 18:32:43 +02:00
Michael Kuhnt
759c43cdd7
add possibility to cache action-runner versions
2023-04-18 18:31:35 +02:00
Michael Kuhnt
35312972cb
check if runner needs to be installed
2023-04-12 14:51:23 +02:00
Gabriel Adrian Samfira
385503f06c
Update docs
...
Signed-off-by: Gabriel Adrian Samfira <gsamfira@cloudbasesolutions.com>
2023-04-07 00:06:18 +03:00
Gabriel Adrian Samfira
13ac528ae3
Fix tests
...
Signed-off-by: Gabriel Adrian Samfira <gsamfira@cloudbasesolutions.com>
2023-03-31 15:03:08 +00:00