Build Detector is a small CLI written in Bash that aims to simplify CI/CD by automatically detecting the build environment for a given project using Docker, Buildpack, or custom rules.
Build Detector is primarily designed to be used within a Tekton task. However, you can also test it locally by setting up the following environment variables:
-
PARAMS_BRANCH_OVERRIDE
: Override the detected branch name for the project. If the value matches the regular expression^v([0-9]+\.){0,2}(\*|[0-9]+)([-,a-z,0-9]*)$
, it is considered a tag. -
PARAMS_BUILD_FORMAT_OVERRIDE
: Override the detected build format for the project. This variable allows you to specify a custom build format. -
PARAMS_BUILD_TOOL_OVERRIDE
: Override the detected build tool for the project. This variable allows you to specify a custom build tool. -
PARAMS_CHART_NAME_OVERRIDE
: Override the detected Helm chart name for the project. This variable allows you to specify a custom Helm chart name. -
PARAMS_CHART_VERSION_OVERRIDE
: Override the detected Helm chart version for the project. This variable allows you to specify a custom Helm chart version. -
PARAMS_DEPLOY_ENABLED
: When set to "true", indicates that the project should be deployed. -
PARAMS_DIRECTORY
: Specify the directory to search for the project's build files. The build detector will look for files likeDockerfile
,build.gradle
,pom.xml
, andpackage.json
in this directory. -
PARAMS_DOCKERFILE_OVERRIDE
: Override the default Dockerfile path. This variable allows you to specify a custom Dockerfile location. -
OUTPUT_PATH
: Specify the directory where the build-detector.json output file will be saved. Defaults to the current directory if not set. -
OUTPUT_NAME
: Specify the name of the output file (build-detector.json). Defaults to "build-detector.json" if not set.
Build Detector is open-source software licensed under the MIT License. You can find the full license text in the LICENSE file.