diff --git a/dist/index.js b/dist/index.js index a3a2bab..d58baf2 100644 --- a/dist/index.js +++ b/dist/index.js @@ -28,43 +28,68 @@ smartcli.addCommand('build') .then(NpmciEnv.configStore) .catch(err => { console.log(err); + process.exit(1); }); }); // clean smartcli.addCommand('clean') .then((argv) => { npmci_clean_1.clean() - .then(NpmciEnv.configStore); + .then(NpmciEnv.configStore) + .catch(err => { + console.log(err); + process.exit(1); + }); }); // command smartcli.addCommand('command') .then((argv) => { npmci_command_1.command() - .then(NpmciEnv.configStore); + .then(NpmciEnv.configStore) + .catch(err => { + console.log(err); + process.exit(1); + }); }); // install smartcli.addCommand('install') .then((argv) => { npmci_install_1.install(argv._[1]) - .then(NpmciEnv.configStore); + .then(NpmciEnv.configStore) + .catch(err => { + console.log(err); + process.exit(1); + }); }); // prepare smartcli.addCommand('prepare') .then((argv) => { npmci_prepare_1.prepare(argv._[1]) - .then(NpmciEnv.configStore); + .then(NpmciEnv.configStore) + .catch(err => { + console.log(err); + process.exit(1); + }); }); // publish smartcli.addCommand('publish') .then((argv) => { npmci_publish_1.publish(argv._[1]) - .then(NpmciEnv.configStore); + .then(NpmciEnv.configStore) + .catch(err => { + console.log(err); + process.exit(1); + }); }); // test smartcli.addCommand('test') .then((argv) => { npmci_test_1.test(argv._[1]) - .then(NpmciEnv.configStore); + .then(NpmciEnv.configStore) + .catch(err => { + console.log(err); + process.exit(1); + }); }); // trigger smartcli.addCommand('trigger') @@ -72,4 +97,4 @@ smartcli.addCommand('trigger') npmci_trigger_1.trigger(); }); smartcli.startParse(); -//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi90cy9pbmRleC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOztBQUFBLDJDQUEwQztBQUMxQyx1Q0FBc0M7QUFDdEMsSUFBSSxTQUFTLEdBQUcsSUFBSSxPQUFPLENBQUMsV0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xDQUFBIn0= \ No newline at end of file diff --git a/dist/npmci.env.js b/dist/npmci.env.js index f34cc36..c34d07c 100644 --- a/dist/npmci.env.js +++ b/dist/npmci.env.js @@ -3,8 +3,8 @@ Object.defineProperty(exports, "__esModule", { value: true }); const plugins = require("./npmci.plugins"); const paths = require("./npmci.paths"); const smartstring_1 = require("smartstring"); -if (process.env.CI_BUILD_REPO) - exports.repo = new smartstring_1.GitRepo(process.env.CI_BUILD_REPO); +if (process.env.CI_REPOSITORY_URL) + exports.repo = new smartstring_1.GitRepo(process.env.CI_REPOSITORY_URL); exports.buildStage = process.env.CI_BUILD_STAGE; exports.setDockerRegistry = (dockerRegistryArg) => { exports.dockerRegistry = dockerRegistryArg; @@ -36,7 +36,6 @@ let configLoad = () => { exports.config.project = plugins.smartfile.fs.toObjectSync(paths.NpmciProjectDir, 'npmci.json'); plugins.beautylog.ok('project config found!'); } - ; } catch (err) { exports.config.project = {}; @@ -46,4 +45,4 @@ let configLoad = () => { exports.config.dockerFilesBuilt ? exports.dockerFilesBuilt = exports.config.dockerFilesBuilt : void (0); }; configLoad(); -//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibnBtY2kuZW52LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vdHMvbnBtY2kuZW52LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7O0FBQUEsMkNBQTBDO0FBQzFDLHVDQUFzQztBQUN0Qyw2Q0FBcUM7QUFJckMsRUFBRSxDQUFDLENBQUMsT0FBTyxDQUFDLEdBQUcsQ0FBQyxhQUFhLENBQUM7SUFBQyxZQUFJLEdBQUcsSUFBSSxxQkFBTyxDQUFDLE9BQU8sQ0FBQyxHQUFHLENBQUMsYUFBYSxDQUFDLENBQUE7QUFFakUsUUFBQSxVQUFVLEdBQVcsT0FBTyxDQUFDLEdBQUcsQ0FBQyxjQUFjLENBQUE7QUFJL0MsUUFBQSxpQkFBaUIsR0FBR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-2,7 +2,7 @@ import { tap, expect } from 'tapbundle' import * as path from 'path' // set up environment -process.env.CI_BUILD_REPO = 'https://yyyyyy:xxxxxxxx@gitlab.com/mygroup/myrepo.git' +process.env.CI_REPOSITORY_URL = 'https://yyyyyy:xxxxxxxx@gitlab.com/mygroup/myrepo.git' process.env.NPMCI_SSHKEY_1 = 'hostString|somePrivKey|##' process.env.NPMTS_TEST = 'true' process.cwd = () => { diff --git a/ts/index.ts b/ts/index.ts index 249798d..810a20a 100644 --- a/ts/index.ts +++ b/ts/index.ts @@ -27,6 +27,7 @@ smartcli.addCommand('build') .then(NpmciEnv.configStore) .catch(err => { console.log(err) + process.exit(1) }) }) @@ -35,6 +36,10 @@ smartcli.addCommand('clean') .then((argv) => { clean() .then(NpmciEnv.configStore) + .catch(err => { + console.log(err) + process.exit(1) + }) }) // command @@ -42,6 +47,10 @@ smartcli.addCommand('command') .then((argv) => { command() .then(NpmciEnv.configStore) + .catch(err => { + console.log(err) + process.exit(1) + }) }) // install @@ -49,6 +58,10 @@ smartcli.addCommand('install') .then((argv) => { install(argv._[ 1 ]) .then(NpmciEnv.configStore) + .catch(err => { + console.log(err) + process.exit(1) + }) }) // prepare @@ -56,6 +69,10 @@ smartcli.addCommand('prepare') .then((argv) => { prepare(argv._[ 1 ]) .then(NpmciEnv.configStore) + .catch(err => { + console.log(err) + process.exit(1) + }) }) // publish @@ -63,6 +80,10 @@ smartcli.addCommand('publish') .then((argv) => { publish(argv._[ 1 ]) .then(NpmciEnv.configStore) + .catch(err => { + console.log(err) + process.exit(1) + }) }) // test @@ -70,6 +91,10 @@ smartcli.addCommand('test') .then((argv) => { test(argv._[ 1 ]) .then(NpmciEnv.configStore) + .catch(err => { + console.log(err) + process.exit(1) + }) }) // trigger diff --git a/ts/npmci.env.ts b/ts/npmci.env.ts index c21ecae..e312bae 100644 --- a/ts/npmci.env.ts +++ b/ts/npmci.env.ts @@ -4,7 +4,7 @@ import { GitRepo } from 'smartstring' import { Dockerfile } from './npmci.build.docker' export let repo: GitRepo -if (process.env.CI_BUILD_REPO) repo = new GitRepo(process.env.CI_BUILD_REPO) +if (process.env.CI_REPOSITORY_URL) repo = new GitRepo(process.env.CI_REPOSITORY_URL) export let buildStage: string = process.env.CI_BUILD_STAGE @@ -44,9 +44,8 @@ let configLoad = () => { if (!config.project) { config.project = plugins.smartfile.fs.toObjectSync(paths.NpmciProjectDir, 'npmci.json') plugins.beautylog.ok('project config found!') - }; - } - catch (err) { + } + } catch (err) { config.project = {} plugins.beautylog.log('no project config found, so proceeding with default behaviour!') }