git clone https://github.com/superorbital/cludo
Development is driven by make (see the Makefile). Running make
will run the tests, build the cludo
and cludod
binaries, and create the docker images.
make
There's also:
make build
make test
make -j $(nproc) docker-local-arch-build
make swagger
# and more...
- Binaries are cross-compiled for various OS's and architectures and are available in the
builds/
directory.
If you have a cludod.yaml
file in ~/.cludod
then a local copy of the server can be built and spun up with:
docker compose up --build -d
You can run the CLI in a container using something like this:
docker run -ti \
-v ${PWD}/data/cludo.yaml:/root/.cludo/cludo.yaml \
-v ${PWD}/data/id_ed25519_TEST_KEY_PP:/app/id_ed25519_TEST_KEY_PP \
${IMAGE_ID} \
"cludo shell"
- Create a new branch from main
- Make your changes
- Update VERSION, CHANGELOG.md, the kustomization.yaml files under k8s/kustomize/overlays, and the helm [Chart.yaml in superorbital/helm-charts](./k8s/helm/cludo/Chart.yaml to reflect/install the new version.
- Create a PR
- Get approval
- Merge the PR
- Sit back and let the CI pipeline do it's job
If you are running Kubernetes locally with containerd via something like colima or Rancher Desktop then you can use something like the following to automate building and running the client and server.
- NOTE: You will need:
- A valid
cludod.yaml
config file stored atk8s/kustomize/base/files-secrets/secret-cludod.yaml
for this to work as expected. nerdctl
aliased to the correct version ofnerdctl
for your setup.
- A valid
make nc && { kukectl delete -k ./k8s/kustomize/overlays/local ; kubectl apply -k ./k8s/kustomize/overlays/local && sleep 10; echo -e "\n\n"; } && ./builds/darwin_amd64_cludo exec aws sts get-caller-identity
Dependabot creates pull requests for any dependencies that are in need of an update.
CodeQL is a semantic code analysis engine that is used to discover vulnerabilities across a codebase. CodeQL lets you query code as though it were data. Write a query to find all variants of a vulnerability and eradicating it forever. Then share your query to help others do the same.
Our CI pipeline uses GitHub Actions and GitHub Secrets to test, build, and release our code.
Note: With the exception of GITHUB_TOKEN, secrets are not passed to the runner when a workflow is triggered from a forked repository.
The workflow looks something like this:
- On any push:
- Set up
qemu
andbinfmt
to support multi-architecture container image builds. - Checkout source code.
- Setup
go
environment. - Install
snyk
CLI - Setup
docker buildx
and rundocker login
- Install and Run Kustomize
- List Kustomize Generated Manifests
- Install
go
dependencies. - Detect if this is a Pull Request (PR).
- Run
go
tests. - Run
snyk
to check for Go vulnerabilities. - Upload Snyk's
sarif
report to Github. - Determine the most recent version tag in
git
- Parse the Change Log.
- Build and push
cludo
andcludod
container images- We only do this step if:
- We ARE NOT on the
main
branch OR - We ARE on the
main
branch and a new version has been identified inCHANGELOG.md
.
- We ARE NOT on the
- We only do this step if:
- Run
snyk
to check forcludo
andcludod
image container vulnerabilities. - Upload Snyk's
sarif
reports to Github. - Build
cludo
andcludod
binaries for Github release- We only do this step if:
- We ARE on the
main
branch and a new version has been identified inCHANGELOG.md
.
- We ARE on the
- We only do this step if:
- Compress Binaries via UPX
- We only do this step if:
- We ARE on the
main
branch and a new version has been identified inCHANGELOG.md
.
- We ARE on the
- We only do this step if:
- Create a non-production release on Github
- We only do this step if:
- We ARE on the
main
branch, a new version has been identified inCHANGELOG.md
, and the release version has a suffix (e.g.0.0.1-alpha
)
- We ARE on the
- We only do this step if:
- Create a production release on Github
- We only do this step if:
- We ARE on the
main
branch, a new version has been identified inCHANGELOG.md
, and the release version does not have a suffix (e.g.1.0.0
)
- We ARE on the
- We only do this step if:
- Install Cosign
- We only do this step if:
- We ARE on the
main
branch, a new version has been identified inCHANGELOG.md
, and the release version does not have a suffix (e.g.1.0.0
)
- We ARE on the
- We only do this step if:
- Add cosign signature to cludo latest
- We only do this step if:
- We ARE on the
main
branch, a new version has been identified inCHANGELOG.md
, and the release version does not have a suffix (e.g.1.0.0
)
- We ARE on the
- We only do this step if:
- Add cosign signature to cludod latest
- We only do this step if:
- We ARE on the
main
branch, a new version has been identified inCHANGELOG.md
, and the release version does not have a suffix (e.g.1.0.0
)
- We ARE on the
- We only do this step if:
- Trigger a Slack message via a workflow.
- We only do this step if:
- A Github release was created.
- We only do this step if:
- Set up
The workflow looks something like this:
- On any PR closure:
- Install a fork of Docker 's
hub-tool
- Remove all PR-related container images via
hub-tool
- Install a fork of Docker 's