diff --git a/README.md b/README.md index 3d6c680..6a5c21c 100644 --- a/README.md +++ b/README.md @@ -106,6 +106,7 @@ might be removed in future releases. | HIPCHAT_ROOM | Hipchat room to be used for failed build notification || | BASE_URL | Base Url for Image Factory. Used for forming notification URLs | http://localhost:8080| | DOCKER_REPO_BASE | Docker base repository url (e.g: quay.io/myorg)| quay.io/totem | +| TOTEM_ENV | Name of totem environment (e.g. production, local, development) | local | ## Prerequisites (Development) diff --git a/bin/supervisord-wrapper.sh b/bin/supervisord-wrapper.sh index 5fc528c..4e183d2 100644 --- a/bin/supervisord-wrapper.sh +++ b/bin/supervisord-wrapper.sh @@ -6,7 +6,7 @@ export ETCD_PORT='${ETCD_PORT:-4001}' export ETCD_TOTEM_BASE='${ETCD_TOTEM_BASE:-/totem}' export SSH_HOST_KEY='${SSH_HOST_KEY:-/root/.ssh/id_rsa}' export ENC_PASSPHRASE='${ENC_PASSPHRASE:-password}' -export CLUSTER_NAME='${CLUSTER_NAME:-totem-local}' +export TOTEM_ENV='${TOTEM_ENV:-local}' export DOCKER_REPO_BASE='${DOCKER_REPO_BASE:-quay.io/totem}' export HOOK_SECRET='${HOOK_SECRET:-changeit}' export HOOK_POST_URL='${HOOK_POST_URL}' diff --git a/lib/factory.js b/lib/factory.js index b5bf05e..dfcd880 100644 --- a/lib/factory.js +++ b/lib/factory.js @@ -72,7 +72,7 @@ var DEFAULT_CONFIG = { room: process.env.HIPCHAT_ROOM }, baseUrl: process.env.BASE_URL || 'http://localhost:8080', - cluster: process.env.CLUSTER_NAME || 'local' + env: process.env.TOTEM_ENV || 'local' }; module.exports = Factory; @@ -156,7 +156,7 @@ Factory.prototype.initApi = function initApi() { restify.queryParser(), bodyParser[0], // First element contains middleware for parsing raw text, usingSignedRequest(_this.config.hook.secret, 'X-Hub-Signature'), - // Second Elevement contains middleware for parsing JSON + // Second Element contains middleware for parsing JSON bodyParser[1], corsResponse() ]; @@ -338,7 +338,7 @@ Factory.prototype.newJob = function newJob(context) { //Notify build was successful / failed. var notifyCtx = _.extend({}, context, { baseUrl: _this.config.baseUrl, - cluster: _this.config.cluster, + env: _this.config.env, id: job.id }); _.forEach(_this.notifiers, function(notifier) { diff --git a/package.json b/package.json index b5509a3..3f0224a 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "image-factory", - "version": "0.6.0", + "version": "0.6.1", "description": "Docker Image Factory", "keywords": [ "docker",