Created
June 7, 2013 14:36
-
-
Save phrawzty/5729705 to your computer and use it in GitHub Desktop.
pushbot puppet stuff.
WARNING: This is totally off the top of my dome. Has not been tested, nor placed anywhere near a parser. :)
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
define pushbot ( | |
$irc_channel, | |
$pubsub, | |
$log_url, | |
$rev_url, | |
$repo_url, | |
$site_name, | |
$order = 500, | |
$redis_port = '9388', | |
$redis_host = 'localhost' | |
) { | |
$file = 'pushbot-settings.js' | |
$bot_name = $name | |
concat { $file: } | |
concat::fragment { "${file}_header": | |
target => $file, | |
source => 'pushbot-settings.js.head', | |
order => 1 | |
} | |
concat::fragment { | |
target => $file, | |
content => template('pushbot-settings.js.erb'), | |
order => $order | |
} | |
concat::fragment { | |
target => $file, | |
content => "];\n", | |
order => 999 | |
} | |
} |
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
{ | |
/* IRC channel. */ | |
channel: '<% irc_channel %>', | |
/* Bot name. */ | |
name: '<% bot_name %>', | |
/* Redis host:port */ | |
redis: '<% redis_host %>:<% redis_port %>, | |
/* Redis pubsub channel name. */ | |
pubsub: '<% pubsub %>', | |
/* URL to the chief log directory. */ | |
logs: '<% log_url %>', | |
/* List of nicks to notify after the deploy. */ | |
notify: [], | |
/* URL that shows the current revision of the site. */ | |
revision: '<% rev_url %>', | |
/* URL to the github repo. */ | |
github: '<% repo_url %>', | |
/* Name of the site. */ | |
site: '<% site_name %>' | |
}, |
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
/* managed by puppet */ | |
var options = [ |
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
node whatever { | |
pushbot { 'airmodevpushbot': | |
irc_channel => '#airmo', | |
pubsub => 'deploy.airmo.dev', | |
log_url => 'http://genericadm.private.phx1.mozilla.com/chief/air.dev/logs/', | |
rev_url => 'https://air-dev.allizom.org/media/revision', | |
repo_url => 'https://github.com/mozilla/airmozilla', | |
site_name => 'air-dev', | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment