Commit graph

36 commits

Author SHA1 Message Date
Lionel ORRY
3853f8bd94 improve usability of podman in Makefile 2025-07-02 14:04:41 +02:00
Gabriel Adrian Samfira
48c4ea7d15 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:07:46 +00:00
Gabriel Adrian Samfira
e51f19acc8 Fix lint errors
Signed-off-by: Gabriel Adrian Samfira <gsamfira@cloudbasesolutions.com>
2025-05-03 22:29:40 +00:00
Michael Kuhnt
53bc1eedce fix: remove duplication in Makefile 2024-11-26 15:04:53 +01:00
Michael Kuhnt
386aba18c0 set specific linter version 2024-11-26 07:49:08 +01:00
Gabriel Adrian Samfira
42ae3c52d1 Add version to controller info response
This change adds the GARM server version to the controller info response.

Signed-off-by: Gabriel Adrian Samfira <gsamfira@cloudbasesolutions.com>
2024-07-05 12:49:16 +00:00
Fabian Fulga
9d4c0a953c Adding garm test suite 2024-06-17 12:36:00 +03: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
3e60a48ca8 Preload credentials endpoint and remove extra code
Signed-off-by: Gabriel Adrian Samfira <gsamfira@cloudbasesolutions.com>
2024-04-22 14:03:25 +00:00
Gabriel Adrian Samfira
00fd7c1204 Switch to apg for password gen
Signed-off-by: Gabriel Adrian Samfira <gsamfira@cloudbasesolutions.com>
2024-02-26 16:44:47 +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
Gabriel Adrian Samfira
b4dde6a839 Allow integration tests to run locally
This change adds the ability to run integration tests locally. You will
still need a number of environment variables set, including a github PAT.

Details on how to use this will come in a subsequent commit.

Signed-off-by: Gabriel Adrian Samfira <gsamfira@cloudbasesolutions.com>
2024-02-26 16:28:07 +00:00
Mario Constanti
7221812dfa fix: remove unused cobra args
Signed-off-by: Mario Constanti <mario.constanti@mercedes-benz.com>
2024-02-22 17:20:05 +01: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
023652d76d fix: make build as PHONY target
without build as PHONY target, nothing will happen once the build
directory got created.

Signed-off-by: Mario Constanti <mario.constanti@mercedes-benz.com>
2024-02-22 15:06:53 +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
Gabriel Adrian Samfira
af54b55cea Enable Windows builds
This change adds the needed bits to enable Windows builds. This also adds
a new make target to create the release files that will be uploaded as part
of new releases.

Signed-off-by: Gabriel Adrian Samfira <gsamfira@cloudbasesolutions.com>
2023-08-18 14:46:00 +00: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 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
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
e7f208367b
Error if we can't remove instance from provider
Signed-off-by: Gabriel Adrian Samfira <gsamfira@cloudbasesolutions.com>
2023-03-26 22:19:20 +03:00
Gabriel Adrian Samfira
829db87f15
Rename module
This change renames the module from "garm" to "github.com/cloudbase/garm".

This will make it easier to consume public functions defined in garm, by
external applications, without having to resort to replace.

Signed-off-by: Gabriel Adrian Samfira <gsamfira@cloudbasesolutions.com>
2023-03-12 16:01:49 +02:00
Gabriel Adrian Samfira
b8e02ecbe1
Disable Windows binary build
Signed-off-by: Gabriel Adrian Samfira <gsamfira@cloudbasesolutions.com>
2023-01-21 01:32:19 +02:00
Gabriel Adrian Samfira
ee06fe7384
Add lint, fmt and install-lint-deps targets
Signed-off-by: Gabriel Adrian Samfira <gsamfira@cloudbasesolutions.com>
2023-01-21 00:41:33 +02:00
Gabriel Adrian Samfira
3aef31d0f0
Make verify-vendor message more friendly
Signed-off-by: Gabriel Adrian Samfira <gsamfira@cloudbasesolutions.com>
2023-01-21 00:26:20 +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
687c48127b
Fix some linting issues and add verify-vendor
Signed-off-by: Gabriel Adrian Samfira <gsamfira@cloudbasesolutions.com>
2023-01-20 21:55:52 +02:00
Gabriel Adrian Samfira
0ff2fd2e06
Make owners and repos case insensitive
Github treats owners (users and orgs) and repos as case insensitive. To
github, https://github.com/cloudbase/garm is equivalent to
https://github.com/CloudBase/GaRm. This commit makes the sql store
backend, case insensitive when querying repos and orgs.

Fixes: #25

Signed-off-by: Gabriel Adrian Samfira <gsamfira@cloudbasesolutions.com>
2022-10-05 18:14:07 +03:00
Gabriel Adrian Samfira
b4ac128673
Create a testing package for common utilities
Signed-off-by: Gabriel Adrian Samfira <gsamfira@cloudbasesolutions.com>
2022-09-15 17:48:09 +03:00
Ionut Balutoiu
8f29f90488 Add 'go test' Makefile target
Signed-off-by: Ionut Balutoiu <ibalutoiu@cloudbasesolutions.com>
2022-09-07 16:32:29 +03:00
Gabriel Adrian Samfira
42249ede0b Set SELinux labels on host FS when building via docker/podman
Adds :z to the bind mount, ensuring the container can access the files
when SELinux is enabled.

Signed-off-by: Gabriel Adrian Samfira <gsamfira@cloudbasesolutions.com>
2022-06-30 15:11:10 +00:00
Kai Lueke
f052709112 Support building with Podman instead of Docker
When /usr/bin/docker is a wrapper for podman (as common no Fedora),
Podman will be used which requires the full image name including the
registry. It does not require the chown step, because this results in
the files being owned by a temporary mapped ID due to the user
namespace in rootless mode (which is the default unless Podman is run
by the root user) - make the chown a no-op by using UID/GID 0.
2022-06-30 13:06:33 +02:00
Gabriel Adrian Samfira
9e949d833f Update .gitignore
Signed-off-by: Gabriel Adrian Samfira <gsamfira@cloudbasesolutions.com>
2022-06-30 10:34:51 +00:00
Gabriel Adrian Samfira
bbbe67bf7c Vendor packages and add Makefile
* Vendors packages
  * Adds a Makefile that uses docker to build a static binary against musl
using alpine linux.

Signed-off-by: Gabriel Adrian Samfira <gsamfira@cloudbasesolutions.com>
2022-06-30 10:20:32 +00:00