Support for custom prepare, test and deploy phases in Strider
JavaScript HTML CSS
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
config
static
templates
test
.editorconfig
.eslintrc
.gitignore
.travis.yml
README.md
package.json
webapp.js
worker.js

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 %>"
			}
		}
	]
}