fix async loop execution

This commit is contained in:
Philipp Kunz 2017-03-11 02:27:48 +01:00
parent 798c909f1e
commit af74e730cc
9 changed files with 45 additions and 62 deletions

3
dist/npmci.bash.js vendored
View File

@ -76,6 +76,7 @@ exports.bash = (commandArg, retryArg = 2, bareArg = false) => __awaiter(this, vo
} }
else { else {
plugins.beautylog.log('ShellExec would be: ' + commandArg); plugins.beautylog.log('ShellExec would be: ' + commandArg);
yield plugins.smartdelay.delayFor(100);
execResult = { execResult = {
exitCode: 0, exitCode: 0,
stdout: 'testOutput' stdout: 'testOutput'
@ -95,4 +96,4 @@ exports.bashBare = (commandArg, retryArg = 2) => __awaiter(this, void 0, void 0,
exports.bashNoError = (commandArg) => __awaiter(this, void 0, void 0, function* () { exports.bashNoError = (commandArg) => __awaiter(this, void 0, void 0, function* () {
return yield exports.bash(commandArg, -1); return yield exports.bash(commandArg, -1);
}); });
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibnBtY2kuYmFzaC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uL3RzL25wbWNpLmJhc2gudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7OztBQUFBLDJDQUEwQztBQUMxQyxpQ0FBZ0M7QUFFaEM7O0dBRUc7QUFDUSxRQUFBLFlBQVksR0FBRyxNQUFNLENBQUMsS0FBSyxFQUFXLENBQUE7QUFFakQ7O0dBRUc7QUFDSCxJQUFJLGVBQWUsR0FBRyxJQUFJLE9BQU8sQ0FBQyxVQUFVLENBQUMsVUFBVSxDQUFDO0lBQ3RELFFBQVEsRUFBRSxNQUFNO0lBQ2hCLGVBQWUsRUFBRSxFQUFFO0NBQ3BCLENBQUMsQ0FBQTtBQUVGLElBQUksUUFBUSxHQUFHO0lBQ2IsRUFBRSxDQUFDLENBQ0QsQ0FBQyxNQUFNLE9BQU8sQ0FBQyxVQUFVLENBQUMsVUFBVSxDQUFDLHdDQUF3Qy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DLEdBQUcsQ0FBQyxDQUFBO1FBQ3RDLFVBQVUsR0FBRztZQUNYLFFBQVEsRUFBRSxDQUFDO1lBQ1gsTUFBTSxFQUFFLFlBQVk7U0FDckIsQ0FBQTtJQUNILENBQUM7SUFDRCxNQUFNLENBQUMsVUFBVSxDQUFDLE1BQU0sQ0FBQTtBQUMxQixDQUFDLENBQUEsQ0FBQTtBQUVEOztHQUVHO0FBQ1EsUUFBQSxRQUFRLEdBQUcsQ0FBTyxVQUFrQixFQUFFLFdBQW1CLENBQUM7SUFDbkUsTUFBTSxDQUFDLE1BQU0sWUFBSSxDQUFDLFVBQVUsRUFBRSxRQUFRLEVBQUUsSUFBSSxDQUFDLENBQUE7QUFDL0MsQ0FBQyxDQUFBLENBQUE7QUFFRDs7R0FFRztBQUNRLFFBQUEsV0FBVyxHQUFHLENBQU8sVUFBa0I7SUFDaEQsTUFBTSxDQUFDLE1BQU0sWUFBSSxDQUFDLFVBQVUsRUFBRSxDQUFDLENBQUMsQ0FBQyxDQUFBO0FBQ25DLENBQUMsQ0FBQSxDQUFBIn0=

File diff suppressed because one or more lines are too long

View File

@ -8,6 +8,7 @@ export import projectinfo = require('projectinfo');
export import q = require('smartq'); export import q = require('smartq');
export declare let request: any; export declare let request: any;
export import smartcli = require('smartcli'); export import smartcli = require('smartcli');
export import smartdelay = require('smartdelay');
export import smartfile = require('smartfile'); export import smartfile = require('smartfile');
export import shelljs = require('shelljs'); export import shelljs = require('shelljs');
export import smartparam = require('smartparam'); export import smartparam = require('smartparam');

View File

@ -10,6 +10,7 @@ exports.projectinfo = require("projectinfo");
exports.q = require("smartq"); exports.q = require("smartq");
exports.request = require('request'); exports.request = require('request');
exports.smartcli = require("smartcli"); exports.smartcli = require("smartcli");
exports.smartdelay = require("smartdelay");
exports.smartfile = require("smartfile"); exports.smartfile = require("smartfile");
exports.shelljs = require("shelljs"); exports.shelljs = require("shelljs");
exports.smartparam = require("smartparam"); exports.smartparam = require("smartparam");
@ -19,4 +20,4 @@ exports.smartsocket = require("smartsocket");
exports.smartssh = require("smartssh"); exports.smartssh = require("smartssh");
exports.smartstring = require("smartstring"); exports.smartstring = require("smartstring");
exports.through2 = require("through2"); exports.through2 = require("through2");
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibnBtY2kucGx1Z2lucy5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uL3RzL25wbWNpLnBsdWdpbnMudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7QUFBQSx5Q0FBOEM7QUFDbkMsUUFBQSxJQUFJLEdBQUcsT0FBTyxDQUFDLE1BQU0sQ0FBQyxDQUFBO0FBQ2pDLGdEQUFxRDtBQUMxQyxRQUFBLE1BQU0sR0FBRyxPQUFPLENBQUMsUUFBUSxDQUFDLENBQUE7QUFDckMsdUNBQTRDO0FBQzVDLCtCQUFvQztBQUNwQyw2Q0FBa0Q7QUFDbEQsOEJBQW1DO0FBQ3hCLFFBQUEsT0FBTyxHQUFHLE9BQU8sQ0FBQyxTQUFTLENBQUMsQ0FBQTtBQUN2Qyx1Q0FBNEM7QUFDNUMseUNBQThDO0FBQzlDLHFDQUEwQztBQUMxQywyQ0FBZ0Q7QUFDaEQsbUNBQXdDO0FBQ3hDLDJDQUFnRDtBQUNoRCw2Q0FBa0Q7QUFDbEQsdUNBQTRDO0FBQzVDLDZDQUFrRDtBQUNsRCx1Q0FBNEMifQ== //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibnBtY2kucGx1Z2lucy5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uL3RzL25wbWNpLnBsdWdpbnMudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7QUFBQSx5Q0FBOEM7QUFDbkMsUUFBQSxJQUFJLEdBQUcsT0FBTyxDQUFDLE1BQU0sQ0FBQyxDQUFBO0FBQ2pDLGdEQUFxRDtBQUMxQyxRQUFBLE1BQU0sR0FBRyxPQUFPLENBQUMsUUFBUSxDQUFDLENBQUE7QUFDckMsdUNBQTRDO0FBQzVDLCtCQUFvQztBQUNwQyw2Q0FBa0Q7QUFDbEQsOEJBQW1DO0FBQ3hCLFFBQUEsT0FBTyxHQUFHLE9BQU8sQ0FBQyxTQUFTLENBQUMsQ0FBQTtBQUN2Qyx1Q0FBNEM7QUFDNUMsMkNBQWdEO0FBQ2hELHlDQUE4QztBQUM5QyxxQ0FBMEM7QUFDMUMsMkNBQWdEO0FBQ2hELG1DQUF3QztBQUN4QywyQ0FBZ0Q7QUFDaEQsNkNBQWtEO0FBQ2xELHVDQUE0QztBQUM1Qyw2Q0FBa0Q7QUFDbEQsdUNBQTRDIn0=

View File

@ -42,10 +42,11 @@
"request": "^2.81.0", "request": "^2.81.0",
"shelljs": "^0.7.7", "shelljs": "^0.7.7",
"smartcli": "^2.0.1", "smartcli": "^2.0.1",
"smartdelay": "^1.0.1",
"smartfile": "^4.1.7", "smartfile": "^4.1.7",
"smartparam": "^0.1.1", "smartparam": "^0.1.1",
"smartq": "^1.1.1", "smartq": "^1.1.1",
"smartshell": "^1.0.2", "smartshell": "^1.0.3",
"smartsocket": "^1.1.7", "smartsocket": "^1.1.7",
"smartssh": "^1.2.1", "smartssh": "^1.2.1",
"smartstring": "^2.0.24", "smartstring": "^2.0.24",

View File

@ -72,6 +72,7 @@ export let bash = async (commandArg: string, retryArg: number = 2, bareArg: bool
} }
} else { } else {
plugins.beautylog.log('ShellExec would be: ' + commandArg) plugins.beautylog.log('ShellExec would be: ' + commandArg)
await plugins.smartdelay.delayFor(100)
execResult = { execResult = {
exitCode: 0, exitCode: 0,
stdout: 'testOutput' stdout: 'testOutput'
@ -83,7 +84,7 @@ export let bash = async (commandArg: string, retryArg: number = 2, bareArg: bool
/** /**
* bashBare allows usage of bash without sourcing any files like nvm * bashBare allows usage of bash without sourcing any files like nvm
*/ */
export let bashBare = async(commandArg: string, retryArg: number = 2): Promise<string> => { export let bashBare = async (commandArg: string, retryArg: number = 2): Promise<string> => {
return await bash(commandArg, retryArg, true) return await bash(commandArg, retryArg, true)
} }

View File

@ -86,9 +86,9 @@ export let mapDockerfiles = async (sortedArray: Dockerfile[]): Promise<Dockerfil
* builds the correspoding real docker image for each Dockerfile class instance * builds the correspoding real docker image for each Dockerfile class instance
*/ */
export let buildDockerfiles = async (sortedArrayArg: Dockerfile[]) => { export let buildDockerfiles = async (sortedArrayArg: Dockerfile[]) => {
sortedArrayArg.forEach(async function (dockerfileArg) { for (let dockerfileArg of sortedArrayArg) {
await dockerfileArg.build() await dockerfileArg.build()
}) }
return sortedArrayArg return sortedArrayArg
} }
@ -96,9 +96,9 @@ export let buildDockerfiles = async (sortedArrayArg: Dockerfile[]) => {
* pushes the real Dockerfile images to a Docker registry * pushes the real Dockerfile images to a Docker registry
*/ */
export let pushDockerfiles = async (sortedArrayArg: Dockerfile[]) => { export let pushDockerfiles = async (sortedArrayArg: Dockerfile[]) => {
sortedArrayArg.forEach(async (dockerfileArg) => { for (let dockerfileArg of sortedArrayArg) {
await dockerfileArg.push(NpmciEnv.buildStage) await dockerfileArg.push(NpmciEnv.buildStage)
}) }
return sortedArrayArg return sortedArrayArg
} }
@ -107,9 +107,9 @@ export let pushDockerfiles = async (sortedArrayArg: Dockerfile[]) => {
* This is needed if building, testing, and publishing of Docker images is carried out in seperate CI stages. * This is needed if building, testing, and publishing of Docker images is carried out in seperate CI stages.
*/ */
export let pullDockerfileImages = async (sortableArrayArg: Dockerfile[], registryArg = 'registry.gitlab.com') => { export let pullDockerfileImages = async (sortableArrayArg: Dockerfile[], registryArg = 'registry.gitlab.com') => {
sortableArrayArg.forEach(async (dockerfileArg) => { for (let dockerfileArg of sortableArrayArg) {
await dockerfileArg.pull(registryArg) await dockerfileArg.pull(registryArg)
}) }
return sortableArrayArg return sortableArrayArg
} }
@ -118,9 +118,9 @@ export let pullDockerfileImages = async (sortableArrayArg: Dockerfile[], registr
* @param sortedArrayArg Dockerfile[] that contains all Dockerfiles in cwd * @param sortedArrayArg Dockerfile[] that contains all Dockerfiles in cwd
*/ */
export let testDockerfiles = async (sortedArrayArg: Dockerfile[]) => { export let testDockerfiles = async (sortedArrayArg: Dockerfile[]) => {
sortedArrayArg.forEach(async (dockerfileArg) => { for (let dockerfileArg of sortedArrayArg) {
await dockerfileArg.test() await dockerfileArg.test()
}) }
return sortedArrayArg return sortedArrayArg
} }
@ -163,6 +163,7 @@ export class Dockerfile {
plugins.beautylog.info('now building Dockerfile for ' + this.cleanTag) plugins.beautylog.info('now building Dockerfile for ' + this.cleanTag)
await bashBare('docker build -t ' + this.buildTag + ' -f ' + this.filePath + ' .') await bashBare('docker build -t ' + this.buildTag + ' -f ' + this.filePath + ' .')
NpmciEnv.dockerFilesBuilt.push(this) NpmciEnv.dockerFilesBuilt.push(this)
return
}; };
/** /**

View File

@ -8,6 +8,7 @@ export import projectinfo = require('projectinfo')
export import q = require('smartq') export import q = require('smartq')
export let request = require('request') export let request = require('request')
export import smartcli = require('smartcli') export import smartcli = require('smartcli')
export import smartdelay = require('smartdelay')
export import smartfile = require('smartfile') export import smartfile = require('smartfile')
export import shelljs = require('shelljs') export import shelljs = require('shelljs')
export import smartparam = require('smartparam') export import smartparam = require('smartparam')

View File

@ -22,11 +22,7 @@
version "2.1.5" version "2.1.5"
resolved "https://registry.yarnpkg.com/@types/js-base64/-/js-base64-2.1.5.tgz#31b6d36a66a4c59ae3f31b5e16bfd6b832a6eb41" resolved "https://registry.yarnpkg.com/@types/js-base64/-/js-base64-2.1.5.tgz#31b6d36a66a4c59ae3f31b5e16bfd6b832a6eb41"
"@types/lodash@4.x.x", "@types/lodash@^4.14.35": "@types/lodash@4.x.x", "@types/lodash@^4.14.35", "@types/lodash@^4.14.55":
version "4.14.52"
resolved "https://registry.yarnpkg.com/@types/lodash/-/lodash-4.14.52.tgz#de5c7ab14da1289733233c9b0ec6f9e377db90f5"
"@types/lodash@^4.14.55":
version "4.14.55" version "4.14.55"
resolved "https://registry.yarnpkg.com/@types/lodash/-/lodash-4.14.55.tgz#75d7d4eba020ee4103d4cbd0f2a3ef5db8f7534f" resolved "https://registry.yarnpkg.com/@types/lodash/-/lodash-4.14.55.tgz#75d7d4eba020ee4103d4cbd0f2a3ef5db8f7534f"
@ -42,11 +38,7 @@
version "2.2.39" version "2.2.39"
resolved "https://registry.yarnpkg.com/@types/mocha/-/mocha-2.2.39.tgz#f68d63db8b69c38e9558b4073525cf96c4f7a829" resolved "https://registry.yarnpkg.com/@types/mocha/-/mocha-2.2.39.tgz#f68d63db8b69c38e9558b4073525cf96c4f7a829"
"@types/node@*": "@types/node@*", "@types/node@^7.0.8":
version "7.0.5"
resolved "https://registry.yarnpkg.com/@types/node/-/node-7.0.5.tgz#96a0f0a618b7b606f1ec547403c00650210bfbb7"
"@types/node@^7.0.8":
version "7.0.8" version "7.0.8"
resolved "https://registry.yarnpkg.com/@types/node/-/node-7.0.8.tgz#25e4dd804b630c916ae671233e6d71f6ce18124a" resolved "https://registry.yarnpkg.com/@types/node/-/node-7.0.8.tgz#25e4dd804b630c916ae671233e6d71f6ce18124a"
@ -284,20 +276,7 @@ beautylog@^5.0.23:
smartenv "^1.2.5" smartenv "^1.2.5"
typings-global "^1.0.13" typings-global "^1.0.13"
beautylog@^6.0.0, beautylog@^6.1.1: beautylog@^6.0.0, beautylog@^6.1.1, beautylog@^6.1.3:
version "6.1.1"
resolved "https://registry.yarnpkg.com/beautylog/-/beautylog-6.1.1.tgz#2a83603ad7e2a0a09701ac63d7d3064a588dc779"
dependencies:
"@types/lodash" "4.x.x"
beautycolor "^1.0.5"
figlet "^1.2.0"
lodash "^4.17.4"
ora "^1.1.0"
smartenv "^2.0.0"
smartq "^1.0.4"
typings-global "^1.0.14"
beautylog@^6.1.3:
version "6.1.3" version "6.1.3"
resolved "https://registry.yarnpkg.com/beautylog/-/beautylog-6.1.3.tgz#0e8640cc429746b1e0c46e8767e9273b6b1902f1" resolved "https://registry.yarnpkg.com/beautylog/-/beautylog-6.1.3.tgz#0e8640cc429746b1e0c46e8767e9273b6b1902f1"
dependencies: dependencies:
@ -2147,15 +2126,7 @@ set-blocking@^2.0.0:
version "2.0.0" version "2.0.0"
resolved "https://registry.yarnpkg.com/set-blocking/-/set-blocking-2.0.0.tgz#045f9782d011ae9a6803ddd382b24392b3d890f7" resolved "https://registry.yarnpkg.com/set-blocking/-/set-blocking-2.0.0.tgz#045f9782d011ae9a6803ddd382b24392b3d890f7"
shelljs@^0.7.4, shelljs@^0.7.5: shelljs@^0.7.4, shelljs@^0.7.5, shelljs@^0.7.6, shelljs@^0.7.7:
version "0.7.6"
resolved "https://registry.yarnpkg.com/shelljs/-/shelljs-0.7.6.tgz#379cccfb56b91c8601e4793356eb5382924de9ad"
dependencies:
glob "^7.0.0"
interpret "^1.0.0"
rechoir "^0.6.2"
shelljs@^0.7.6, shelljs@^0.7.7:
version "0.7.7" version "0.7.7"
resolved "https://registry.yarnpkg.com/shelljs/-/shelljs-0.7.7.tgz#b2f5c77ef97148f4b4f6e22682e10bba8667cff1" resolved "https://registry.yarnpkg.com/shelljs/-/shelljs-0.7.7.tgz#b2f5c77ef97148f4b4f6e22682e10bba8667cff1"
dependencies: dependencies:
@ -2227,6 +2198,12 @@ smartcli@^2.0.1:
typings-global "^1.0.14" typings-global "^1.0.14"
yargs "^6.4.0" yargs "^6.4.0"
smartdelay@^1.0.1:
version "1.0.1"
resolved "https://registry.yarnpkg.com/smartdelay/-/smartdelay-1.0.1.tgz#687f8bcc09d7c62c9c5a8a1771c1aba3aff54156"
dependencies:
typings-global "^1.0.14"
smartenv@^1.2.2, smartenv@^1.2.5: smartenv@^1.2.2, smartenv@^1.2.5:
version "1.2.5" version "1.2.5"
resolved "https://registry.yarnpkg.com/smartenv/-/smartenv-1.2.5.tgz#5e50343ec4653953ef24929fc548cd74ea53205c" resolved "https://registry.yarnpkg.com/smartenv/-/smartenv-1.2.5.tgz#5e50343ec4653953ef24929fc548cd74ea53205c"
@ -2244,7 +2221,7 @@ smartenv@^2.0.0:
q "^1.4.1" q "^1.4.1"
typings-global "^1.0.14" typings-global "^1.0.14"
smartfile@4.1.6, smartfile@^4.0.21, smartfile@^4.1.0: smartfile@4.1.6:
version "4.1.6" version "4.1.6"
resolved "https://registry.yarnpkg.com/smartfile/-/smartfile-4.1.6.tgz#d71026aefef99233c56766c3c6c11afc41a19b3a" resolved "https://registry.yarnpkg.com/smartfile/-/smartfile-4.1.6.tgz#d71026aefef99233c56766c3c6c11afc41a19b3a"
dependencies: dependencies:
@ -2261,7 +2238,7 @@ smartfile@4.1.6, smartfile@^4.0.21, smartfile@^4.1.0:
vinyl "^2.0.1" vinyl "^2.0.1"
vinyl-file "^3.0.0" vinyl-file "^3.0.0"
smartfile@^4.1.7: smartfile@^4.0.21, smartfile@^4.1.0, smartfile@^4.1.7:
version "4.1.7" version "4.1.7"
resolved "https://registry.yarnpkg.com/smartfile/-/smartfile-4.1.7.tgz#5657bea62ad673d891b2c9a00f5866154e768c3f" resolved "https://registry.yarnpkg.com/smartfile/-/smartfile-4.1.7.tgz#5657bea62ad673d891b2c9a00f5866154e768c3f"
dependencies: dependencies:
@ -2309,9 +2286,9 @@ smartrequest@^1.0.4:
smartq "^1.1.0" smartq "^1.1.0"
typings-global "^1.0.14" typings-global "^1.0.14"
smartshell@^1.0.2: smartshell@^1.0.3:
version "1.0.2" version "1.0.3"
resolved "https://registry.yarnpkg.com/smartshell/-/smartshell-1.0.2.tgz#b05b8ea6b5ea7191f577028f96bf961c26302182" resolved "https://registry.yarnpkg.com/smartshell/-/smartshell-1.0.3.tgz#a921fed84783fd840e87d74964d8b4ca84f44998"
dependencies: dependencies:
"@types/shelljs" "^0.6.0" "@types/shelljs" "^0.6.0"
shelljs "^0.7.6" shelljs "^0.7.6"