This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/sh | |
| # run script to check if commit is valid | |
| # you can run anything here, I happen to use a node script | |
| # make sure to exit with 0 (success) if everything is ok and 1 (failure) if not. | |
| # In a custom node.js script you do that like so: process.exit(code = 1); | |
| node ./my_custom_test_runner.js | |
| RETVAL=$? | |
| #ECHO $RETVAL |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var hulken = require('hulken'); | |
| var hulken_options = { | |
| targetUrl: 'http://localhost:8888', | |
| numberOfHulkenAgents: 20, | |
| timesToRunEachRequest: 30, | |
| requestsFilePath: './auto-generated-requests-file.json', | |
| tokensSkippingRequest: [':', '*', '{', '}'], | |
| requestsToSkip: ['/logout', '/some-other-endpoint'], | |
| loginRequired: true, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* | |
| using shelljs and shelljs.exec() and checking response code do: | |
| git reset --hard HEAD | |
| git clean -f | |
| git pull origin <branch name> | |
| you have to set up a deployment key: https://confluence.atlassian.com/bitbucket/use-deployment-keys-294486051.html | |
| example: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var Hapi = require('hapi'); | |
| var worker = require('./worker'); // custom script to pull down code, run tests, restart services etc.. | |
| var server = new Hapi.Server(); | |
| server.connection({ | |
| port: 1337 | |
| }); | |
| server.route({ | |
| method: 'POST', | |
| path: '/', | |
| handler: function(request, reply) { |