Authoring new tools
This document describes the process for authoring new tools for the uniget installer and updater.
Tools are packaged, stored and transported as container images but containerization is not used to execute the tools. After the installation, tools are available natively. For more details, see concepts.
- Fork and clone the tools repository
- Create a new branch
- Create a new directory under
tools/
for your tool - Instead of beginning from scratch...
- Either add files from
@template/
to your new directory - Or copy from an existing tool
- Either add files from
- Refer to manifest to customize
manifest.yaml
- If the binary for your tool has a different name, use the
binary
field in themanifest.yaml
. A relative path will be resolved to${target}/bin
. An absolute path should start with the placeholder${target}
-
Mind the following when customizing
Dockerfile.template
- All files must be placed under
/uniget_bootstrap
- The file requires a final target called
prepare
-
If you rely on an existing tool to package your tool, declare the respective container image first, e.g.
make
:FROM ghcr.io/uniget-org/tools/make:latest AS make
If you are using a pinned version instead of the
latest
tag, the tag will not get renovated. This is not recommended.The copy the contents into your image:
COPY --from=make / /usr/local
Also add these dependencies to the
build_dependencies
field inmanifest.yaml
-
If you rely on an existing tool to execute your tool (e.g.
go
ormake
), add the dependencies to theruntime_dependencies
field inmanifest.yaml
- Examples for many scenarios are included in
@template/Dockerfile.template
- Build the container image for your new tool:
make TOOL--debug
- Explore the contents interactively
- Determine the command to extract the version
- Update the
version
field in yourmanifest.yaml
. Use the placefolder${binary}
instead of the binary name - Update the Renovate configuration:
make renovate.json
- Create a pull request
- All files must be placed under