Compare commits
No commits in common. "master" and "v1.2.30" have entirely different histories.
7
.gitignore
vendored
7
.gitignore
vendored
@ -8,16 +8,13 @@ pages/
|
|||||||
# installs
|
# installs
|
||||||
node_modules/
|
node_modules/
|
||||||
|
|
||||||
# caches
|
# caches and builds
|
||||||
.yarn/
|
.yarn/
|
||||||
.cache/
|
.cache/
|
||||||
.rpt2_cache
|
|
||||||
|
|
||||||
# builds
|
|
||||||
dist/
|
dist/
|
||||||
dist_web/
|
dist_web/
|
||||||
dist_serve/
|
dist_serve/
|
||||||
dist_ts_web/
|
dist_ts_web/
|
||||||
|
|
||||||
# custom
|
# custom
|
||||||
test
|
test/
|
||||||
|
@ -57,8 +57,8 @@ pages:
|
|||||||
image: hosttoday/ht-docker-node:npmci
|
image: hosttoday/ht-docker-node:npmci
|
||||||
stage: pages
|
stage: pages
|
||||||
script:
|
script:
|
||||||
- npmci command npm install -g @gitzone/tsdoc
|
- npmci command yarn global add npmpage
|
||||||
- npmci command tsdoc
|
- npmci command npmpage
|
||||||
only:
|
only:
|
||||||
- tags
|
- tags
|
||||||
tags:
|
tags:
|
||||||
|
3
.vscode/settings.json
vendored
3
.vscode/settings.json
vendored
@ -1,3 +0,0 @@
|
|||||||
{
|
|
||||||
"typescript.tsdk": "node_modules/typescript/lib"
|
|
||||||
}
|
|
62
README.md
Normal file
62
README.md
Normal file
@ -0,0 +1,62 @@
|
|||||||
|
# @gitzone/npmdocker
|
||||||
|
develop npm modules cross platform with docker
|
||||||
|
|
||||||
|
## Availabililty and Links
|
||||||
|
* [npmjs.org (npm package)](https://www.npmjs.com/package/@gitzone/npmdocker)
|
||||||
|
* [gitlab.com (source)](https://gitlab.com/gitzone/npmdocker)
|
||||||
|
* [github.com (source mirror)](https://github.com/gitzone/npmdocker)
|
||||||
|
* [docs (typedoc)](https://gitzone.gitlab.io/npmdocker/)
|
||||||
|
|
||||||
|
## Status for master
|
||||||
|
[](https://gitlab.com/gitzone/npmdocker/commits/master)
|
||||||
|
[](https://gitlab.com/gitzone/npmdocker/commits/master)
|
||||||
|
[](https://www.npmjs.com/package/@gitzone/npmdocker)
|
||||||
|
[](https://snyk.io/test/npm/@gitzone/npmdocker)
|
||||||
|
[](https://nodejs.org/dist/latest-v10.x/docs/api/)
|
||||||
|
[](https://nodejs.org/dist/latest-v10.x/docs/api/)
|
||||||
|
[](https://prettier.io/)
|
||||||
|
|
||||||
|
## Usage
|
||||||
|
|
||||||
|
Use TypeScript for best in class instellisense.
|
||||||
|
|
||||||
|
### Why does this package exist?
|
||||||
|
|
||||||
|
Sometimes you want a clean and fresh linux environment everytime you test your package.
|
||||||
|
Usually this is the default i CI, but locally behaviour tends to defer.
|
||||||
|
|
||||||
|
### Where does it work
|
||||||
|
|
||||||
|
The npmdocker package works in everywhere where the docker cli is available. e.g.:
|
||||||
|
|
||||||
|
- docker toolbox
|
||||||
|
- native docker application
|
||||||
|
- docker in docker
|
||||||
|
- mounted docker.sock
|
||||||
|
|
||||||
|
### How do I use it?
|
||||||
|
|
||||||
|
create a npmextra.json in the project's root directory
|
||||||
|
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"npmdocker": {
|
||||||
|
"baseImage": "hosttoday/ht-docker-node:npmts",
|
||||||
|
"command": "npmci test stable",
|
||||||
|
"dockerSock": false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
| option | description |
|
||||||
|
| ----------- | ------------------------------------------------------------------------------------- |
|
||||||
|
| baseImage | the base image that is the context for your project |
|
||||||
|
| command | the cli command to run within the the project's directory inside the docker container |
|
||||||
|
| dockersSock | wether or not the testcontainer will have access to the docker.sock of the host |
|
||||||
|
|
||||||
|
For further information read the linked docs at the top of this readme.
|
||||||
|
|
||||||
|
> MIT licensed | **©** [Lossless GmbH](https://lossless.gmbh)
|
||||||
|
| By using this npm module you agree to our [privacy policy](https://lossless.gmbH/privacy.html)
|
||||||
|
|
||||||
|
[](https://maintainedby.lossless.com)
|
@ -1,6 +1,6 @@
|
|||||||
FROM hosttoday/ht-docker-node:npmci
|
FROM hosttoday/ht-docker-node:npmci
|
||||||
RUN yarn global add @gitzone/tsdocker
|
RUN yarn global add npmdocker
|
||||||
COPY ./ /workspace
|
COPY ./ /workspace
|
||||||
WORKDIR /workspace
|
WORKDIR /workspace
|
||||||
ENV CI=true
|
ENV CI=true
|
||||||
CMD ["tsdocker","runinside"];
|
CMD ["npmdocker","runinside"];
|
||||||
|
28344
package-lock.json
generated
28344
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
42
package.json
42
package.json
@ -1,12 +1,12 @@
|
|||||||
{
|
{
|
||||||
"name": "@gitzone/tsdocker",
|
"name": "@gitzone/tsdocker",
|
||||||
"version": "1.2.40",
|
"version": "1.2.30",
|
||||||
"private": false,
|
"private": false,
|
||||||
"description": "develop npm modules cross platform with docker",
|
"description": "develop npm modules cross platform with docker",
|
||||||
"main": "dist/index.js",
|
"main": "dist/index.js",
|
||||||
"typings": "dist/index.d.ts",
|
"typings": "dist/index.d.ts",
|
||||||
"bin": {
|
"bin": {
|
||||||
"tsdocker": "cli.js"
|
"npmdocker": "cli.js"
|
||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"test": "(npm run clean && npm run setupCheck && npm run testStandard && npm run testSpeed)",
|
"test": "(npm run clean && npm run setupCheck && npm run testStandard && npm run testSpeed)",
|
||||||
@ -33,28 +33,28 @@
|
|||||||
},
|
},
|
||||||
"homepage": "https://gitlab.com/gitzone/npmdocker#README",
|
"homepage": "https://gitlab.com/gitzone/npmdocker#README",
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@gitzone/tsbuild": "^2.1.27",
|
"@gitzone/tsbuild": "^2.1.11",
|
||||||
"@gitzone/tsrun": "^1.2.17",
|
"@gitzone/tsrun": "^1.2.6",
|
||||||
"@gitzone/tstest": "^1.0.57",
|
"@gitzone/tstest": "^1.0.20",
|
||||||
"@pushrocks/tapbundle": "^3.2.14",
|
"@pushrocks/tapbundle": "^3.0.9",
|
||||||
"@types/node": "^16.10.1",
|
"@types/node": "^12.0.0",
|
||||||
"tslint": "^6.1.3",
|
"tslint": "^5.16.0",
|
||||||
"tslint-config-prettier": "^1.18.0"
|
"tslint-config-prettier": "^1.18.0"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@pushrocks/npmextra": "^3.0.9",
|
"@pushrocks/npmextra": "^3.0.1",
|
||||||
"@pushrocks/projectinfo": "^4.0.5",
|
"@pushrocks/projectinfo": "^4.0.2",
|
||||||
"@pushrocks/qenv": "^4.0.10",
|
"@pushrocks/qenv": "^4.0.0",
|
||||||
"@pushrocks/smartanalytics": "^2.0.15",
|
"@pushrocks/smartanalytics": "^2.0.15",
|
||||||
"@pushrocks/smartcli": "^3.0.14",
|
"@pushrocks/smartcli": "^3.0.7",
|
||||||
"@pushrocks/smartfile": "^8.0.10",
|
"@pushrocks/smartfile": "^7.0.2",
|
||||||
"@pushrocks/smartlog": "^2.0.44",
|
"@pushrocks/smartlog": "^2.0.19",
|
||||||
"@pushrocks/smartlog-destination-local": "^8.0.8",
|
"@pushrocks/smartlog-destination-local": "^7.0.5",
|
||||||
"@pushrocks/smartlog-source-ora": "^1.0.9",
|
"@pushrocks/smartlog-source-ora": "^1.0.4",
|
||||||
"@pushrocks/smartopen": "^1.0.22",
|
"@pushrocks/smartopen": "^1.0.8",
|
||||||
"@pushrocks/smartpromise": "^3.1.6",
|
"@pushrocks/smartpromise": "^3.0.2",
|
||||||
"@pushrocks/smartshell": "^2.0.28",
|
"@pushrocks/smartshell": "^2.0.13",
|
||||||
"@pushrocks/smartstring": "^3.0.24",
|
"@pushrocks/smartstring": "^3.0.10",
|
||||||
"@types/shelljs": "^0.8.9"
|
"@types/shelljs": "^0.8.5"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
20
ts/analytics.ts
Normal file
20
ts/analytics.ts
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
/**
|
||||||
|
* smartanalytics:
|
||||||
|
* We count executions of this tool to keep track which of our tools are really used.
|
||||||
|
* This insight is used to plan spending our limited resources for improving them.
|
||||||
|
* Any submitted analytics data is fully anonymized (no Ips or any other personal information is tracked).
|
||||||
|
* Feel free to dig into the smartanalytics package, if you are interested in how it works.
|
||||||
|
* Our privacy policy can be found here: https://lossless.gmbh/privacy.html
|
||||||
|
* The privacy policy is also linked in the readme, so we hope this behaviour does not come as a surprise to you.
|
||||||
|
* Have a nice day and regards
|
||||||
|
* Your Open Source team at Lossless GmbH :)
|
||||||
|
*/
|
||||||
|
import * as smartanalytics from '@pushrocks/smartanalytics';
|
||||||
|
const npmdockerAnalytics = new smartanalytics.Analytics({
|
||||||
|
apiEndPoint: 'https://pubapi.lossless.one',
|
||||||
|
appName: 'tsdocker',
|
||||||
|
projectId: 'gitzone'
|
||||||
|
});
|
||||||
|
npmdockerAnalytics.recordEvent('npmtoolexecution', {
|
||||||
|
somedata: 'somedata'
|
||||||
|
});
|
@ -1,3 +1,4 @@
|
|||||||
|
import './analytics';
|
||||||
import * as plugins from './tsdocker.plugins';
|
import * as plugins from './tsdocker.plugins';
|
||||||
import * as cli from './tsdocker.cli';
|
import * as cli from './tsdocker.cli';
|
||||||
|
|
||||||
|
@ -11,7 +11,7 @@ const tsdockerCli = new plugins.smartcli.Smartcli();
|
|||||||
|
|
||||||
export let run = () => {
|
export let run = () => {
|
||||||
tsdockerCli.standardTask().subscribe(async argvArg => {
|
tsdockerCli.standardTask().subscribe(async argvArg => {
|
||||||
const configArg = await ConfigModule.run().then(DockerModule.run);
|
let configArg = await ConfigModule.run().then(DockerModule.run);
|
||||||
if (configArg.exitCode === 0) {
|
if (configArg.exitCode === 0) {
|
||||||
logger.log('success', 'container ended all right!');
|
logger.log('success', 'container ended all right!');
|
||||||
} else {
|
} else {
|
||||||
@ -68,7 +68,7 @@ export let run = () => {
|
|||||||
});
|
});
|
||||||
logger.log('ok', 'Starting speedtest');
|
logger.log('ok', 'Starting speedtest');
|
||||||
await smartshellInstance.exec(
|
await smartshellInstance.exec(
|
||||||
`docker pull tianon/speedtest && docker run --rm tianon/speedtest --accept-license --accept-gdpr`
|
`docker pull tianon/speedtest && docker run --rm tianon/speedtest`
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -6,7 +6,7 @@ export interface IConfig {
|
|||||||
command: string;
|
command: string;
|
||||||
dockerSock: boolean;
|
dockerSock: boolean;
|
||||||
exitCode?: number;
|
exitCode?: number;
|
||||||
keyValueObject: {[key: string]: any};
|
keyValueObject: any[];
|
||||||
}
|
}
|
||||||
|
|
||||||
const getQenvKeyValueObject = async () => {
|
const getQenvKeyValueObject = async () => {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user