Skip to content

Instantly share code, notes, and snippets.

@nurse
Created September 13, 2015 18:02
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nurse/dbd461127cfcf962daad to your computer and use it in GitHub Desktop.
Save nurse/dbd461127cfcf962daad to your computer and use it in GitHub Desktop.
template for chkbuild with serverkit
resources:
- type: package
name: zsh
- type: package
name: screen
- type: package
name: subversion
- type: group
name: <%= user %>
- type: user
name: <%= user %>
gid: <%= user %>
home: /home/<%= user %>
- type: group
name: chkbuild
- type: user
name: chkbuild
gid: chkbuild
- type: directory
path: /home/<%= user %>
group: <%= user %>
owner: <%= user %>
mode: 02755
- type: directory
path: /home/chkbuild
group: chkbuild
owner: <%= user %>
mode: 02755
- type: directory
path: /home/chkbuild/build
group: chkbuild
owner: <%= user %>
mode: 02775
- type: directory
path: /home/chkbuild/public_html
group: chkbuild
owner: <%= user %>
mode: 02775
- type: command
user: <%= user %>
script: "touch /home/<%= user %>/.bash_profile"
check_script: "test -f /home/<%= user %>/.bash_profile"
- type: rbenv_ruby
version: <%= ruby_version %>
global: false
rbenv_executable_path: /home/<%= user %>/.rbenv/bin/rbenv
user: <%= user %>
dependencies: true
profile_path: /home/<%= user %>/.bash_profile
- type: git
repository: https://github.com/nurse/chkbuild.git
path: /home/<%= user %>/chkbuild
state: updated
branch: rubyci
- type: symlink
destination: /home/chkbuild
source: /home/<%= user %>/chkbuild/tmp
- type: command
user: <%= user %>
script: "/home/<%= user %>/.rbenv/versions/<%= ruby_version %>/bin/gem install -N aws-sdk"
check_script: "/home/<%= user %>/.rbenv/versions/<%= ruby_version %>/bin/gem query -i aws-sdk"
- type: line
path: /etc/crontab
pattern: 'start-build'
line: '3 * * * * chkbuild AWS_ACCESS_KEY_ID=<%= aws_access_key_id %> AWS_SECRET_ACCESS_KEY=<%= aws_secret_access_key %> /home/<%= user %>/.rbenv/versions/<%= ruby_version %>/bin/ruby /home/<%= user %>/chkbuild/start-build'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment