Commit Graph

37 Commits (main)

Author SHA1 Message Date
Stefan Prodan 2b68c8c664
Update dependencies to Kubernetes 1.32.0 and Go 1.23.0
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
1 month ago
Stefan Prodan 47e30e2e5f
ci: Run bootstrap e2e using Kubernetes 1.30
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
8 months ago
Stefan Prodan 0dda09408c
Update dependencies to Go 1.22 and Kubernetes 1.29.3
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
10 months ago
Max Jonas Werner f03a1d19c1
Pin envtest version
[This
commit](4c2442e4d7)
causes failures to install envtest, see
https://github.com/kubernetes-sigs/controller-runtime/issues/2720 for
details.

This change pins envtest to the latest version that still works.

Signed-off-by: Max Jonas Werner <mail@makk.es>
10 months ago
Stefan Prodan 51b0cbfe28
Remove deprecated e2e tests
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
10 months ago
Somtochi Onyekwere f6b0c6e7ef Add refactored e2e tests
Signed-off-by: Somtochi Onyekwere <somtochionyekwere@gmail.com>
1 year ago
Hidde Beydals 18760acaa8
Update Go to 1.20
Signed-off-by: Hidde Beydals <hidde@hhh.computer>
2 years ago
Stefan Prodan 348408e16e
Build with Go 1.19
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2 years ago
Stefan Prodan b4fef0a6b9
Update Kubernetes dependencies to v1.25.0
- update `k8s.io` packages to match the Kubernetes v1.25.0 release
- update `kubectl` to v1.25.0 in the flux-cli container image
- update `go.mod` to Go 1.18

Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2 years ago
Stefan Prodan 803104578f
Add `make build-dev` command
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2 years ago
Hidde Beydals efe9a30523 Update dependencies
- github.com/Masterminds/semver/v3 to v3.1.1
- github.com/ProtonMail/go-crypto to v0.0.0-20220113124808-70ae35bab23f
- github.com/cyphar/filepath-securejoin to v0.2.3
- github.com/fluxcd/pkg/kustomize to v0.0.3
- github.com/fluxcd/pkg/runtime to v0.13.2
- github.com/fluxcd/pkg/ssa to v0.15.1
- github.com/fluxcd/pkg/ssh to v0.3.2
- github.com/fluxcd/pkg/untar to v0.1.0
- github.com/fluxcd/pkg/version to v0.1.0
- github.com/gonvenience/bunt to v1.3.3
- github.com/gonvenience/ytbx to v1.4.4
- github.com/google/go-containerregistry to v0.8.0
- github.com/homeport/dyff to v1.5.1
- github.com/olekukonko/tablewriter to v0.0.5
- github.com/spf13/cobra to v1.4.0
- golang.org/x/crypto to v0.0.0-20220321153916-2c7772ba3064
- k8s.io/kubectl to v0.23.4
- k8s.io/cli-runtime to v0.23.4
- sigs.k8s.io/cli-utils to v0.29.3

Signed-off-by: Hidde Beydals <hello@hidde.co>
3 years ago
Sunny 2c4c3fd749
test: ignore golden template files with -update
Add a template values check in the `assertGoldenTemplateFile()` function
to only update golden files if they aren't templates. A note is printed
when an update to a template golden file is needed and `-update` flag
can't update it.

Signed-off-by: Sunny <darkowlzz@protonmail.com>
3 years ago
Sunny edaf6ca522
Add test flag -update to update the golden files
Test flag `-update` can be used to update all the golden files whenever
the CLI output changes.

Signed-off-by: Sunny <darkowlzz@protonmail.com>
3 years ago
Sanskar Jaiswal 81a087095a fix makefile envtest setup and usage
Refactor logic to install helper tools into one function in the
Makefile. Add support for envtest to help install tools like kubectl,
etcd which helps users run tests more conveniently.

Signed-off-by: Sanskar Jaiswal <jaiswalsanskar078@gmail.com>
3 years ago
Stefan Prodan a0ce4b23d2
Update Git providers
- go-git-providers v0.5.1
- go-github v41.0.0
- go-gitlab v0.54.3

Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
3 years ago
Stefan Prodan b05059a9c4
Add e2e test for image automation
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
3 years ago
Somtochi Onyekwere 6a6bba8669 Add test for customizing bootstrap
Signed-off-by: Somtochi Onyekwere <somtochionyekwere@gmail.com>
3 years ago
Stefan Prodan 66780bbf54
Install envtest before running the unit tests
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
3 years ago
John Gardiner Myers e12988a8f9 Fix inadequate quoting of KUBEBUILDER_ASSETS
Signed-off-by: John Gardiner Myers <jgmyers@proofpoint.com>
3 years ago
Sunny 84c585cf61 Makefile: set install target as phony
`install/` directory results in make install target always up to date.
Mark `install` as phony to be able to run it.

Replace `cmd/flux` with `./cmd/flux` for install to work and add
`CGO_ENABLED=0` like in other build and install targets.

Signed-off-by: Sunny <darkowlzz@protonmail.com>
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 5c41924b2f
Add version arg to make build
Allow specifying the version when building the CLI binary with Make. This is useful for projects that distribute their own Flux CLI binary.

Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
3 years ago
Stefan Prodan b34b2d779b
Wire kubebuilder assets to envtest bin
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
3 years ago
Stefan Prodan d1982e64b2
Refactor 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
Daniel Holbach 695fb55b13 Remove Flux CLI docs
They are imported into the docs like so:
	https://github.com/fluxcd/website/blob/main/hack/import-flux2-assets.sh#L139

Signed-off-by: Daniel Holbach <daniel@weave.works>
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 56024de6cc Delete generated docs before regenerating them
This ensures no stray files are kept when for example a command name
changes.

Signed-off-by: Hidde Beydals <hello@hidde.co>
4 years ago
Hidde Beydals e2752e4508 Rename `gotk` binary to `flux`
Signed-off-by: Hidde Beydals <hello@hidde.co>
4 years ago
Hidde Beydals 22624ae4d5 Rename `tk` binary to `gotk`
To avoid conflicts with the `tk` binary from the Tanka project.
4 years ago
Hidde Beydals 9a6d48d038 docs: run doc gen as part of test target 5 years ago
stefanprodan afcb41c59b Add bash completion cmd 5 years ago
stefanprodan 3bcc2ae992 Format commands examples 5 years ago
stefanprodan 4a872836e3 Generate tk docs with cobra/doc 5 years ago
stefanprodan 35163fa9eb Add e2e tests for install command 5 years ago
stefanprodan c8fdf76084 Init toolkit CLI 5 years ago