Commit Graph

203 Commits

Author SHA1 Message Date
Hidde Beydals 0358ebc43d Change image to image under Flux organization
Signed-off-by: Hidde Beydals <hello@hidde.co>
2021-09-30 16:37:05 +02:00
Hidde Beydals 7a212b6570 Add `docker-buildx` target to `Makefile`
To allow building a multi-platform container image using `buildx`.

Various configuration flags allow for fine(r)-grain control over the
build process:

- `BASE_IMG`: FQDN of the base image that should be used, without a
  tag.
- `BASE_TAG: tag of the base image that should be used. Allows checksum
  sum to be included.
- `BUILDX_PLATFORMS`: platforms to target for the final container
  image.
- `BUILDX_ARGS`: additional `docker buildx build` arguments, e.g.
  `--push` to push the result to a (local) image registry.

Signed-off-by: Hidde Beydals <hello@hidde.co>
2021-09-30 16:37:05 +02:00
Hidde Beydals d3c27c37f8 Update github.com/libgit2/git2go to v31.6.1
This commit updates `github.com/libgit2/git2go` to `v31.6.1` (with
`libgit2` `1.1.1`), and changes the container image build process so
that it makes use of `ghcr.io/hiddeco/golang-with-libgit2`.

This image provides a pre-build dynamic `libgit2` dependency linked
against OpenSSL and LibSSH2 (without gcrypt), and a set of cross-compile
build tools (see
[rationale](https://github.com/hiddeco/golang-with-libgit2#rationale) and
[usage](https://github.co/hiddeco/golang-with-libgit2#usage) for more
detailed information).

The linked set of dependency should solve most known issues around
unsupport private key types, but does not resolve the issues with ECDSA*
and ED25519 hostkeys yet. Solving this requires a newer version of
`libgit2` (`>=1.2.0`), which currently does not seem to work properly
with `git2go/v32`.

Some small changes have been made to the `libgit2` package to address
(future) deprecations.

Signed-off-by: Hidde Beydals <hello@hidde.co>
2021-09-30 16:36:20 +02:00
Sunny cb3fb3bb4e
workflows/e2e: Use fluxcd/pkg/actions/envtest
Use fluxcd/pkg/actions/envtest to setup envtest.

Since the run-test action runs in a container, the host $PATH is not
passed to the test container. The ENV directive in actions/run-tests
Dockerfile is used to append the PATH with envtest binary path. This
helps avoid redownload of the envtest binaries when it's not found in
the path via the Makefile targets.

Signed-off-by: Sunny <darkowlzz@protonmail.com>
2021-08-01 21:07:27 +05:30
Stefan Prodan 25a2428b80
Print pods status on e2e failures
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2021-06-29 16:40:15 +03:00
Hidde Beydals fdb0a0b8c1 Use Debian Slim image in GitHub action
Signed-off-by: Hidde Beydals <hello@hidde.co>
2021-06-22 13:01:31 +02:00
Hidde Beydals 8acb8cd688 Use `github.repository` property for image name
As the `github.event.repository.name` property is not always available,
for example when the action gets triggered by a cron job.

Signed-off-by: Hidde Beydals <hello@hidde.co>
2021-06-09 11:49:20 +02:00
Stefan Prodan 203263fcfd
Add nightly builds workflow
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2021-06-08 19:42:46 +03:00
Stefan Prodan 2819924c78
Add e2e tests for large Git repositories
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2021-06-02 12:45:38 +03:00
Hidde Beydals d3bcc6a66b Update Go to 1.16
This commit updates Go to 1.16, a required change because of the use of
`os.WriteFile` in one of the tests introduced by commit
b5004a93bc.

Normally _just_ this would not justify the change, but given the
introduction of breaking changes (and thereby forcing a MINOR update
anyway), and the various file{system, path} improvements introduced in
Go 1.16 like
[`filepath#WalkDir`](https://golang.org/pkg/path/filepath/#WalkDir),
going ahead with this should be fine.

Signed-off-by: Hidde Beydals <hello@hidde.co>
2021-04-13 16:35:41 +02:00
Stefan Prodan fd13ebdcf0
Add CodeQL scanning
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2021-03-12 12:44:39 +02:00
Stefan Prodan 2ef7904c9d
Normalise release workflow
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2021-03-12 12:41:57 +02:00
Stefan Prodan 2dce2174a2
Fix release workflow
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2021-02-23 15:55:56 +02:00
Stefan Prodan 280bbaa69d
Refactor release workflow
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2021-02-23 14:38:11 +02:00
Hidde Beydals 74363f3d5e Publish as single multi-arch Docker image
This commit bundles the `source-controller:$VER-arm64` ARM image tag
range that was previously released separately with the
`source-controller:$VER` image, as GitHub now provides us insights into
image layer statistics.

Signed-off-by: Hidde Beydals <hello@hidde.co>
2021-01-11 12:59:14 +01:00
Hidde Beydals 3feda81109 Tweak `musl` and `libgit2{-dev}` dependencies
* Use semver tidles to deal with future patch releases
* Install just `libgit2` in runtime container
* Add TODO / explanation for `musl` `1.2.x` dependency

Signed-off-by: Hidde Beydals <hello@hidde.co>
2020-12-10 00:05:58 +01:00
Hidde Beydals 38e2e58c54 Use semver tidle range for `libgit2-dev` package
Signed-off-by: Hidde Beydals <hello@hidde.co>
2020-12-09 17:00:17 +01:00
Philip Laine 6344528e4f Fix smaller issues
Signed-off-by: Philip Laine <philip.laine@gmail.com>
2020-12-02 20:18:29 +01:00
Philip Laine 873c349647 Add libgit2 dev dependencies
Signed-off-by: Philip Laine <philip.laine@xenit.se>
2020-12-02 20:18:29 +01:00
Philip Laine 00b4010096 Add libgit2 to test dockerfile
Signed-off-by: Philip Laine <philip.laine@xenit.se>
2020-12-02 20:18:29 +01:00
Aurel Canciu 27420c0454
Use golang image to run tests step
Signed-off-by: Aurel Canciu <aurelcanciu@gmail.com>
2020-11-27 15:00:54 +02:00
Stefan Prodan be818469ea
Print controller logs in CI
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2020-11-12 17:02:40 +02:00
Stefan Prodan ef5749105d
Update engineerd/setup-kind to v0.5.0
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2020-11-12 12:07:35 +02:00
Aurel Canciu ad995d80cc
Reorganize helm chart testdata for controllers
Signed-off-by: Aurel Canciu <aurelcanciu@gmail.com>
2020-10-28 14:57:12 +02:00
Stefan Prodan ea976cf63a
Update fossa action
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2020-10-28 13:59:03 +02:00
Hidde Beydals 335a091f60 Use GitHub actions from fluxcd/pkg@main
As `master` was replaced with `main`.
2020-10-06 10:37:15 +02:00
Hidde Beydals f7ceac644d e2e: use podinfo chart for valuesfile tests 2020-10-06 10:37:15 +02:00
stefanprodan f81b479382 Set default branch to main
Signed-off-by: stefanprodan <stefan.prodan@gmail.com>
2020-10-05 15:42:37 +03:00
stefanprodan f16e5f041a Promote API to v1beta1 2020-09-30 16:11:00 +03:00
Hidde Beydals ac84c70a4c ci: pin Minio to v6.3.1
Due to corrupt v7.0.0 chart release.
2020-09-22 12:27:46 +02:00
Hidde Beydals 1798b200c9 e2e: test HelmChart from Bucket 2020-09-21 12:40:15 +02:00
stefanprodan d55417b9b2 Publish ARM v7/v8 multi-arch image to GHCR 2020-09-21 09:50:23 +03:00
Hidde Beydals 0d50de8aca
Merge pull request #149 from fluxcd/fossa-scan
FOSSA scan enabled
2020-09-18 16:07:07 +02:00
stefanprodan 7abb7ccf60 Add Bucket e2e tests 2020-09-18 16:11:24 +03:00
Hidde Beydals 40ddf3c731 FOSSA scan enabled 2020-09-18 14:28:38 +02:00
Hidde Beydals 2576c739f4 ci: add sanity check for container images
Fail build if container images have been pushed with corrupted layers
and enable buildx debug logs.
2020-09-18 13:41:59 +02:00
Hidde Beydals eaec41f6e9 e2e: test HelmChart ValuesFile 2020-09-11 13:33:08 +02:00
Hidde Beydals f08febdffa Bump build-push-action version 2020-09-10 14:21:16 +02:00
stefanprodan d927a1e4aa Publish amd64/arm64 images to GHCR 2020-09-04 13:41:50 +03:00
stefanprodan 34dd00d5d8 Fix release GH action 2020-07-31 10:01:02 +03:00
Michael Bridgen 44fc115a3a Remove local actions and use those from fluxcd/pkg 2020-07-24 12:20:08 +01:00
stefanprodan 7e2fe14efa Upgrade CRDs to apiextensions.k8s.io/v1 2020-07-20 12:21:34 +03:00
Hidde Beydals c58bd7931f Use Docker organization secrets in build 2020-07-13 23:21:30 +02:00
stefanprodan d27cc96233 Reconcile sources in the runtime namespace only 2020-05-03 13:04:00 +03:00
stefanprodan 379729cb8b ci: Extract tag from GITHUB_REF 2020-04-16 14:55:55 +03:00
stefanprodan 71272ef7d9 ci: use go 1.14 2020-04-13 20:40:36 +03:00
stefanprodan 3bd15423e4 ci: Check if working tree is dirty
- run unit tests in a dedicated CI step
- check if working tree is dirty and fail CI build
2020-04-13 20:23:58 +03:00
stefanprodan caedca3598 ci: Add release workflow
- create GitHub release and link to changelog
- build and push container image to Docker Hub
- build kustomization and upload asset to GitHub release
2020-04-13 18:28:22 +03:00
Hidde Beydals d378bd1852 Introduce HelmChart API and controller
- Add the HelmChart types and controller
- Semver expressions are found by utilizing Helm repository index
  helpers. As Helm makes use of `masterminds/semver`, the support
  for i.e. ranges less mature than the `GitRepository` implementation.
- Recorded semver is as defined in the metadata of the chart. The
  used name for the artifact does however include the checksum of the
  chart archive, as chart maintainers may not always properly apply
  semver.
- Switches to `sigs.k8s.io/yaml` for YAML operations as this among
  other things is able to properly unmarshal embedded structures.
- Directly requeues on transient errors instead of using the defined
  interval as a back-off strategy is applied on repeated failures.
2020-04-12 18:44:37 +02:00
Hidde Beydals 4d30a82ef4 Rename project to source-controller 2020-04-08 16:12:17 +03:00
stefanprodan d4b9e17800 Move dev deploy script to Makefile 2020-04-08 15:14:32 +03:00
stefanprodan 065825c12d Add smoke tests to CI 2020-04-08 14:26:07 +03:00
stefanprodan 86c2c9f745 Implement CI with GitHub Actions 2020-04-08 14:17:06 +03:00