Header

deploybuild.yaml

Alongside the features that are available within the Build Pipeline, you can conveninently define a build pipeline within a simple .deploybuild.yaml file.

This works in a very similar way to the .deployignore concept - just create your file, commit it to your repository, then DeployHQ will automatically read it as part of the deployment.

Out the box, we support being able to define build cache files, language versions, and commands. The feature should provide a number of advantages, including:

  • The ability to define build environments on a per-branch basis - simply commit one configuration within one branch and another one in a different branch, and you're good to go.
  • Developers, who want to quickly create a build environment offline in their development environment, don't need to have access to the DeployHQ UI to do so.
  • Being able to more easily "template" a build environment that could easily be copied across projects then modified as you go - again without the need to log in to the UI.

A simple example would look like the following:

build_languages:
  - name: "node"
    version: "18"
  - name: "php"
    version: "8.0"

build_commands:
  - description: "Test Command"
    command: "composer install \n npm install \n npm run build"
    halt_on_error: true

build_cache_files:
  - path: node_modules/**

As you can see, you're able to chain commands together with a \n newline character, but you can easily separate them out into different commands by entering a new - description line then the rest of the details as needed.

When adding specific language versions, you only need to specify the major version, i.e. Node 18 or PHP 8.0 then DeployHQ will take care of the rest. Just ensure that this is contained within a .deploybuild.yaml file in the root of the repository.

Tree

Proudly powered by Katapult. Running on 100% renewable energy.