Skip to content

Instantly share code, notes, and snippets.

View hatchan's full-sized avatar
💭
¯\_(ツ)_/¯

Benno van den Berg hatchan

💭
¯\_(ツ)_/¯
  • Amsterdam, Netherlands
  • 06:34 (UTC +02:00)
View GitHub Profile
@hatchan
hatchan / wercker.yml
Created March 17, 2015 14:13
echo and ls various wercker directories
deploy:
steps:
- script:
name: debug
code: |
echo $WERCKER_ROOT
echo $WERCKER_SOURCE_DIR
ls -la $WERCKER_ROOT
ls -la $WERCKER_SOURCE_DIR
@hatchan
hatchan / wercker.yml
Created March 17, 2015 08:34
Overriding the package dir in a setup-go-workspace step
build:
steps:
- wercker/setup-go-workspace:
package-dir: github.com/wercker/getting-started-golang
@hatchan
hatchan / wercker.yml
Created February 23, 2015 16:37
Update git using install-packages step on wercker.com
deploy:
steps:
- wercker/install-packages
packages: git
# insert other steps here
@hatchan
hatchan / wercker.yml
Created November 3, 2014 10:06
Install ftp during a build or deploy on wercker
build:
steps:
- script:
name: install ftp
code: sudo apt-get update -y && sudo apt-get install ftp -y
deploy:
steps:
- script:
name: install ftp
code: sudo apt-get update -y && sudo apt-get install ftp -y
@hatchan
hatchan / wercker.yml
Created September 30, 2014 16:53
Example wercker.yml showing the `cwd` property. The first will use `$WERCKER_SOURCE_DIR` as the working directory. The second one will use the `src` relative path as the source dir. See: http://devcenter.wercker.com/articles/steps/#toc_2
box: wercker/rvm
build:
steps:
- bundle-install
- bundle-install:
cwd: src
@hatchan
hatchan / wercker.yml
Created August 12, 2014 08:53
Changing working directory with wercker, see http://devcenter.wercker.com/articles/steps/#toc_2
build:
steps:
- npm-install:
cwd: app
@hatchan
hatchan / gist:9cee3857feff34dc6c3c
Created August 11, 2014 12:25
Create a dot every 60 seconds to simulate activity
( while [ 1 ]; do echo .; sleep 60; done; ) &
# Long running task
kill %1
build:
steps:
- script:
name: step
code: >
if [ true ]; then
echo "true";
fi
# The > operator removes all new lines and extra space
@hatchan
hatchan / wercker.yml
Created June 12, 2014 10:11
Multiline yaml to singleline string yaml example
build:
steps:
script:
name: multiline bash
code: >
if [ -f "$EXAMPLE_PATH" ]; then
echo "path exists";
else
echo "path does not exist";
promise.then(function(results) {
do_stuff();
})
.catch(function(err) {
console.error(err);
});