Builds & testing
Buddy uses delivery pipelines to build, test and deploy websites and applications. The pipelines consist of actions that can be easily arranged, covering the entire process of web development: fetching dependencies, compiling code, compressing CSS, running task managers, and serving all modern backend, frontend, mobile, and container technologies – basically any task that your workflow requires.
When the pipeline is triggered, Buddy launches an isolated Docker container in which it runs commands on pulled repository files. The artifacts (files created by the container action) are saved in the pipeline filesystem and remain available for other actions, including deployments.
Overview
Buddy spans over 20 predefined environments for the most popular programming languages, frameworks, static site generators, and task runners. The environments and their configuration are officially approved by their authors and communities connected with a given language or tool.
Image loading...
Configuration
Once you add a container action, you need to configure the commands to run, and the environment in which they will be executed. For example, if you want to test your PHP application, you need to select the PHP action, choose the version of PHP, and define the commands (e.g. vendor/bin/phpunit
).
Build commands
Build commands are defined in the Run tab. They are run on every execution and should be used for:
- fetching dependencies
- building and testing your application
Image loading...
apt-get install
). For this purpose, use the environment tab (see below).
Environment
The runtime environment tab lets you specify the version of the framework or tool that you need. All actions use official Docker images from the Docker Hub as the template. You can also use custom images from the selected registry.
Image loading...
If the selected image is missing some components required by the build (e.g. PHP extensions or Apache modules), you can install them in the Packages & Tools section of the environment tab.
Image loading...
- When environment commands are run, repository files are not available. This means you should not use it to download dependencies already defined in the repository.
- Environment variables and SSH keys are also not available during the execution of the commands.
- If you want to use multi-line commands, make sure to end lines with a backslash
\
.
Filesystem mount path
By default, the filesystem is mounted to a container in the /buddy/$repo-slug-name
path. This is the same path where build commands are executed. You can change the mount path in the Cache tab:
Image loading...
Docker Container as build environment
Besides predefined environments, you can use your own Docker image as your build template. In this case, select the Custom action:
Image loading...
The action comes with plain Ubuntu 20.04 as default, but you can change it to any image pulled from Docker Hub, Amazon ECR, Google GCR, Google Artifact Registry, or your own private registry. The required dependencies and tools can be installed in the Packages & Tools tab.
Image loading...
Last modified on Sep 23, 2024