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"); | |
| // Create a server with a host, port, and options | |
| var server = new Hapi.Server("0.0.0.0", 3000); | |
| // Add a route | |
| server.addRoute({ | |
| "method": "GET", | |
| "path": "/hello", | |
| "config": { |
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
| { | |
| "Statement": [ | |
| { | |
| "Action": [ | |
| "s3:DeleteObject", | |
| "s3:GetObject", | |
| "s3:GetObjectAcl", | |
| "s3:ListBucket", | |
| "s3:PutObject", | |
| "s3:PutObjectAcl" |
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
| deploy: | |
| steps: | |
| s3sync: | |
| key-id: $KEY | |
| key-secret: $SECRET | |
| bucket-url: $BUCKET | |
| source-dir: $SOURCE | |
| opts: --add-header="Cache-Control:max-age=3600, public" |
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
| build: | |
| steps: | |
| - script: | |
| name: update npm | |
| code: | | |
| curl https://npmjs.org/install.sh | sudo clean=y sh | |
| sudo rm -rf /home/ubuntu/tmp/ | |
| mkdir -p /home/ubuntu/tmp/ |
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
| build: | |
| steps: | |
| - script: | |
| name: seed the database | |
| code: rake db:seed | |
| - script: | |
| name: example multiple commands | |
| code: | | |
| export TEST_VAR=12345 | |
| cat $TEST > test.txt |
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
| build: | |
| steps: | |
| - script: | |
| name: disable ca | |
| code: npm config set ca="" |
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
| # Desired outcome: | |
| bash -c "echo test" | |
| # Using this variable: | |
| export BASH_OPTIONS="-c \"echo test\"" | |
| # Won't work: | |
| set -x |
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
| build: | |
| steps: | |
| - script: | |
| name: remove tmp directory | |
| code: sudo rm -rf /home/ubuntu/tmp |
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
| build: | |
| steps: | |
| - script: | |
| name: enable composer cache | |
| code: | | |
| export COMPOSER_CACHE_DIR="$WERCKER_CACHE_DIR/composer" | |
| mkdir -p $COMPOSER_CACHE_DIR | |
| - script: | |
| name: composer install | |
| code: composer install --no-interaction |
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
| build: | |
| steps: | |
| - script: | |
| name: Enable virtual display | |
| code: |- | |
| # Start xvfb which gives the context an virtual display | |
| # which is required for tests that require an GUI | |
| export DISPLAY=:99.0 | |
| start-stop-daemon --start --quiet --pidfile /tmp/xvfb_99.pid --make-pidfile --background --exec /usr/bin/Xvfb -- :99 -screen 0 1024x768x24 -ac +extension GLX +render -noreset | |
| # Give xvfb time to start. 3 seconds is the default for all xvfb-run commands. |
OlderNewer