Compare commits

...

26 Commits

Author SHA1 Message Date
f4d8656831 3.1.60 2019-09-01 14:21:30 +02:00
2290081ef0 fix(core): update 2019-09-01 14:21:30 +02:00
189d02a16f 3.1.59 2019-09-01 14:11:35 +02:00
55aee04334 fix(core): update 2019-09-01 14:11:35 +02:00
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
6c58864fcf 3.1.52 2019-09-01 13:44:22 +02:00
7ea3ac182d fix(core): update 2019-09-01 13:44:21 +02:00
8979d26005 3.1.51 2019-09-01 13:41:04 +02:00
c8876dac88 fix(core): update 2019-09-01 13:41:03 +02:00
9c8a257c2a 3.1.50 2019-08-30 18:40:00 +02:00
8b77930ece fix(core): update 2019-08-30 18:39:59 +02:00
ba672d030f 3.1.49 2019-08-30 14:51:04 +02:00
8ad7e016e7 fix(core): update 2019-08-30 14:51:03 +02:00
d843311d7b 3.1.48 2019-08-30 13:30:16 +02:00
14ef2cfa9b 3.1.47 2019-08-30 12:24:01 +02:00
648effcf86 fix(core): update 2019-08-30 12:24:00 +02:00
7 changed files with 30 additions and 31 deletions

12
package-lock.json generated
View File

@@ -1,13 +1,13 @@
{
"name": "@shipzone/npmci",
"version": "3.1.46",
"version": "3.1.60",
"lockfileVersion": 1,
"requires": true,
"dependencies": {
"@apiglobal/typedrequest": {
"version": "1.0.17",
"resolved": "https://verdaccio.lossless.one/@apiglobal%2ftypedrequest/-/typedrequest-1.0.17.tgz",
"integrity": "sha512-p19ZOROh7+dsA00N3QFHCuyeUWarxpSVZxVJBI59LPnh6JlGE3ixQYpAEi+HJbsGfIEhuOBIJ6upN+0lnjH+fg==",
"version": "1.0.24",
"resolved": "https://registry.npmjs.org/@apiglobal/typedrequest/-/typedrequest-1.0.24.tgz",
"integrity": "sha512-OjjyijgD1u4Opus3rZDKzrVcNu2HtQ+lNCjZmqLJHn5E1LKFC4ZD3BBFv/EKmmmtb3YVMAQRXd29DK8dcBlFwA==",
"requires": {
"@apiglobal/typedrequest-interfaces": "^1.0.7",
"@pushrocks/lik": "^3.0.11",
@@ -17,7 +17,7 @@
"dependencies": {
"@pushrocks/smartjson": {
"version": "3.0.8",
"resolved": "https://verdaccio.lossless.one/@pushrocks%2fsmartjson/-/smartjson-3.0.8.tgz",
"resolved": "https://registry.npmjs.org/@pushrocks/smartjson/-/smartjson-3.0.8.tgz",
"integrity": "sha512-EjC3611RSZaZmK+nXxXrYDBxdxYWtrxjOrZtQzbYn0yM33KSCH0sLIAG8B2wYZVAOj4A2pC8mVxFSJ1w3iRFHg==",
"requires": {
"@types/fast-json-stable-stringify": "^2.0.0",
@@ -29,7 +29,7 @@
},
"@apiglobal/typedrequest-interfaces": {
"version": "1.0.7",
"resolved": "https://verdaccio.lossless.one/@apiglobal%2ftypedrequest-interfaces/-/typedrequest-interfaces-1.0.7.tgz",
"resolved": "https://registry.npmjs.org/@apiglobal/typedrequest-interfaces/-/typedrequest-interfaces-1.0.7.tgz",
"integrity": "sha512-yPl0UcLFMwSQL7bK52wVjkgvadC+x2YS3+7T15V1A1dXNxa96yd4WX1fqcKqwnBrvYexq/8FaxWGi98tZ0oNwg=="
},
"@babel/code-frame": {

View File

@@ -1,6 +1,6 @@
{
"name": "@shipzone/npmci",
"version": "3.1.46",
"version": "3.1.60",
"private": false,
"description": "node and docker in gitlab ci on steroids",
"main": "dist/index.js",
@@ -9,8 +9,8 @@
"npmci": "cli.js"
},
"scripts": {
"test": "(rm -f config.json) && tstest test/",
"build": "(rm -f config.json) && tsbuild && (npm run testVersion)",
"test": "tstest test/",
"build": "tsbuild && (npm run testVersion)",
"testVersion": "(cd test/assets/ && node ../../cli.js -v)"
},
"repository": {
@@ -33,7 +33,7 @@
"tslint-config-prettier": "^1.18.0"
},
"dependencies": {
"@apiglobal/typedrequest": "^1.0.17",
"@apiglobal/typedrequest": "^1.0.24",
"@pushrocks/lik": "^3.0.11",
"@pushrocks/npmextra": "^3.0.5",
"@pushrocks/projectinfo": "^4.0.2",

View File

@@ -1,6 +1,6 @@
import * as plugins from '../npmci.plugins';
import {Npmci} from '../npmci.classes.npmci';
import { Npmci } from '../npmci.classes.npmci';
import { logger } from '../npmci.logging';
/**
@@ -13,11 +13,13 @@ export class CloudlyConnector {
this.npmciRef = npmciRefArg;
}
public async announceDockerContainer(optionsArg: plugins.servezoneInterfaces.IVersionData) {
const cloudlyUrl = this.npmciRef.npmciConfig.getConfig().urlCloudly;
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;
}
@@ -25,6 +27,6 @@ export class CloudlyConnector {
plugins.servezoneInterfaces.IRequest_Any_Cloudly_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.`
);
}
}
};
/**
* 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);
}
};
}

View File

@@ -269,11 +269,10 @@ export class Dockerfile {
);
await bash(`docker tag ${this.buildTag} ${this.pushTag}`);
await bash(`docker push ${this.pushTag}`);
console.log('you can get the digest using this command');
console.log(`docker inspect --format='{{index .RepoDigests 0}}' ${this.pushTag}`);
/* const imageDigest = (await bash(
`docker inspect --format='{{index .RepoDigests 0}}' ${pushTag}`
)).split('@')[1]; */
const imageDigest = (await bash(
`docker inspect --format="{{index .RepoDigests 0}}" ${this.pushTag}`
)).split('@')[1];
console.log(`The image ${this.pushTag} has digest ${imageDigest}`);
await this.npmciDockerManagerRef.npmciRef.cloudlyConnector.announceDockerContainer({
dockerImageUrl: this.pushTag,
dockerImageVersion: this.npmciDockerManagerRef.npmciRef.npmciConfig.getConfig().projectInfo

View File

@@ -32,7 +32,7 @@ export class NpmciGitManager {
public mirror = async () => {
const githubToken = process.env.NPMCI_GIT_GITHUBTOKEN;
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 (
this.npmciRef.npmciConfig.getConfig().projectInfo.npm.packageJson.private === true ||
this.npmciRef.npmciConfig.getConfig().npmAccessLevel === 'private'

View File

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