The build sequence on Semaphore consists of the following steps.
Checkout revision from GitHub
When the GitHub webhook hits Semaphore, your repository is initialized to the specified revision.
Your repository along with its dependencies will, in most cases, be retrieved from cache. For more information, please see this page.
Start build VM
Copy code to VM
Your code will be placed in
Xvfb (X Virtual Framebuffer) is launched for running tests that require GUI, such as those backed by Selenium.
Export all environment variables
For a full list of available variables, please see this page.
Create Semaphore cache directory
Semaphore caches directories for Ruby and Node.js projects by default, but we
.semaphore-cache directory which you can use custom caching. For
more information on this topic, please read about caching between
Write custom files
Any custom configuration files you’ve added are written to disk.
Run your build commands
These are the commands specified in your project’s build settings. The current
directory is set to
For language related questions please consult one of our dedicated guides.
Export job result
After all build commands for a specific job are completed, Semaphore exports
SEMAPHORE_THREAD_RESULT which can be used in after job commands.
Run after job commands
After job commands are executed after build commands on each job, regardless of whether the build commands passed or failed.
Cache repository and vendor dependencies
Project’s git history and any vendor dependencies are cached for later reuse.