Move the REGISTRY_ENDPOINT into an env var.

This commit is contained in:
Page 2014-05-01 19:10:08 +01:00 committed by Pablo Carranza Vélez
parent b4756db23b
commit 9c9288e179

View File

@ -10,7 +10,6 @@ request = Promise.promisify require 'request'
JSONStream = require 'JSONStream' JSONStream = require 'JSONStream'
PlatformAPI = require 'resin-platform-api/request' PlatformAPI = require 'resin-platform-api/request'
REGISTRY_ENDPOINT = 'registry.resin.io'
DOCKER_SOCKET = '/run/docker.sock' DOCKER_SOCKET = '/run/docker.sock'
PLATFORM_ENDPOINT = url.resolve(process.env.API_ENDPOINT, '/ewa/') PLATFORM_ENDPOINT = url.resolve(process.env.API_ENDPOINT, '/ewa/')
resinAPI = new PlatformAPI(PLATFORM_ENDPOINT) resinAPI = new PlatformAPI(PLATFORM_ENDPOINT)
@ -115,7 +114,7 @@ exports.update = ->
for envVar in app.environment_variable for envVar in app.environment_variable
env[envVar.name] = envVar.value env[envVar.name] = envVar.value
return { return {
imageId: "#{REGISTRY_ENDPOINT}/#{path.basename(app.git_repository, '.git')}/#{app.commit}" imageId: "#{pocess.env.REGISTRY_ENDPOINT}/#{path.basename(app.git_repository, '.git')}/#{app.commit}"
env: env env: env
} }