forked from fluxcd/image-automation-controller
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
As part of fluxcd/.github#4, create DEVELOPMENT.md
Will link to this doc from fluxcd.io/contributing so new folks can find this easily. Signed-off-by: Daniel Holbach <[email protected]>
- Loading branch information
Showing
2 changed files
with
52 additions
and
106 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
# Development | ||
|
||
> **Note:** Please take a look at <https://fluxcd.io/docs/contributing/flux/> | ||
> to find out about how to contribute to Flux and how to interact with the | ||
> Flux Development team. | ||
## Installing required dependencies | ||
|
||
The dependency [libgit2](https://libgit2.org/) needs to be installed to be able | ||
to run source-controller or its test-suite locally (not in a container). | ||
|
||
In case this dependency is not present on your system (at the expected | ||
version), the first invocation of a `make` target that requires the | ||
dependency will attempt to compile it locally to `hack/libgit2`. For this build | ||
to succeed; CMake, OpenSSL 1.1 and LibSSH2 must be present on the system. | ||
|
||
Triggering a manual build of the dependency is possible as well by running | ||
`make libgit2`. To enforce the build, for example if your system dependencies | ||
match but are not linked in a compatible way, append `LIBGIT2_FORCE=1` to the | ||
`make` command. | ||
|
||
### macOS | ||
|
||
```console | ||
$ # Ensure libgit2 dependencies are available | ||
$ brew install cmake [email protected] libssh2 pkg-config | ||
$ LIBGIT2_FORCE=1 make libgit2 | ||
``` | ||
|
||
### Linux | ||
|
||
```console | ||
$ # Ensure libgit2 dependencies are available | ||
$ pacman -S cmake openssl libssh2 | ||
$ LIBGIT2_FORCE=1 make libgit2 | ||
``` | ||
|
||
**Note:** Example shown is for Arch Linux, but likewise procedure can be | ||
followed using any other package manager, e.g. `apt`. | ||
|
||
## How to run the test suite | ||
|
||
Prerequisites: | ||
* go >= 1.16 | ||
* kubebuilder >= 2.3 | ||
* kustomize >= 3.1 | ||
|
||
You can run the unit tests by simply doing | ||
|
||
```bash | ||
make test | ||
``` |