With Build Pipelines you can set up a build, which will consist of commands that you can define to run on our servers before starting a deployment. These commands may fetch dependencies, build assets, run tests on your code, or anything else you can think of. Any generated files will be uploaded with your deployment.
To create a new build pipeline, click the Build Pipeline link on the left hand side of the page in any project, then the New Command button on the right hand side.
You'll be able to choose from a pre-configured build sequence that uses one of the common build tools:
If you have any additional commands to run alongside one of the pre-configured sequences, simply add or modify anything as appropriate. This can include any variables which have been defined within server config files.
Or, if you have a custom set of commands to run, just choose the Custom option and input your commands manually.
Add a description for your build command, then enter any commands that you wish to run below. If you're running multiple commands, just place each command on a new line.
Enable the option Stop deployment if the command failed? if you want to halt the process if an exit code other than
0 is returned, then click Create Build Command to finish.
Once you've created your build command sequence, it's recommended that you run through the Build Configuration section, which provides a number of useful features to help with your build process.
By default, the build command will run during all deployments for your project, but if you wish to override this for a specific deployment, click the Show Advanced Options button below the selected revisions on the deployment page, then enable or disable the Run build commands? option as appropriate.
Some builds may require you to fetch dependencies from an authenticated endpoint, in particular a remote repository. If you need to do so, you'll be able to add your DeployHQ project's public key to the
authorized_keys file on the repository server, or the deployment/access keys list for the repository if it's hosted with one of the major hosting providers such as Codebase or Github.
For further information about adding the key to a repository hosted with one of the main providers, please take a look at this guide on our manual.
Out of the box, DeployHQ build runs on Ubuntu 18.04 servers and supports the following languages and tools:
- PHP and Composer
- NodeJS with npm, Yarn and gulp
- ASP.NET Core 2.0, 2.1, 2.2 and 3.0 CLI
- Ruby & Bundler
- Java & Gradle
When running a build, a new, sandboxed container will be spawned in our build servers. You won't have root access, but you can run anything you like that's available from one of the supported tools.
If there is anything missing that you'd like us to add, please get in contact.