Getting Started with YourBase¶
YourBase provides an accelerated software build service that is 3 to 10 times faster than existing build and test tools. It can be used to run remote builds during local development and as a replacement for traditional CIs.
To use YourBase you need a .yourbase.yml file in your repository with enough information to build your project:
1 2 3 4 5 6 7 8 9 10 11 12 13 14
dependencies: build: - python:3.6.3 build_targets: - name: default commands: - pip install -r requirements.txt - python tests/run_tests.py ci: builds: - name: tests build_target: default
The YourBase config was designed from the ground up to be a fast, composable and easy to use method to declare build targets. Targets defined in the config are built in an isolated and uniform container, so local builds are similar to remote builds.
The YourBase YAML replaces both legacy CI configs and container build configuration formats like Dockerfile. It uses containers underneath and you can still run things on the side like MySQL, Postgres, Redis or any service from a container image.
For more examples and a complete reference to the YAML configuration syntax, see Yourbase YAML Config.
Test the .yourbase.yml locally¶
You can test the configuration locally before committing and pushing it by using the open-source yb tool. In the root directory of your repository, run yb build to build the default target. Or yb build target to build a different build_target.
Make sure you have a .yourbase.yml file in that directory.
Triggering Builds from GitHub pushes¶
Push any change to GitHub, on any branch. If the .yourbase.yml file is in that change and is valid, you should see your build in the dashboard.
By default, the YourBase Build Service runs the specified build targets whenever there is a GitHub push event. You can change it to only build after certain events, by specifying conditions for build service builds:
1 2 3 4 5
ci: builds: - name: tests build_target: default when: branch is 'master' OR action is 'pull_request'
See Yourbase YAML Config for details.