Skip to content
Support for custom prepare, test and deploy phases in Strider
HTML JavaScript CSS
Latest commit 8d6f543 Apr 23, 2016 @mastertinner mastertinner committed with knownasilya add travis config

README.md

strider-custom

Support for custom environment, prepare, test, deploy and cleanup phases in Strider

NPM

Using configuration information in your script

You can access any information relating to the current job, by using EJS syntax in your script.

A common example would be retrieving the name of the branch that is currently being built:

echo Deploying <%= ref.branch %>…
.scripts/deploy.sh <%= ref.branch %>

Using strider.json

This plugin also supports being configured using the strider.json file in your project.

It can have the following properties, but you can pick and choose which you want to use.

{
  "environment": "# type shell commands here",
  "prepare": "# type shell commands here",
  "test": "# type shell commands here",
  "deploy": "# type shell commands here",
  "cleanup": "# type shell commands here"
}

A more complete example of a strider.json would be:

{
    "plugins": [
        {
            "id": "node",
            "enabled": true,
            "showStatus": true,
            "config": {
                "test": "npm test",
                "caching": "strict",
                "runtime": "whatever",
                "fork": "Node.js"
            }
        },
        {
            "id": "custom",
            "enabled": true,
            "showStatus": true,
            "config": {
                "prepare": ".scripts/prepare.sh --<%= ref.branch %>",
                "deploy": ".scripts/deploy.sh --<%= ref.branch %>"
            }
        }
    ]
}
Something went wrong with that request. Please try again.