Commits (10)
......@@ -3,15 +3,27 @@ services:
- docker:dind
stages:
- mirror
- test
- release
- trigger
- pages
mirror:
image: hosttoday/ht-docker-node:npmci
stage: mirror
script:
- npmci git mirror
tags:
- docker
test:
stage: test
script:
- npmci test stable
- npmci node install stable
- npmci npm install
- npmci npm test
tags:
- docker
- lossless
......@@ -21,7 +33,8 @@ release:
stage: release
environment: npmjs-com_registry
script:
- npmci publish
- npmci npm prepare
- npmci npm publish
only:
- tags
tags:
......
FROM hosttoday/ht-docker-node:stable
LABEL author="Lossless GmbH <office@lossless.com>"
RUN yarn global add npmci npmdocker npmts ts-node
\ No newline at end of file
FROM hosttoday/ht-docker-node:npmci
RUN yarn global add npmdocker
COPY ./buildContextDir /workspace
COPY ./ /workspace
WORKDIR /workspace
ENV CI=true
CMD ["npmdocker","runinside"];
......@@ -23,8 +23,14 @@ const DockerModule = require("./npmdocker.docker");
* It is just an https call to Google Analytics.
* Our privacy policy can be found here: https://lossless.gmbh/privacy.html
*/
let npmdockerAnalytics = new plugins.smartanalytics.AnalyticsAccount('npmdocker', 'UA-64087619-5');
npmdockerAnalytics.sendEvent('npm', 'exec', 'git.zone');
let npmdockerAnalytics = new plugins.smartanalytics.Analytics({
apiEndPoint: 'https://pubapi.lossless.one',
appName: 'npmdocker',
projectId: 'gitzone'
});
npmdockerAnalytics.recordEvent('npmtoolexecution', {
somedata: 'somedata'
});
let npmdockerCli = new plugins.smartcli.Smartcli();
exports.run = () => {
npmdockerCli.standardTask().then((argvArg) => __awaiter(this, void 0, void 0, function* () {
......@@ -76,4 +82,4 @@ exports.run = () => {
}));
npmdockerCli.startParse();
};
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibnBtZG9ja2VyLmNsaS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uL3RzL25wbWRvY2tlci5jbGkudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7OztBQUF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BQU0sT0FBTyxDQUFDLFVBQVUsQ0FBQyxJQUFJLENBQUMsbUNBQW1DLENBQUMsQ0FBQTtZQUVsRSxPQUFPLENBQUMsU0FBUyxDQUFDLEdBQUcsQ0FBQyxJQUFJLENBQUMseUJBQXlCLENBQUMsQ0FBQTtZQUNyRCxNQUFNLE9BQU8sQ0FBQyxVQUFVLENBQUMsSUFBSSxDQUFDLDBEQUEwRCxDQUFDLENBQUE7UUFDM0YsQ0FBQztRQUNELE9BQU8sQ0FBQyxTQUFTLENBQUMsR0FBRyxDQUFDLEtBQUssQ0FBQyxrQ0FBa0MsQ0FBQyxDQUFBO0lBQ2pFLENBQUMsQ0FBQSxDQUFDLENBQUE7SUFFRixZQUFZLENBQUMsVUFBVSxDQUFDLFdBQVcsQ0FBQyxDQUFDLElBQUksQ0FBQyxDQUFPLE9BQU8sRUFBRSxFQUFFO1FBQzFELE9BQU8sQ0FBQyxTQUFTLENBQUMsVUFBVSxDQUFDLFdBQVcsQ0FBQyxDQUFBO1FBQ3pDLE9BQU8sQ0FBQyxTQUFTLENBQUMsRUFBRSxDQUFDLG9CQUFvQixDQUFDLENBQUE7UUFDMUMsTUFBTSxPQUFPLENBQUMsVUFBVSxDQUFDLElBQUksQ0FBQyxrRUFBa0UsQ0FBQyxDQUFBO0lBQ25HLENBQUMsQ0FBQSxDQUFDLENBQUE7SUFFRixZQUFZLENBQUMsVUFBVSxFQUFFLENBQUE7QUFDM0IsQ0FBQyxDQUFBIn0=
\ No newline at end of file
......@@ -19,7 +19,6 @@ let getQenvKeyValueObject = () => __awaiter(this, void 0, void 0, function* () {
else {
qenvKeyValueObjectArray = [];
}
;
return qenvKeyValueObjectArray;
});
let buildConfig = (qenvKeyValueObjectArrayArg) => __awaiter(this, void 0, void 0, function* () {
......@@ -36,4 +35,4 @@ exports.run = () => __awaiter(this, void 0, void 0, function* () {
let config = yield getQenvKeyValueObject().then(buildConfig);
return config;
});
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9u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UM5QixDQUFDO0lBQ0QsTUFBTSxDQUFDLHVCQUF1QixDQUFBO0FBQ2hDLENBQUMsQ0FBQSxDQUFBO0FBRUQsSUFBSSxXQUFXLEdBQUcsQ0FBTywwQkFBNkMsRUFBRSxFQUFFO0lBQ3hFLElBQUksUUFBUSxHQUFHLElBQUksT0FBTyxDQUFDLFFBQVEsQ0FBQyxRQUFRLENBQUMsS0FBSyxDQUFDLEdBQUcsQ0FBQyxDQUFBO0lBQ3ZELElBQUksTUFBTSxHQUFHLFFBQVEsQ0FBQyxPQUFPLENBQzNCLFdBQVcsRUFDWDtRQUNFLFNBQVMsRUFBRSxnQ0FBZ0M7UUFDM0MsT0FBTyxFQUFFLG1CQUFtQjtRQUM1QixVQUFVLEVBQUUsS0FBSztRQUNqQixtQkFBbUIsRUFBRSwwQkFBMEI7S0FDaEQsQ0FDRixDQUFBO0lBQ0QsTUFBTSxDQUFDLE1BQU0sQ0FBQTtBQUNmLENBQUMsQ0FBQSxDQUFBO0FBRVUsUUFBQSxHQUFHLEdBQUcsR0FBMkIsRUFBRTtJQUM1QyxJQUFJLE1BQU0sR0FBRyxNQUFNLHFCQUFxQixFQUFFLENBQUMsSUFBSSxDQUFDLFdBQVcsQ0FBQyxDQUFBO0lBQzVELE1BQU0sQ0FBQyxNQUFNLENBQUE7QUFDZixDQUFDLENBQUEsQ0FBQSJ9
\ No newline at end of file
......@@ -49,8 +49,9 @@ let buildDockerFile = () => {
});
plugins.beautylog.info(`Base image is: ${config.baseImage}`);
plugins.beautylog.info(`Command is: ${config.command}`);
plugins.smartfile.memory.toFsSync(dockerfile, paths.dockerfile);
plugins.smartfile.memory.toFsSync(dockerfile, plugins.path.join(paths.cwd, 'npmdocker'));
plugins.beautylog.ok('Dockerfile created!');
plugins.beautylog.ora.stop();
done.resolve();
return done.promise;
};
......@@ -58,22 +59,15 @@ let buildDockerFile = () => {
* builds the Dockerimage from the built Dockerfile
*/
let buildDockerImage = () => __awaiter(this, void 0, void 0, function* () {
plugins.beautylog.ora.text('pulling latest base image from registry...');
yield plugins.smartshell.execSilent(`docker pull ${config.baseImage}`).then(() => __awaiter(this, void 0, void 0, function* () {
plugins.beautylog.ora.text('building Dockerimage...');
// are we creating a build context form project ?
if (process.env.CI === 'true') {
plugins.beautylog.ora.text('creating build context...');
plugins.smartfile.fs.copySync(paths.cwd, paths.buildContextDir);
}
yield plugins.smartshell.execSilent(`docker build -f ${paths.dockerfile} -t ${dockerData.imageTag} ${paths.assets}`).then((response) => __awaiter(this, void 0, void 0, function* () {
if (response.exitCode !== 0) {
console.log(response.stdout);
process.exit(1);
}
plugins.beautylog.ok('Dockerimage built!');
}));
}));
plugins.beautylog.info('pulling latest base image from registry...');
yield plugins.smartshell.exec(`docker pull ${config.baseImage}`);
plugins.beautylog.ora.text('building Dockerimage...');
let execResult = yield plugins.smartshell.execSilent(`docker build -f npmdocker -t ${dockerData.imageTag} ${paths.cwd}`);
if (execResult.exitCode !== 0) {
console.log(execResult.stdout);
process.exit(1);
}
plugins.beautylog.ok('Dockerimage built!');
});
let buildDockerProjectMountString = () => __awaiter(this, void 0, void 0, function* () {
if (process.env.CI !== 'true') {
......@@ -88,7 +82,6 @@ let buildDockerEnvString = () => __awaiter(this, void 0, void 0, function* () {
for (let keyValueObjectArg of config.keyValueObjectArray) {
let envString = dockerData.dockerEnvString = dockerData.dockerEnvString + `-e ${keyValueObjectArg.key}=${keyValueObjectArg.value} `;
}
;
});
/**
* creates string to mount the docker.sock inside the testcontainer
......@@ -125,12 +118,6 @@ let deleteDockerImage = () => __awaiter(this, void 0, void 0, function* () {
}
}));
});
/**
* cleans up, deletes the build context
*/
let deleteBuildContext = () => __awaiter(this, void 0, void 0, function* () {
yield plugins.smartfile.fs.remove(paths.buildContextDir);
});
let preClean = () => __awaiter(this, void 0, void 0, function* () {
yield deleteDockerImage()
.then(deleteDockerContainer)
......@@ -141,10 +128,10 @@ let preClean = () => __awaiter(this, void 0, void 0, function* () {
let postClean = () => __awaiter(this, void 0, void 0, function* () {
yield deleteDockerContainer()
.then(deleteDockerImage)
.then(deleteBuildContext)
.then(() => __awaiter(this, void 0, void 0, function* () {
plugins.beautylog.ok('cleaned up!');
}));
yield plugins.smartfile.fs.remove(paths.npmdockerFile);
});
exports.run = (configArg) => __awaiter(this, void 0, void 0, function* () {
plugins.beautylog.ora.start();
......@@ -161,4 +148,4 @@ exports.run = (configArg) => __awaiter(this, void 0, void 0, function* () {
.catch(err => { console.log(err); });
return config;
});
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibnBtZG9ja2VyLmRvY2tlci5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uL3RzL25wbWRvY2tlci5kb2NrZXIudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7OztBQUFBLCtDQUErQztBQUMvQywyQ0FBMkM7QUFDM0MsaURBQWdEO0FBS2hELElBQUksTUFBZSxDQUFBO0FBRW5COztHQUVHO0FBQ0gsSUFBSSxVQUFVLEdBQUc7SUFDZixRQUFRLEVBQUUsNkJBQTZCO0lBQ3ZDLGFBQWEsRUFBRSwwQkFBMEI7SUFDekMsd0JBQXdCLEVBQUUsRUFBRTtJQUM1QixnQkFBZ0IsRUFBRSxFQUFFO0lBQ3BCLGVBQWUsRUFBRSxFQUFFO0NBQ3BCLENBQUE7QUFFRDs7R0FFRztBQUNILElBQUksV0FBVyxHQUFHO0lBQ2hCLElBQUksSUFBSSxHQUFHLE9BQU8sQ0FBQyxDQUFDLENBQUMsS0FBSyxFQUFFLENBQUE7SUFDNUIsT0FBTyxDQUFDLFNBQVMsQ0FBQyxHQUFHLENBQUMsSUFBSSxDQUFDLG9CQUFvQixDQUFDLENBQUE7SUFDaEQsRUFBRSxDQUFDLENBQUMsT0FBTyxDQUFDLFVBQVUsQ0FBQyxLQUFLLENBQUMsUUFBUSxDQUFDLENBQUMsQ0FBQyxDQUFDO1FBQ3ZDLE9BQU8sQ0F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RUFBRTtJQUM5RCxPQUFPLENBQUMsU0FBUyxDQUFDLEdBQUcsQ0FBQyxLQUFLLEVBQUUsQ0FBQTtJQUM3QixNQUFNLEdBQUcsU0FBUyxDQUFBO0lBQ2xCLElBQUksWUFBWSxHQUFHLE1BQU0sV0FBVyxFQUFFO1NBQ25DLElBQUksQ0FBQyxRQUFRLENBQUM7U0FDZCxJQUFJLENBQUMsZUFBZSxDQUFDO1NBQ3JCLElBQUksQ0FBQyxnQkFBZ0IsQ0FBQztTQUN0QixJQUFJLENBQUMsNkJBQTZCLENBQUM7U0FDbkMsSUFBSSxDQUFDLG9CQUFvQixDQUFDO1NBQzFCLElBQUksQ0FBQyxxQkFBcUIsQ0FBQztTQUMzQixJQUFJLENBQUMsY0FBYyxDQUFDO1NBQ3BCLElBQUksQ0FBQyxTQUFTLENBQUM7U0FDZixLQUFLLENBQUMsR0FBRyxDQUFDLEVBQUUsR0FBRyxPQUFPLENBQUMsR0FBRyxDQUFDLEdBQUcsQ0FBQyxDQUFBLENBQUMsQ0FBQyxDQUFDLENBQUE7SUFDckMsTUFBTSxDQUFDLE1BQU0sQ0FBQTtBQUNmLENBQUMsQ0FBQSxDQUFBIn0=
\ No newline at end of file
export declare let cwd: string;
export declare let packageBase: string;
export declare let assets: string;
export declare let buildContextDir: string;
export declare let dockerfile: string;
export declare let npmdockerFile: string;
......@@ -3,11 +3,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
const plugins = require("./npmdocker.plugins");
// directories
exports.cwd = process.cwd();
exports.packageBase = plugins.path.join(__dirname, "../");
exports.assets = plugins.path.join(exports.packageBase, "assets/");
exports.packageBase = plugins.path.join(__dirname, '../');
exports.assets = plugins.path.join(exports.packageBase, 'assets/');
plugins.smartfile.fs.ensureDirSync(exports.assets);
exports.buildContextDir = plugins.path.join(exports.assets, "buildContextDir");
plugins.smartfile.fs.ensureDirSync(exports.buildContextDir);
// files
exports.dockerfile = plugins.path.join(exports.assets, "Dockerfile");
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibnBtZG9ja2VyLnBhdGhzLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vdHMvbnBtZG9ja2VyLnBhdGhzLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7O0FBQUEsK0NBQStDO0FBRS9DLGNBQWM7QUFDSCxRQUFBLEdBQUcsR0FBRyxPQUFPLENBQUMsR0FBRyxFQUFFLENBQUM7QUFDcEIsUUFBQSxXQUFXLEdBQUcsT0FBTyxDQUFDLElBQUksQ0FBQyxJQUFJLENBQUMsU0FBUyxFQUFFLEtBQUssQ0FBQyxDQUFDO0FBQ2xELFFBQUEsTUFBTSxHQUFHLE9BQU8sQ0FBQyxJQUFJLENBQUMsSUFBSSxDQUFDLG1CQUFXLEVBQUUsU0FBUyxDQUFDLENBQUM7QUFDOUQsT0FBTyxDQUFDLFNBQVMsQ0FBQyxFQUFFLENBQUMsYUFBYSxDQUFDLGNBQU0sQ0FBQyxDQUFDO0FBRWhDLFFBQUEsZUFBZSxHQUFHLE9BQU8sQ0FBQyxJQUFJLENBQUMsSUFBSSxDQUFDLGNBQU0sRUFBQyxpQkFBaUIsQ0FBQyxDQUFDO0FBQ3pFLE9BQU8sQ0FBQyxTQUFTLENBQUMsRUFBRSxDQUFDLGFBQWEsQ0FBQyx1QkFBZSxDQUFDLENBQUM7QUFFcEQsUUFBUTtBQUNHLFFBQUEsVUFBVSxHQUFHLE9BQU8sQ0FBQyxJQUFJLENBQUMsSUFBSSxDQUFDLGNBQU0sRUFBRSxZQUFZLENBQUMsQ0FBQyJ9
\ No newline at end of file
exports.npmdockerFile = plugins.path.join(exports.cwd, 'npmdocker');
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibnBtZG9ja2VyLnBhdGhzLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vdHMvbnBtZG9ja2VyLnBhdGhzLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7O0FBQUEsK0NBQThDO0FBRTlDLGNBQWM7QUFDSCxRQUFBLEdBQUcsR0FBRyxPQUFPLENBQUMsR0FBRyxFQUFFLENBQUE7QUFDbkIsUUFBQSxXQUFXLEdBQUcsT0FBTyxDQUFDLElBQUksQ0FBQyxJQUFJLENBQUMsU0FBUyxFQUFFLEtBQUssQ0FBQyxDQUFBO0FBQ2pELFFBQUEsTUFBTSxHQUFHLE9BQU8sQ0FBQyxJQUFJLENBQUMsSUFBSSxDQUFDLG1CQUFXLEVBQUUsU0FBUyxDQUFDLENBQUE7QUFDN0QsT0FBTyxDQUFDLFNBQVMsQ0FBQyxFQUFFLENBQUMsYUFBYSxDQUFDLGNBQU0sQ0FBQyxDQUFBO0FBQy9CLFFBQUEsYUFBYSxHQUFHLE9BQU8sQ0FBQyxJQUFJLENBQUMsSUFBSSxDQUFDLFdBQUcsRUFBRSxXQUFXLENBQUMsQ0FBQSJ9
\ No newline at end of file
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const plugins = require("./npmdocker.plugins");
let getMountSolutionString = (optionsArg) => {
if (process.env.CI) {
return 'COPY ./ /workspace';
}
else {
return '# not copying workspcae since not in CI';
}
};
let getGlobalPreparationString = (optionsArg) => {
if (optionsArg.baseImage !== 'hosttoday/ht-docker-node:npmdocker') {
return 'RUN yarn global add npmdocker';
}
else {
return '# not installing npmdocker since it is included in the base image';
}
};
exports.dockerfileSnippet = (optionsArg) => {
return plugins.smartstring.indent.normalize(`
FROM ${optionsArg.baseImage}
RUN yarn global add npmdocker
COPY ./buildContextDir /workspace
WORKDIR /workspace
ENV CI=true
CMD ["npmdocker","runinside"];
`);
FROM ${optionsArg.baseImage}
# For info about what npmdocker does read the docs at https://gitzone.github.io/npmdocker
${getGlobalPreparationString(optionsArg)}
${getMountSolutionString(optionsArg)}
WORKDIR /workspace
ENV CI=true
ENTRYPOINT ["npmdocker"]
CMD ["runinside"]
`);
};
//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DLENBQUM7UUFDbEUsTUFBTSxDQUFDLCtCQUErQixDQUFBO0lBQ3hDLENBQUM7SUFBQyxJQUFJLENBQUMsQ0FBQztRQUNOLE1BQU0sQ0FBQyxtRUFBbUUsQ0FBQTtJQUM1RSxDQUFDO0FBQ0gsQ0FBQyxDQUFBO0FBRVUsUUFBQSxpQkFBaUIsR0FBRyxDQUFDLFVBQThCLEVBQVUsRUFBRTtJQUN4RSxNQUFNLENBQUMsT0FBTyxDQUFDLFdBQVcsQ0FBQyxNQUFNLENBQUMsU0FBUyxDQUN6QztPQUNHLFVBQVUsQ0FBQyxTQUFTOztFQUV6QiwwQkFBMEIsQ0FBQyxVQUFVLENBQUM7RUFDdEMsc0JBQXNCLENBQUMsVUFBVSxDQUFDOzs7OztDQUtuQyxDQUNFLENBQUE7QUFDSCxDQUFDLENBQUEifQ==
\ No newline at end of file
{
"npmts":{
"mode":"default",
"cli":true,
"dockerSock":true
"cli":true
},
"npmci": {
"globalNpmTools": [
"npmGlobalTools": [
"npmts"
]
}
......
{
"name": "npmdocker",
"version": "1.2.12",
"version": "1.2.17",
"description": "develop npm modules cross platform with docker",
"main": "dist/index.js",
"typings": "dist/index.d.ts",
......@@ -11,7 +11,7 @@
"test": "test"
},
"scripts": {
"test": "(npm run clean && npm run compile && npm run setupCheck && npm run testStandard && npm run testSpeed && npm run testClean)",
"test": "(npm run clean && npm run compile && npm run setupCheck && npm run testStandard && npm run testSpeed)",
"testStandard": "(cd test/ && node ../dist/index.js)",
"testSpeed": "(cd test/ && node ../dist/index.js speedtest)",
"testClean": "(cd test/ && node ../dist/index.js clean --all)",
......@@ -36,15 +36,15 @@
"dependencies": {
"@types/shelljs": "0.x.x",
"beautylog": "^6.1.10",
"npmextra": "^2.0.7",
"projectinfo": "^3.0.2",
"npmextra": "^2.0.9",
"projectinfo": "^3.0.4",
"qenv": "^1.1.7",
"smartanalytics": "^1.0.6",
"smartanalytics": "^2.0.9",
"smartcli": "^2.0.7",
"smartfile": "^4.2.17",
"smartfile": "^4.2.26",
"smartq": "^1.1.6",
"smartshell": "^1.0.8",
"smartshell": "^1.0.18",
"smartstring": "^2.0.24",
"typings-global": "^1.0.19"
"typings-global": "^1.0.20"
}
}
......@@ -17,8 +17,14 @@ import * as DockerModule from './npmdocker.docker'
* It is just an https call to Google Analytics.
* Our privacy policy can be found here: https://lossless.gmbh/privacy.html
*/
let npmdockerAnalytics = new plugins.smartanalytics.AnalyticsAccount('npmdocker','UA-64087619-5')
npmdockerAnalytics.sendEvent('npm','exec','git.zone')
let npmdockerAnalytics = new plugins.smartanalytics.Analytics({
apiEndPoint: 'https://pubapi.lossless.one',
appName: 'npmdocker',
projectId: 'gitzone'
})
npmdockerAnalytics.recordEvent('npmtoolexecution', {
somedata: 'somedata'
})
let npmdockerCli = new plugins.smartcli.Smartcli()
......
......@@ -18,7 +18,7 @@ let getQenvKeyValueObject = async () => {
qenvKeyValueObjectArray = new plugins.qenv.Qenv(paths.cwd, '.nogit/').keyValueObjectArray
} else {
qenvKeyValueObjectArray = []
};
}
return qenvKeyValueObjectArray
}
......
import * as plugins from './npmdocker.plugins';
import * as paths from './npmdocker.paths';
import * as plugins from './npmdocker.plugins'
import * as paths from './npmdocker.paths'
import * as snippets from './npmdocker.snippets'
// interfaces
......@@ -45,8 +45,9 @@ let buildDockerFile = () => {
})
plugins.beautylog.info(`Base image is: ${config.baseImage}`)
plugins.beautylog.info(`Command is: ${config.command}`)
plugins.smartfile.memory.toFsSync(dockerfile, paths.dockerfile)
plugins.smartfile.memory.toFsSync(dockerfile, plugins.path.join(paths.cwd, 'npmdocker'))
plugins.beautylog.ok('Dockerfile created!')
plugins.beautylog.ora.stop()
done.resolve()
return done.promise
}
......@@ -55,26 +56,19 @@ let buildDockerFile = () => {
* builds the Dockerimage from the built Dockerfile
*/
let buildDockerImage = async () => {
plugins.beautylog.ora.text('pulling latest base image from registry...')
await plugins.smartshell.execSilent(
plugins.beautylog.info('pulling latest base image from registry...')
await plugins.smartshell.exec(
`docker pull ${config.baseImage}`
).then(async () => {
plugins.beautylog.ora.text('building Dockerimage...')
// are we creating a build context form project ?
if (process.env.CI === 'true') {
plugins.beautylog.ora.text('creating build context...')
plugins.smartfile.fs.copySync(paths.cwd, paths.buildContextDir)
}
await plugins.smartshell.execSilent(
`docker build -f ${paths.dockerfile} -t ${dockerData.imageTag} ${paths.assets}`
).then(async (response) => {
if (response.exitCode !== 0) {
console.log(response.stdout)
process.exit(1)
}
plugins.beautylog.ok('Dockerimage built!')
})
})
)
plugins.beautylog.ora.text('building Dockerimage...')
let execResult = await plugins.smartshell.execSilent(
`docker build -f npmdocker -t ${dockerData.imageTag} ${paths.cwd}`
)
if (execResult.exitCode !== 0) {
console.log(execResult.stdout)
process.exit(1)
}
plugins.beautylog.ok('Dockerimage built!')
}
let buildDockerProjectMountString = async () => {
......@@ -89,7 +83,7 @@ let buildDockerProjectMountString = async () => {
let buildDockerEnvString = async () => {
for (let keyValueObjectArg of config.keyValueObjectArray) {
let envString = dockerData.dockerEnvString = dockerData.dockerEnvString + `-e ${keyValueObjectArg.key}=${keyValueObjectArg.value} `
};
}
}
/**
......@@ -130,13 +124,6 @@ let deleteDockerImage = async () => {
})
}
/**
* cleans up, deletes the build context
*/
let deleteBuildContext = async () => {
await plugins.smartfile.fs.remove(paths.buildContextDir)
}
let preClean = async () => {
await deleteDockerImage()
.then(deleteDockerContainer)
......@@ -148,14 +135,12 @@ let preClean = async () => {
let postClean = async () => {
await deleteDockerContainer()
.then(deleteDockerImage)
.then(deleteBuildContext)
.then(async () => {
plugins.beautylog.ok('cleaned up!')
})
await plugins.smartfile.fs.remove(paths.npmdockerFile)
}
export let run = async (configArg: IConfig): Promise<IConfig> => {
plugins.beautylog.ora.start()
config = configArg
......
import * as plugins from "./npmdocker.plugins";
import * as plugins from "./npmdocker.plugins"
// directories
export let cwd = process.cwd();
export let packageBase = plugins.path.join(__dirname, "../");
export let assets = plugins.path.join(packageBase, "assets/");
plugins.smartfile.fs.ensureDirSync(assets);
export let buildContextDir = plugins.path.join(assets,"buildContextDir");
plugins.smartfile.fs.ensureDirSync(buildContextDir);
// files
export let dockerfile = plugins.path.join(assets, "Dockerfile");
export let cwd = process.cwd()
export let packageBase = plugins.path.join(__dirname, '../')
export let assets = plugins.path.join(packageBase, 'assets/')
plugins.smartfile.fs.ensureDirSync(assets)
export let npmdockerFile = plugins.path.join(cwd, 'npmdocker')
import * as plugins from "./npmdocker.plugins";
export interface IDockerfileSnippet {
baseImage: string;
command: string;
baseImage: string
command: string
}
let getMountSolutionString = (optionsArg: IDockerfileSnippet) => {
if (process.env.CI) {
return 'COPY ./ /workspace'
} else {
return '# not copying workspcae since not in CI'
}
}
let getGlobalPreparationString = (optionsArg: IDockerfileSnippet) => {
if (optionsArg.baseImage !== 'hosttoday/ht-docker-node:npmdocker') {
return 'RUN yarn global add npmdocker'
} else {
return '# not installing npmdocker since it is included in the base image'
}
}
export let dockerfileSnippet = (optionsArg: IDockerfileSnippet): string => {
return plugins.smartstring.indent.normalize(`
FROM ${optionsArg.baseImage}
RUN yarn global add npmdocker
COPY ./buildContextDir /workspace
WORKDIR /workspace
ENV CI=true
CMD ["npmdocker","runinside"];
`)
return plugins.smartstring.indent.normalize(
`
FROM ${optionsArg.baseImage}
# For info about what npmdocker does read the docs at https://gitzone.github.io/npmdocker
${getGlobalPreparationString(optionsArg)}
${getMountSolutionString(optionsArg)}
WORKDIR /workspace
ENV CI=true
ENTRYPOINT ["npmdocker"]
CMD ["runinside"]
`
)
}
\ No newline at end of file
This diff is collapsed.