Custom Scripts
Custom scripts can be embedded into pull requests using Golang HTML templates. Templates are evaluated as runs progress and appended to your webapp.io bot comment.
Due to limitations with Github flavored markdown, HTML tags must not be tabbed.
Helper Functions
A number of helper functions have been defined to interact with Layerfiles and jobs.
layerfileStatusEquals
The layerfileStatusEquals
function accepts two string parameters
layerfileRelativePath
and status
, then returns a boolean if the Layerfile
defined in the first argument matches the status in the second.
The Layerfile relative path is the path to the Layerfile relative to the root of your project.
Layerfile status can be one of the following
['NEW', 'RUNNING', 'SUCCESS', 'FAILURE', 'ERROR', 'WAITING_PARENTS', 'CANCELLED']
.
jobStatusEquals
The jobStatusEquals
function accepts one string parameter status
and returns
a boolean if the job matches the status .
Job status can be one of the following ['ERROR', 'SUCCESS']
.
previewEnvironmentLink
The jobStatusEquals
function accepts one string parameter path
and returns a
string with a URL to that path on your preview environment.