Commit Graph

144 Commits (e22ad9616447aeb5b056f11ab684d73c4740b2e2)

Author SHA1 Message Date
Stefan Prodan fb713e9632
Mark the validation arg as deprecated
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
3 years ago
Stefan Prodan 83c3e8c2fc
Replace kubectl with Go server-side apply
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
3 years ago
Philip Laine d8235ea21b Add Azure E2E tests
Signed-off-by: Philip Laine <philip.laine@xenit.se>
3 years ago
Michael Bridgen 9d9fff5796 Update Makefile target in release workflow
There's another location which uses the "manifests directory" target
directly, but isn't run when testing a PR: the release workflow.

Signed-off-by: Michael Bridgen <michael@weave.works>
3 years ago
Michael Bridgen 7ae4f28920 Use a file to record successful manifests build
Using the directory cmd/flux/manifests as a prerequisite causes a
problem: if the script that creates the files within fails, the next
invocation of make will see the directory and assume it
succeeded. Since the executable expects certain files to be present,
but they are not explicit prerequisites of the recipe for building the
binary, this results in a successful build but a broken `flux`
executable.

Instead, depend on a file that's explicitly updated when the script
has succeeded, and which itself depends on the inputs.

A couple of the CI workflows run

    make cmd/flux/manifests

before doing other things, presumably as a way to avoid running the
whole test suite in a CI pipeline for some purpose other than testing,
so these needed changing as well.

Signed-off-by: Michael Bridgen <michael@weave.works>
3 years ago
Stefan Prodan 94940a20ef
Move arm64 e2e to Go tests
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
3 years ago
Stefan Prodan 375edffd15
Add image scanning e2e tests
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
3 years ago
Chanwit Kaewkasi 8f78263455 implement testEnv for e2e tests
Signed-off-by: Chanwit Kaewkasi <chanwit@gmail.com>
3 years ago
Stefan Prodan a72ff06d79
e2e: Update Kubernetes to v1.21.1
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
4 years ago
Stefan Prodan cf239deb3d
Print pods status on e2e failures
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
4 years ago
Stefan Prodan 3f081ba2d9
Add flux trace to e2e tests
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
4 years ago
Stefan Prodan fdc366ec1c
Increase wait time for the helm e2e test
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
4 years ago
Stefan Prodan d455db444c
Add libgit2 test to bootstrap workflow
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
4 years ago
Stefan Prodan 8e4b2ead9b
Add provisioning script for ARM64 GitHub runners
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
4 years ago
Stefan Prodan 78f1b634fa
Run end-to-end tests on Ampere ARM64
GitHub self-hosted runner info:
- Owner: Stefan Prodan
- VM: Oracle Cloud VM.Standard.A1.Flex 4CPU 24GB RAM
- OS: Linux 5.4.0-1045-oracle #49-Ubuntu SMP aarch64
- Packages: docker, kind, kubectl, kustomize

Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
4 years ago
Daniel Holbach 86a3cf20e7 Stop deploying to Github pages
Fixes: #1135

Signed-off-by: Daniel Holbach <daniel@weave.works>
4 years ago
Daniel Holbach a40d124e23 add script to copy docs assets for Netlify build
Signed-off-by: Daniel Holbach <daniel@weave.works>
4 years ago
Hidde Beydals a56ce1f867 build: tidy after go mod edit
To ensure the `go.sum` is always up-to-date when the following `go mod
edit` is executed.

Signed-off-by: Hidde Beydals <hello@hidde.co>
4 years ago
Hidde Beydals 1a904e138f Fix update automation and update CRDs
Signed-off-by: Hidde Beydals <hello@hidde.co>
4 years ago
Stefan Prodan 203157e525 Update the APIs docs
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
4 years ago
Hidde Beydals df6a0a3762 build: incl CRD version change in component update
This includes updating the version in the `manifests/crds` directory
for the component thas has a newer latest version.

Signed-off-by: Hidde Beydals <hello@hidde.co>
4 years ago
Stefan Prodan 68046067c5
Generate OpenAPI schema in CI
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
4 years ago
Stefan Prodan 18c3f79319
Add recurse submodules arg to create source git cmd
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
4 years ago
Hidde Beydals 1d3a381389 Test giving access to team in bootstrap e2e
Signed-off-by: Hidde Beydals <hello@hidde.co>
4 years ago
Hidde Beydals d0403038ed Enable QEMU and Docker Buildx in release action
Signed-off-by: Hidde Beydals <hello@hidde.co>
4 years ago
Stefan Prodan b54fd2c6b3
Add source namespace to create commands
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
4 years ago
Hidde Beydals 077860fff1 Fix updating of `go.mod` entries for components
We noticed that some of our components had not received `go.mod` updates
while they did receive updates for the versions declared in the YAML
manifests.

Was able to trace this back to a behavior change in Go since `1.16.x`,
resulting in it no longer making automated changes to `go.mod` and
`go.sum`[1]. This is an issue for our updater script as it relies
on `go list -m all`, which now after the first `go mod edit` returns:

```console
$ go list -m all
go: github.com/fluxcd/notification-controller/api@v0.10.0: missing
go.sum entry; to add it:
        go mod download github.com/fluxcd/notification-controller/api
```

To work around the issue without having to repeatedly call `go mod
tidy`, I have opted to simply `grep` on the contents of `go.mod` as a
workaround.

[1]: https://blog.golang.org/go116-module-changes#TOC_3.

Signed-off-by: Hidde Beydals <hello@hidde.co>
4 years ago
Hidde Beydals 0239307d8e Change repository name used in bootstrap tests
This changes the name of the repository that is used for the GitHub
end-to-end tests to a name that is still traceable to the source
(repository) that created it, by using the format
`<ORIGIN_REPOSITORY_NAME>-<PSEUDO_RAND_SUFFIX>`.

The `PSEUDO_RAND_SUFFIX` is a SHA1 sum of the name of the branch and
commit SHA the tests run for, resulting in a 40 character suffix that
unlike the short commit SHA used before, should not result in collisions.

Signed-off-by: Hidde Beydals <hello@hidde.co>
4 years ago
Hidde Beydals 9f10b6be1b Replace delete opt on GitHub bootstrap with curl
Signed-off-by: Hidde Beydals <hello@hidde.co>
4 years ago
Hidde Beydals ba6da23323 Make manifests dir `bundle.sh` configurable
There was an assumption in this script that it is always executed in Git
repository/directory, this is however not always true, for example when
one downloads the `.tar.gz` that is made available for every release
by GitHub (and used in one of our AUR packages).

This commit changes this, and makes the first argument of `bundle.sh`
configurable, so a custom manifests directory can always be defined
_without_ relying on Git.

Omitting it, or passing an empty string, will still fall back to the
previous behavior of using `git rev-parse --show-toplevel`.

Signed-off-by: Hidde Beydals <hello@hidde.co>
4 years ago
Hidde Beydals 2b7a0f3fd4 Improve build process embedded manifests
This commit changes the way the build of manifests is triggered by
making smarter use of the capabilities of Make. The result should be
that the manifests are only regenerated if:

1. There is no `cmd/flux/manifests/` directory.
2. There have been made changes to the YAML files in the `manifests/`
   directory that are newer than the files in `cmd/flux/manifests/`.

Signed-off-by: Hidde Beydals <hello@hidde.co>
4 years ago
Stefan Prodan 6003d11156
Embed the install manifests in flux binary
- add make target for generating the install manifests using kustomize
- embed the generated manifests in flux binary
- the install and bootstrap commands default to using the embedded manifests
- download the install manifests from GitHub only if the install/bootstrap version arg is set

Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
4 years ago
Hidde Beydals 54bb4b2efd Properly setup Go version in update workflow
To prevent false `go.mod` modifications.

Signed-off-by: Hidde Beydals <hello@hidde.co>
4 years ago
Stefan Prodan 2fe55bcdde
Update Go to v1.16
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
4 years ago
Hidde Beydals 89c46a6379 Fix controller_version helper func
Signed-off-by: Hidde Beydals <hello@hidde.co>
4 years ago
Hidde Beydals 6db84269af Update Toolkit component update script
To recognize and correctly replace the versions in the components'
Kustomization files.

Signed-off-by: Hidde Beydals <hello@hidde.co>
4 years ago
Hidde Beydals 00a134e23f Fix detection of PRs from forks
Signed-off-by: Hidde Beydals <hello@hidde.co>
4 years ago
Hidde Beydals ff78af5808 Run bootstrap for trusted PRs
Signed-off-by: Hidde Beydals <hello@hidde.co>
4 years ago
Hidde Beydals 7eab649abc Bundle CodeQL, FOSSA, Snyk as jobs in workflow
Signed-off-by: Hidde Beydals <hello@hidde.co>
4 years ago
Hidde Beydals 1b5db157b1 Align formatting and extensions workflows
Signed-off-by: Hidde Beydals <hello@hidde.co>
4 years ago
Hidde Beydals 0fa9aebf7a Split analysis workflows into CodeQL, FOSSA, Snyk
This reverts #934, but takes into account the mistakes that were fixed
there.

Signed-off-by: Hidde Beydals <hello@hidde.co>
4 years ago
Stefan Prodan 26964b7f88
Merge scanning actions
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
4 years ago
Ihor Dvoretskyi 28d606cb0e Snyk GitHub Action added
Signed-off-by: Ihor Dvoretskyi <ihor@linux.com>
4 years ago
Chris Aniszczyk 9db5c644a6
Create codeql-analysis.yml
Add CodeSQL Security Scanning to start.

Signed-off-by: Chris Aniszczyk <caniszczyk@gmail.com>
4 years ago
Stefan Prodan f5ae8f44b4
Refactor flux uninstall command
- deletes Flux components (deployments and services)
- deletes Flux RBAC (service accounts, cluster roles and cluster role bindings)
- removes the Kubernetes finalizers from Flux custom resources
- deletes Flux custom resource definitions and custom resources
- deletes the namespace where Flux was installed
- preserves the Kubernetes objects and Helm releases that were reconciled on the cluster by Flux

Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
4 years ago
Jonathan Innis eb7102ecac
Adding extract pattern validation
Signed-off-by: Jonathan Innis <jonathan.innis.ji@gmail.com>
4 years ago
Jonathan Innis ade6bfcbca
Update e2e testing with new cli args
Signed-off-by: Jonathan Innis <jonathan.innis.ji@gmail.com>
4 years ago
Hidde Beydals ee4c1fb36c Put CHANGELOG URL on new line in commit / PR body
Signed-off-by: Hidde Beydals <hello@hidde.co>
4 years ago
Hidde Beydals 425af2e0dc Tune component update configuration
- Include link to changelog of component in commit and PR message
- Label pull request automatically with `area/build`
- Enable sign-off of commits to free us from manual labour

Signed-off-by: Hidde Beydals <hello@hidde.co>
4 years ago
Stefan Prodan 4e8a600f34
Add e2e tests for create secret commands
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
4 years ago