fix environment detection
This commit is contained in:
parent
a5633a01c5
commit
800e4d8956
39
dist/index.js
vendored
39
dist/index.js
vendored
@ -28,43 +28,68 @@ smartcli.addCommand('build')
|
|||||||
.then(NpmciEnv.configStore)
|
.then(NpmciEnv.configStore)
|
||||||
.catch(err => {
|
.catch(err => {
|
||||||
console.log(err);
|
console.log(err);
|
||||||
|
process.exit(1);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
// clean
|
// clean
|
||||||
smartcli.addCommand('clean')
|
smartcli.addCommand('clean')
|
||||||
.then((argv) => {
|
.then((argv) => {
|
||||||
npmci_clean_1.clean()
|
npmci_clean_1.clean()
|
||||||
.then(NpmciEnv.configStore);
|
.then(NpmciEnv.configStore)
|
||||||
|
.catch(err => {
|
||||||
|
console.log(err);
|
||||||
|
process.exit(1);
|
||||||
|
});
|
||||||
});
|
});
|
||||||
// command
|
// command
|
||||||
smartcli.addCommand('command')
|
smartcli.addCommand('command')
|
||||||
.then((argv) => {
|
.then((argv) => {
|
||||||
npmci_command_1.command()
|
npmci_command_1.command()
|
||||||
.then(NpmciEnv.configStore);
|
.then(NpmciEnv.configStore)
|
||||||
|
.catch(err => {
|
||||||
|
console.log(err);
|
||||||
|
process.exit(1);
|
||||||
|
});
|
||||||
});
|
});
|
||||||
// install
|
// install
|
||||||
smartcli.addCommand('install')
|
smartcli.addCommand('install')
|
||||||
.then((argv) => {
|
.then((argv) => {
|
||||||
npmci_install_1.install(argv._[1])
|
npmci_install_1.install(argv._[1])
|
||||||
.then(NpmciEnv.configStore);
|
.then(NpmciEnv.configStore)
|
||||||
|
.catch(err => {
|
||||||
|
console.log(err);
|
||||||
|
process.exit(1);
|
||||||
|
});
|
||||||
});
|
});
|
||||||
// prepare
|
// prepare
|
||||||
smartcli.addCommand('prepare')
|
smartcli.addCommand('prepare')
|
||||||
.then((argv) => {
|
.then((argv) => {
|
||||||
npmci_prepare_1.prepare(argv._[1])
|
npmci_prepare_1.prepare(argv._[1])
|
||||||
.then(NpmciEnv.configStore);
|
.then(NpmciEnv.configStore)
|
||||||
|
.catch(err => {
|
||||||
|
console.log(err);
|
||||||
|
process.exit(1);
|
||||||
|
});
|
||||||
});
|
});
|
||||||
// publish
|
// publish
|
||||||
smartcli.addCommand('publish')
|
smartcli.addCommand('publish')
|
||||||
.then((argv) => {
|
.then((argv) => {
|
||||||
npmci_publish_1.publish(argv._[1])
|
npmci_publish_1.publish(argv._[1])
|
||||||
.then(NpmciEnv.configStore);
|
.then(NpmciEnv.configStore)
|
||||||
|
.catch(err => {
|
||||||
|
console.log(err);
|
||||||
|
process.exit(1);
|
||||||
|
});
|
||||||
});
|
});
|
||||||
// test
|
// test
|
||||||
smartcli.addCommand('test')
|
smartcli.addCommand('test')
|
||||||
.then((argv) => {
|
.then((argv) => {
|
||||||
npmci_test_1.test(argv._[1])
|
npmci_test_1.test(argv._[1])
|
||||||
.then(NpmciEnv.configStore);
|
.then(NpmciEnv.configStore)
|
||||||
|
.catch(err => {
|
||||||
|
console.log(err);
|
||||||
|
process.exit(1);
|
||||||
|
});
|
||||||
});
|
});
|
||||||
// trigger
|
// trigger
|
||||||
smartcli.addCommand('trigger')
|
smartcli.addCommand('trigger')
|
||||||
@ -72,4 +97,4 @@ smartcli.addCommand('trigger')
|
|||||||
npmci_trigger_1.trigger();
|
npmci_trigger_1.trigger();
|
||||||
});
|
});
|
||||||
smartcli.startParse();
|
smartcli.startParse();
|
||||||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi90cy9pbmRleC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOztBQUFBLDJDQUEwQztBQUMxQyx1Q0FBc0M7QUFDdEMsSUFBSSxTQUFTLEdBQUcsSUFBSSxPQUFPLENBQUMsV0FBVyxDQUFDLGNBQWMsQ0FBQyxLQUFLLENBQUMsZ0JBQWdCLENBQUMsQ0FBQTtBQUM5RS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Module", { value: true });
|
|||||||
const plugins = require("./npmci.plugins");
|
const plugins = require("./npmci.plugins");
|
||||||
const paths = require("./npmci.paths");
|
const paths = require("./npmci.paths");
|
||||||
const smartstring_1 = require("smartstring");
|
const smartstring_1 = require("smartstring");
|
||||||
if (process.env.CI_BUILD_REPO)
|
if (process.env.CI_REPOSITORY_URL)
|
||||||
exports.repo = new smartstring_1.GitRepo(process.env.CI_BUILD_REPO);
|
exports.repo = new smartstring_1.GitRepo(process.env.CI_REPOSITORY_URL);
|
||||||
exports.buildStage = process.env.CI_BUILD_STAGE;
|
exports.buildStage = process.env.CI_BUILD_STAGE;
|
||||||
exports.setDockerRegistry = (dockerRegistryArg) => {
|
exports.setDockerRegistry = (dockerRegistryArg) => {
|
||||||
exports.dockerRegistry = dockerRegistryArg;
|
exports.dockerRegistry = dockerRegistryArg;
|
||||||
@ -36,7 +36,6 @@ let configLoad = () => {
|
|||||||
exports.config.project = plugins.smartfile.fs.toObjectSync(paths.NpmciProjectDir, 'npmci.json');
|
exports.config.project = plugins.smartfile.fs.toObjectSync(paths.NpmciProjectDir, 'npmci.json');
|
||||||
plugins.beautylog.ok('project config found!');
|
plugins.beautylog.ok('project config found!');
|
||||||
}
|
}
|
||||||
;
|
|
||||||
}
|
}
|
||||||
catch (err) {
|
catch (err) {
|
||||||
exports.config.project = {};
|
exports.config.project = {};
|
||||||
@ -46,4 +45,4 @@ let configLoad = () => {
|
|||||||
exports.config.dockerFilesBuilt ? exports.dockerFilesBuilt = exports.config.dockerFilesBuilt : void (0);
|
exports.config.dockerFilesBuilt ? exports.dockerFilesBuilt = exports.config.dockerFilesBuilt : void (0);
|
||||||
};
|
};
|
||||||
configLoad();
|
configLoad();
|
||||||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibnBtY2kuZW52LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vdHMvbnBtY2kuZW52LnRzIl0sIm5hbWVzIjpbXSwib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Ucsc0JBQWMsR0FBRyxjQUFNLENBQUMsY0FBYyxHQUFHLEtBQUssQ0FBQyxDQUFDLENBQUMsQ0FBQTtJQUN6RSxjQUFNLENBQUMsZ0JBQWdCLEdBQUcsd0JBQWdCLEdBQUcsY0FBTSxDQUFDLGdCQUFnQixHQUFHLEtBQUssQ0FBQyxDQUFDLENBQUMsQ0FBQTtBQUNqRixDQUFDLENBQUE7QUFDRCxVQUFVLEVBQUUsQ0FBQSJ9
|
@ -2,7 +2,7 @@ import { tap, expect } from 'tapbundle'
|
|||||||
import * as path from 'path'
|
import * as path from 'path'
|
||||||
|
|
||||||
// set up environment
|
// 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.NPMCI_SSHKEY_1 = 'hostString|somePrivKey|##'
|
||||||
process.env.NPMTS_TEST = 'true'
|
process.env.NPMTS_TEST = 'true'
|
||||||
process.cwd = () => {
|
process.cwd = () => {
|
||||||
|
25
ts/index.ts
25
ts/index.ts
@ -27,6 +27,7 @@ smartcli.addCommand('build')
|
|||||||
.then(NpmciEnv.configStore)
|
.then(NpmciEnv.configStore)
|
||||||
.catch(err => {
|
.catch(err => {
|
||||||
console.log(err)
|
console.log(err)
|
||||||
|
process.exit(1)
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
@ -35,6 +36,10 @@ smartcli.addCommand('clean')
|
|||||||
.then((argv) => {
|
.then((argv) => {
|
||||||
clean()
|
clean()
|
||||||
.then(NpmciEnv.configStore)
|
.then(NpmciEnv.configStore)
|
||||||
|
.catch(err => {
|
||||||
|
console.log(err)
|
||||||
|
process.exit(1)
|
||||||
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
// command
|
// command
|
||||||
@ -42,6 +47,10 @@ smartcli.addCommand('command')
|
|||||||
.then((argv) => {
|
.then((argv) => {
|
||||||
command()
|
command()
|
||||||
.then(NpmciEnv.configStore)
|
.then(NpmciEnv.configStore)
|
||||||
|
.catch(err => {
|
||||||
|
console.log(err)
|
||||||
|
process.exit(1)
|
||||||
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
// install
|
// install
|
||||||
@ -49,6 +58,10 @@ smartcli.addCommand('install')
|
|||||||
.then((argv) => {
|
.then((argv) => {
|
||||||
install(argv._[ 1 ])
|
install(argv._[ 1 ])
|
||||||
.then(NpmciEnv.configStore)
|
.then(NpmciEnv.configStore)
|
||||||
|
.catch(err => {
|
||||||
|
console.log(err)
|
||||||
|
process.exit(1)
|
||||||
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
// prepare
|
// prepare
|
||||||
@ -56,6 +69,10 @@ smartcli.addCommand('prepare')
|
|||||||
.then((argv) => {
|
.then((argv) => {
|
||||||
prepare(argv._[ 1 ])
|
prepare(argv._[ 1 ])
|
||||||
.then(NpmciEnv.configStore)
|
.then(NpmciEnv.configStore)
|
||||||
|
.catch(err => {
|
||||||
|
console.log(err)
|
||||||
|
process.exit(1)
|
||||||
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
// publish
|
// publish
|
||||||
@ -63,6 +80,10 @@ smartcli.addCommand('publish')
|
|||||||
.then((argv) => {
|
.then((argv) => {
|
||||||
publish(argv._[ 1 ])
|
publish(argv._[ 1 ])
|
||||||
.then(NpmciEnv.configStore)
|
.then(NpmciEnv.configStore)
|
||||||
|
.catch(err => {
|
||||||
|
console.log(err)
|
||||||
|
process.exit(1)
|
||||||
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
// test
|
// test
|
||||||
@ -70,6 +91,10 @@ smartcli.addCommand('test')
|
|||||||
.then((argv) => {
|
.then((argv) => {
|
||||||
test(argv._[ 1 ])
|
test(argv._[ 1 ])
|
||||||
.then(NpmciEnv.configStore)
|
.then(NpmciEnv.configStore)
|
||||||
|
.catch(err => {
|
||||||
|
console.log(err)
|
||||||
|
process.exit(1)
|
||||||
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
// trigger
|
// trigger
|
||||||
|
@ -4,7 +4,7 @@ import { GitRepo } from 'smartstring'
|
|||||||
import { Dockerfile } from './npmci.build.docker'
|
import { Dockerfile } from './npmci.build.docker'
|
||||||
|
|
||||||
export let repo: GitRepo
|
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
|
export let buildStage: string = process.env.CI_BUILD_STAGE
|
||||||
|
|
||||||
@ -44,9 +44,8 @@ let configLoad = () => {
|
|||||||
if (!config.project) {
|
if (!config.project) {
|
||||||
config.project = plugins.smartfile.fs.toObjectSync(paths.NpmciProjectDir, 'npmci.json')
|
config.project = plugins.smartfile.fs.toObjectSync(paths.NpmciProjectDir, 'npmci.json')
|
||||||
plugins.beautylog.ok('project config found!')
|
plugins.beautylog.ok('project config found!')
|
||||||
};
|
|
||||||
}
|
}
|
||||||
catch (err) {
|
} catch (err) {
|
||||||
config.project = {}
|
config.project = {}
|
||||||
plugins.beautylog.log('no project config found, so proceeding with default behaviour!')
|
plugins.beautylog.log('no project config found, so proceeding with default behaviour!')
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user