diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index a6159b7..1e3250b 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,7 +1,5 @@ # gitzone ci_default image: registry.gitlab.com/hosttoday/ht-docker-node:npmci -variables: - GIT_STRATEGY: clone cache: paths: @@ -102,7 +100,7 @@ trigger: pages: image: hosttoday/ht-docker-dbase:npmci services: - - docker:18-dind + - docker:stable-dind stage: metadata script: - npmci command npm install -g @gitzone/tsdoc diff --git a/package.json b/package.json index a53daae..b6f4924 100644 --- a/package.json +++ b/package.json @@ -67,4 +67,4 @@ "npmextra.json", "readme.md" ] -} +} \ No newline at end of file diff --git a/test/test.ts b/test/test.ts index 257540d..510521d 100644 --- a/test/test.ts +++ b/test/test.ts @@ -29,28 +29,34 @@ let sortableArray: npmci.Dockerfile[]; tap.test('should return valid Dockerfiles', async () => { const npmciInstance = new npmci.Npmci(); - dockerfile1 = new npmci.Dockerfile(npmciInstance.dockerManager, { filePath: './Dockerfile', read: true }); - dockerfile2 = new npmci.Dockerfile(npmciInstance.dockerManager, { filePath: './Dockerfile_sometag1', read: true }); + dockerfile1 = new npmci.Dockerfile(npmciInstance.dockerManager, { + filePath: './Dockerfile', + read: true + }); + dockerfile2 = new npmci.Dockerfile(npmciInstance.dockerManager, { + filePath: './Dockerfile_sometag1', + read: true + }); expect(dockerfile1.version).to.equal('latest'); return expect(dockerfile2.version).to.equal('sometag1'); }); tap.test('should read a directory of Dockerfiles', async () => { const npmciInstance = new npmci.Npmci(); - return npmci.Dockerfile - .readDockerfiles(npmciInstance.dockerManager) - .then(async (readDockerfilesArrayArg: npmci.Dockerfile[]) => { + return npmci.Dockerfile.readDockerfiles(npmciInstance.dockerManager).then( + async (readDockerfilesArrayArg: npmci.Dockerfile[]) => { sortableArray = readDockerfilesArrayArg; return expect(readDockerfilesArrayArg[1].version).to.equal('sometag1'); - }); + } + ); }); tap.test('should sort an array of Dockerfiles', async () => { - return npmci.Dockerfile - .sortDockerfiles(sortableArray) - .then(async (sortedArrayArg: npmci.Dockerfile[]) => { + return npmci.Dockerfile.sortDockerfiles(sortableArray).then( + async (sortedArrayArg: npmci.Dockerfile[]) => { console.log(sortedArrayArg); - }); + } + ); }); tap.test('should build all Dockerfiles', async () => { diff --git a/ts/connector.cloudly/cloudlyconnector.ts b/ts/connector.cloudly/cloudlyconnector.ts index ea4f00e..df75063 100644 --- a/ts/connector.cloudly/cloudlyconnector.ts +++ b/ts/connector.cloudly/cloudlyconnector.ts @@ -1,8 +1,8 @@ import * as plugins from '../npmci.plugins'; /** - * + * */ export class CloudlyConnector { - -} \ No newline at end of file + public announceDockerContainer(options: plugins.servezoneInterfaces.IVersionData) {} +} diff --git a/ts/manager.docker/index.ts b/ts/manager.docker/index.ts index 14edc7f..5fb668c 100644 --- a/ts/manager.docker/index.ts +++ b/ts/manager.docker/index.ts @@ -50,7 +50,7 @@ export class NpmciDockerManager { `>>npmci docker ...<< cli arguments invalid... Please read the documentation.` ); } - } + }; /** * builds a cwd of Dockerfiles by triggering a promisechain @@ -62,7 +62,7 @@ export class NpmciDockerManager { .then(Dockerfile.sortDockerfiles) .then(Dockerfile.mapDockerfiles) .then(Dockerfile.buildDockerfiles); - } + }; /** * login to the DockerRegistries @@ -70,7 +70,7 @@ export class NpmciDockerManager { public login = async () => { await this.prepare(); await this.npmciRegistryStorage.loginAll(); - } + }; /** * logs in docker @@ -98,7 +98,7 @@ export class NpmciDockerManager { } ); return; - } + }; /** * pushes an image towards a registry @@ -146,7 +146,7 @@ export class NpmciDockerManager { await dockerfile.push(dockerRegistryToPushTo, suffix); } } - } + }; /** * pulls an image @@ -165,7 +165,7 @@ export class NpmciDockerManager { for (const dockerfile of dockerfileArray) { await dockerfile.pull(localDockerRegistry, suffix); } - } + }; /** * tests docker files @@ -173,5 +173,5 @@ export class NpmciDockerManager { public test = async () => { await this.prepare(); return await Dockerfile.readDockerfiles(this).then(Dockerfile.testDockerfiles); - } + }; } diff --git a/ts/manager.docker/mod.helpers.ts b/ts/manager.docker/mod.helpers.ts index 823851f..6c879db 100644 --- a/ts/manager.docker/mod.helpers.ts +++ b/ts/manager.docker/mod.helpers.ts @@ -3,4 +3,3 @@ import * as plugins from './mod.plugins'; import * as paths from '../npmci.paths'; import { Dockerfile } from './mod.classes.dockerfile'; - diff --git a/ts/manager.git/index.ts b/ts/manager.git/index.ts index a524a41..ac36180 100644 --- a/ts/manager.git/index.ts +++ b/ts/manager.git/index.ts @@ -27,7 +27,7 @@ export class NpmciGitManager { } else { logger.log('info', `npmci git -> cli arguments invalid! Please read the documentation.`); } - } + }; public mirror = async () => { const githubToken = process.env.NPMCI_GIT_GITHUBTOKEN; @@ -46,9 +46,9 @@ export class NpmciGitManager { if (githubToken) { logger.log('info', 'found github token.'); logger.log('info', 'attempting the mirror the repository to GitHub'); - + // plugins.smartgit.GitRepo; - + // add the mirror await bash( `git remote add mirror https://${githubToken}@github.com/${githubUser}/${githubRepo}.git` @@ -61,5 +61,5 @@ export class NpmciGitManager { logger.log('error', `cannot find NPMCI_GIT_GITHUBTOKEN env var!`); process.exit(1); } - } + }; } diff --git a/ts/npmci.classes.npmci.ts b/ts/npmci.classes.npmci.ts index 7e77a08..883212b 100644 --- a/ts/npmci.classes.npmci.ts +++ b/ts/npmci.classes.npmci.ts @@ -52,4 +52,4 @@ export class Npmci { await this.npmciConfig.init(); this.npmciCli.startParse(); } -} \ No newline at end of file +} diff --git a/ts/npmci.classes.npmcicli.ts b/ts/npmci.classes.npmcicli.ts index 7db03dc..85da5d8 100644 --- a/ts/npmci.classes.npmcicli.ts +++ b/ts/npmci.classes.npmcicli.ts @@ -106,5 +106,5 @@ export class NpmciCli { public startParse = () => { this.smartcli.startParse(); - } + }; } diff --git a/ts/npmci.classes.npmciconfig.ts b/ts/npmci.classes.npmciconfig.ts index 41f3c25..858f20a 100644 --- a/ts/npmci.classes.npmciconfig.ts +++ b/ts/npmci.classes.npmciconfig.ts @@ -51,7 +51,7 @@ export class NpmciConfig { logger ); - this.configObject = { + this.configObject = { projectInfo: new plugins.projectinfo.ProjectInfo(paths.cwd), npmGlobalTools: [], dockerRegistries: [], diff --git a/ts/npmci.classes.npmciinfo.ts b/ts/npmci.classes.npmciinfo.ts index f2a638d..842fab4 100644 --- a/ts/npmci.classes.npmciinfo.ts +++ b/ts/npmci.classes.npmciinfo.ts @@ -1,10 +1,9 @@ import * as plugins from './npmci.plugins'; import * as paths from './npmci.paths'; -import { logger } from "./npmci.logging"; +import { logger } from './npmci.logging'; import { Npmci } from './npmci.classes.npmci'; export class NpmciInfo { - public npmciRef: Npmci; public projectInfo = new plugins.projectinfo.ProjectinfoNpm(paths.NpmciPackageRoot); @@ -12,7 +11,7 @@ export class NpmciInfo { this.npmciRef = npmciArg; } - public printToConsole () { + public printToConsole() { logger.log('info', `npmci version: ${this.projectInfo.version}`); } -} \ No newline at end of file +} diff --git a/ts/npmci.plugins.ts b/ts/npmci.plugins.ts index 5240c5b..36bb59d 100644 --- a/ts/npmci.plugins.ts +++ b/ts/npmci.plugins.ts @@ -6,9 +6,7 @@ export { path }; // @servezone import * as servezoneInterfaces from '@servezone/servezone-interfaces'; -export { - servezoneInterfaces -}; +export { servezoneInterfaces }; // @pushrocks import * as npmextra from '@pushrocks/npmextra';