Compare commits

...

11 Commits

Author SHA1 Message Date
0e407b9b9d 3.1.58 2019-09-01 13:54:00 +02:00
24095bbd40 fix(core): update 2019-09-01 13:54:00 +02:00
f97ee94b5a 3.1.57 2019-09-01 13:51:12 +02:00
4cf7aea374 fix(core): update 2019-09-01 13:51:11 +02:00
6ab5e9cb30 3.1.56 2019-09-01 13:49:28 +02:00
95c1145bf5 3.1.55 2019-09-01 13:49:12 +02:00
ea04a1b788 fix(core): update 2019-09-01 13:49:11 +02:00
3bc2499d09 3.1.54 2019-09-01 13:46:03 +02:00
1f5967ac45 fix(core): update 2019-09-01 13:46:03 +02:00
fd952f086b 3.1.53 2019-09-01 13:45:19 +02:00
79500cb2c2 fix(core): update 2019-09-01 13:45:18 +02:00
7 changed files with 19 additions and 19 deletions

View File

@@ -18,6 +18,7 @@ stages:
mirror: mirror:
stage: security stage: security
script: script:
- npm install -g @shipzone/npmci
- npmci git mirror - npmci git mirror
tags: tags:
- docker - docker

2
package-lock.json generated
View File

@@ -1,6 +1,6 @@
{ {
"name": "@shipzone/npmci", "name": "@shipzone/npmci",
"version": "3.1.52", "version": "3.1.58",
"lockfileVersion": 1, "lockfileVersion": 1,
"requires": true, "requires": true,
"dependencies": { "dependencies": {

View File

@@ -1,6 +1,6 @@
{ {
"name": "@shipzone/npmci", "name": "@shipzone/npmci",
"version": "3.1.52", "version": "3.1.58",
"private": false, "private": false,
"description": "node and docker in gitlab ci on steroids", "description": "node and docker in gitlab ci on steroids",
"main": "dist/index.js", "main": "dist/index.js",

View File

@@ -13,11 +13,13 @@ export class CloudlyConnector {
this.npmciRef = npmciRefArg; this.npmciRef = npmciRefArg;
} }
public async announceDockerContainer(optionsArg: plugins.servezoneInterfaces.IVersionData) { public async announceDockerContainer(optionsArg: plugins.servezoneInterfaces.IVersionData) {
const cloudlyUrl = this.npmciRef.npmciConfig.getConfig().urlCloudly; const cloudlyUrl = this.npmciRef.npmciConfig.getConfig().urlCloudly;
if (!cloudlyUrl) { if (!cloudlyUrl) {
logger.log('warn', 'no cloudly url provided. Thus we cannot announce the newly built Dockerimage!'); logger.log(
'warn',
'no cloudly url provided. Thus we cannot announce the newly built Dockerimage!'
);
return; return;
} }
@@ -25,6 +27,6 @@ export class CloudlyConnector {
plugins.servezoneInterfaces.IRequest_Any_Cloudly_VersionManager_Update plugins.servezoneInterfaces.IRequest_Any_Cloudly_VersionManager_Update
>(`https://${cloudlyUrl}/versionmanager`, 'update'); >(`https://${cloudlyUrl}/versionmanager`, 'update');
const response = (await typedrequest.fire(optionsArg)); const response = await typedrequest.fire(optionsArg);
} }
} }

View File

@@ -50,7 +50,7 @@ export class NpmciDockerManager {
`>>npmci docker ...<< cli arguments invalid... Please read the documentation.` `>>npmci docker ...<< cli arguments invalid... Please read the documentation.`
); );
} }
} };
/** /**
* builds a cwd of Dockerfiles by triggering a promisechain * builds a cwd of Dockerfiles by triggering a promisechain
@@ -62,7 +62,7 @@ export class NpmciDockerManager {
.then(Dockerfile.sortDockerfiles) .then(Dockerfile.sortDockerfiles)
.then(Dockerfile.mapDockerfiles) .then(Dockerfile.mapDockerfiles)
.then(Dockerfile.buildDockerfiles); .then(Dockerfile.buildDockerfiles);
} };
/** /**
* login to the DockerRegistries * login to the DockerRegistries
@@ -70,7 +70,7 @@ export class NpmciDockerManager {
public login = async () => { public login = async () => {
await this.prepare(); await this.prepare();
await this.npmciRegistryStorage.loginAll(); await this.npmciRegistryStorage.loginAll();
} };
/** /**
* logs in docker * logs in docker
@@ -98,7 +98,7 @@ export class NpmciDockerManager {
} }
); );
return; return;
} };
/** /**
* pushes an image towards a registry * pushes an image towards a registry
@@ -146,7 +146,7 @@ export class NpmciDockerManager {
await dockerfile.push(dockerRegistryToPushTo, suffix); await dockerfile.push(dockerRegistryToPushTo, suffix);
} }
} }
} };
/** /**
* pulls an image * pulls an image
@@ -165,7 +165,7 @@ export class NpmciDockerManager {
for (const dockerfile of dockerfileArray) { for (const dockerfile of dockerfileArray) {
await dockerfile.pull(localDockerRegistry, suffix); await dockerfile.pull(localDockerRegistry, suffix);
} }
} };
/** /**
* tests docker files * tests docker files
@@ -173,5 +173,5 @@ export class NpmciDockerManager {
public test = async () => { public test = async () => {
await this.prepare(); await this.prepare();
return await Dockerfile.readDockerfiles(this).then(Dockerfile.testDockerfiles); return await Dockerfile.readDockerfiles(this).then(Dockerfile.testDockerfiles);
} };
} }

View File

@@ -32,7 +32,7 @@ export class NpmciGitManager {
public mirror = async () => { public mirror = async () => {
const githubToken = process.env.NPMCI_GIT_GITHUBTOKEN; const githubToken = process.env.NPMCI_GIT_GITHUBTOKEN;
const githubUser = process.env.NPMCI_GIT_GITHUBGROUP || this.npmciRef.npmciEnv.repo.user; const githubUser = process.env.NPMCI_GIT_GITHUBGROUP || this.npmciRef.npmciEnv.repo.user;
const githubRepo = process.env.NPMCI_GIT_GITHUB || this.npmciRef.npmciEnv.repo; const githubRepo = process.env.NPMCI_GIT_GITHUB || this.npmciRef.npmciEnv.repo.repo;
if ( if (
this.npmciRef.npmciConfig.getConfig().projectInfo.npm.packageJson.private === true || this.npmciRef.npmciConfig.getConfig().projectInfo.npm.packageJson.private === true ||
this.npmciRef.npmciConfig.getConfig().npmAccessLevel === 'private' this.npmciRef.npmciConfig.getConfig().npmAccessLevel === 'private'
@@ -50,7 +50,6 @@ export class NpmciGitManager {
// plugins.smartgit.GitRepo; // plugins.smartgit.GitRepo;
// add the mirror // add the mirror
console.log(`git remote add mirror https://${githubToken}@github.com/${githubUser}/${githubRepo}.git`);
await bash( await bash(
`git remote add mirror https://${githubToken}@github.com/${githubUser}/${githubRepo}.git` `git remote add mirror https://${githubToken}@github.com/${githubUser}/${githubRepo}.git`
); );

View File

@@ -6,9 +6,7 @@ export { path };
// @apiglobal // @apiglobal
import * as typedrequest from '@apiglobal/typedrequest'; import * as typedrequest from '@apiglobal/typedrequest';
export { export { typedrequest };
typedrequest
};
// @servezone // @servezone
import * as servezoneInterfaces from '@servezone/servezone-interfaces'; import * as servezoneInterfaces from '@servezone/servezone-interfaces';