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
#!/usr/bin/env ruby | |
require 'colorize' | |
require 'git' | |
# Public: A Class to deploy trellis projects in a Continuous Integration manner. | |
class Deployment | |
# Modify these to match your project | |
TESTS_DIR = '/your/behat/tests/directory'.freeze | |
TRELLIS_DEPLOY_SCRIPT_DIR = '/path/to/trellis/deploy.sh/script'.freeze |
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
#!/usr/bin/env ruby | |
require 'colorize' | |
require 'git' | |
# Get working directory and make git read it | |
working_dir = "/Users/yourname/app" | |
git = Git.open working_dir | |
# Get current git branch | |
current_branch = git.branches.select { |branch| branch.current == true }.first |
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
## | |
# Nodejs container which installs and builds all frontend assets | |
## | |
#frontend: | |
# image: devgeniem/node-assets-builder | |
# volumes_from: | |
# - data | |
# command: /bin/bash -c "cd /var/www/project/web/app/themes/THEMENAME && npm install && ./node_modules/webpack/bin/webpack.js" | |
## |
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
#!/usr/bin/env ruby | |
# post-receive | |
# 1. Read STDIN (Format: "from_commit to_commit branch_name") | |
from, to, branch = ARGF.read.split " " | |
# 2. Only deploy if master branch was pushed | |
if (branch =~ /master$/) == nil | |
puts "Received branch #{branch}, not deploying." | |
exit |
NewerOlder