npmci/dist/npmci.env.js

25 lines
3.3 KiB
JavaScript
Raw Permalink Normal View History

2016-06-02 15:57:01 +00:00
"use strict";
require("typings-global");
var smartstring_1 = require("smartstring");
exports.repo = new smartstring_1.GitRepo(process.env.CI_BUILD_REPO);
2016-06-03 14:27:12 +00:00
exports.dockerRegistry = "docker.io"; // will be set by npmci.prepare
exports.dockerTagVersion = function () {
if (process.env.CI_BUILD_STAGE == "test") {
return "test";
}
else {
return "latest";
}
};
exports.dockerTag = function () {
return exports.dockerRegistry + "/" + exports.repo.user + "/" + exports.repo.repo + ":" + exports.dockerTagVersion() + " .";
};
exports.dockerTagTest = function () {
return exports.dockerRegistry + "/" + exports.repo.user + "/" + exports.repo.repo + ":test .";
};
exports.dockerTagRelease = function () {
return exports.dockerRegistry + "/" + exports.repo.user + "/" + exports.repo.repo + ":latest .";
};
2016-06-02 15:57:01 +00:00
2016-06-03 14:27:12 +00:00
//# sourceMappingURL=data:application/json;charset=utf8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIm5wbWNpLmVudi50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiO0FBQUEsUUFBTyxnQkFBZ0IsQ0FBQyxDQUFBO0FBR3hCLDRCQUFzQixhQUFhLENBQUMsQ0FBQTtBQUV6QixZQUFJLEdBQUcsSUFBSSxxQkFBTyxDQUFDLE9BQU8sQ0FBQyxHQUFHLENBQUMsYUFBYSxDQUFDLENBQUM7QUFJOUMsc0JBQWMsR0FBRyxXQUFXLENBQUMsQ0FBQywrQkFBK0I7QUFFN0Qsd0JBQWdCLEdBQUc7SUFDMUIsRUFBRSxDQUFBLENBQUMsT0FBTyxDQUFDLEdBQUcsQ0FBQyxjQUFjLElBQUksTUFBTSxDQUFDLENBQUEsQ0FBQztRQUNyQyxNQUFNLENBQUMsTUFBTSxDQUFDO0lBQ2xCLENBQUM7SUFBQyxJQUFJLENBQUMsQ0FBQztRQUNKLE1BQU0sQ0FBQyxRQUFRLENBQUE7SUFD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