Compare commits
	
		
			28 Commits
		
	
	
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
| f4d8656831 | |||
| 2290081ef0 | |||
| 189d02a16f | |||
| 55aee04334 | |||
| 0e407b9b9d | |||
| 24095bbd40 | |||
| f97ee94b5a | |||
| 4cf7aea374 | |||
| 6ab5e9cb30 | |||
| 95c1145bf5 | |||
| ea04a1b788 | |||
| 3bc2499d09 | |||
| 1f5967ac45 | |||
| fd952f086b | |||
| 79500cb2c2 | |||
| 6c58864fcf | |||
| 7ea3ac182d | |||
| 8979d26005 | |||
| c8876dac88 | |||
| 9c8a257c2a | |||
| 8b77930ece | |||
| ba672d030f | |||
| 8ad7e016e7 | |||
| d843311d7b | |||
| 14ef2cfa9b | |||
| 648effcf86 | |||
| 572738e88f | |||
| 129ae93044 | 
							
								
								
									
										36
									
								
								package-lock.json
									
									
									
										generated
									
									
									
								
							
							
						
						
									
										36
									
								
								package-lock.json
									
									
									
										generated
									
									
									
								
							| @@ -1,13 +1,13 @@ | |||||||
| { | { | ||||||
|   "name": "@shipzone/npmci", |   "name": "@shipzone/npmci", | ||||||
|   "version": "3.1.45", |   "version": "3.1.60", | ||||||
|   "lockfileVersion": 1, |   "lockfileVersion": 1, | ||||||
|   "requires": true, |   "requires": true, | ||||||
|   "dependencies": { |   "dependencies": { | ||||||
|     "@apiglobal/typedrequest": { |     "@apiglobal/typedrequest": { | ||||||
|       "version": "1.0.17", |       "version": "1.0.24", | ||||||
|       "resolved": "https://verdaccio.lossless.one/@apiglobal%2ftypedrequest/-/typedrequest-1.0.17.tgz", |       "resolved": "https://registry.npmjs.org/@apiglobal/typedrequest/-/typedrequest-1.0.24.tgz", | ||||||
|       "integrity": "sha512-p19ZOROh7+dsA00N3QFHCuyeUWarxpSVZxVJBI59LPnh6JlGE3ixQYpAEi+HJbsGfIEhuOBIJ6upN+0lnjH+fg==", |       "integrity": "sha512-OjjyijgD1u4Opus3rZDKzrVcNu2HtQ+lNCjZmqLJHn5E1LKFC4ZD3BBFv/EKmmmtb3YVMAQRXd29DK8dcBlFwA==", | ||||||
|       "requires": { |       "requires": { | ||||||
|         "@apiglobal/typedrequest-interfaces": "^1.0.7", |         "@apiglobal/typedrequest-interfaces": "^1.0.7", | ||||||
|         "@pushrocks/lik": "^3.0.11", |         "@pushrocks/lik": "^3.0.11", | ||||||
| @@ -17,7 +17,7 @@ | |||||||
|       "dependencies": { |       "dependencies": { | ||||||
|         "@pushrocks/smartjson": { |         "@pushrocks/smartjson": { | ||||||
|           "version": "3.0.8", |           "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==", |           "integrity": "sha512-EjC3611RSZaZmK+nXxXrYDBxdxYWtrxjOrZtQzbYn0yM33KSCH0sLIAG8B2wYZVAOj4A2pC8mVxFSJ1w3iRFHg==", | ||||||
|           "requires": { |           "requires": { | ||||||
|             "@types/fast-json-stable-stringify": "^2.0.0", |             "@types/fast-json-stable-stringify": "^2.0.0", | ||||||
| @@ -29,7 +29,7 @@ | |||||||
|     }, |     }, | ||||||
|     "@apiglobal/typedrequest-interfaces": { |     "@apiglobal/typedrequest-interfaces": { | ||||||
|       "version": "1.0.7", |       "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==" |       "integrity": "sha512-yPl0UcLFMwSQL7bK52wVjkgvadC+x2YS3+7T15V1A1dXNxa96yd4WX1fqcKqwnBrvYexq/8FaxWGi98tZ0oNwg==" | ||||||
|     }, |     }, | ||||||
|     "@babel/code-frame": { |     "@babel/code-frame": { | ||||||
| @@ -180,9 +180,9 @@ | |||||||
|       } |       } | ||||||
|     }, |     }, | ||||||
|     "@pushrocks/qenv": { |     "@pushrocks/qenv": { | ||||||
|       "version": "4.0.2", |       "version": "4.0.4", | ||||||
|       "resolved": "https://verdaccio.lossless.one/@pushrocks%2fqenv/-/qenv-4.0.2.tgz", |       "resolved": "https://verdaccio.lossless.one/@pushrocks%2fqenv/-/qenv-4.0.4.tgz", | ||||||
|       "integrity": "sha512-ip/yN8etdy4lOTeNjU7dyKB8oN9eEZG3P/DhFYXDAgqEo0oDUUckEjGZadTLhjLw4wb/oQZqrZ/RjXwlCrBciQ==", |       "integrity": "sha512-nvgiY3u25mvi5wmVbEYfCDuBaz6pogwzKPxGaohMrIcNn/0MlXZ+JvkVHWK6CxExklSDbjSXsD7zfvme4GGA0g==", | ||||||
|       "requires": { |       "requires": { | ||||||
|         "@pushrocks/smartfile": "^7.0.4", |         "@pushrocks/smartfile": "^7.0.4", | ||||||
|         "@pushrocks/smartlog": "^2.0.19" |         "@pushrocks/smartlog": "^2.0.19" | ||||||
| @@ -433,9 +433,9 @@ | |||||||
|       } |       } | ||||||
|     }, |     }, | ||||||
|     "@pushrocks/smartshell": { |     "@pushrocks/smartshell": { | ||||||
|       "version": "2.0.23", |       "version": "2.0.25", | ||||||
|       "resolved": "https://verdaccio.lossless.one/@pushrocks%2fsmartshell/-/smartshell-2.0.23.tgz", |       "resolved": "https://verdaccio.lossless.one/@pushrocks%2fsmartshell/-/smartshell-2.0.25.tgz", | ||||||
|       "integrity": "sha512-+YXacX/sp4f+iBYm4vAoxrq/c8WCHnFhMaW66l3R08stl0eezW3SytoSlnr6R+JT1xqnBzIItDfCyyRC3uEVnw==", |       "integrity": "sha512-sYVHOhBRdr+CkjS+o1SDtB5058ZYxTPAYuexx2ydl2g+57KNdEcSRWN/2mOv5+NFH+tvvgtnUjC3AclC9CwJ4A==", | ||||||
|       "requires": { |       "requires": { | ||||||
|         "@pushrocks/smartdelay": "^2.0.3", |         "@pushrocks/smartdelay": "^2.0.3", | ||||||
|         "@pushrocks/smartexit": "^1.0.15", |         "@pushrocks/smartexit": "^1.0.15", | ||||||
| @@ -557,9 +557,9 @@ | |||||||
|       } |       } | ||||||
|     }, |     }, | ||||||
|     "@servezone/servezone-interfaces": { |     "@servezone/servezone-interfaces": { | ||||||
|       "version": "2.0.28", |       "version": "2.0.29", | ||||||
|       "resolved": "https://verdaccio.lossless.one/@servezone%2fservezone-interfaces/-/servezone-interfaces-2.0.28.tgz", |       "resolved": "https://verdaccio.lossless.one/@servezone%2fservezone-interfaces/-/servezone-interfaces-2.0.29.tgz", | ||||||
|       "integrity": "sha512-mlXiiLhA8PF+sXczLzuGJSz0iPxdEDkU+hiR/Tw/QfCniLeHdJFgRW8RIJYAV2jhy0JMpHINP5Nqke0tt1lK1Q==" |       "integrity": "sha512-alXB2SFD+3tVxfC0Kd8NrHlr4WyB1hSg60ydHUvzJB30fUMKMX71UlWrITxORg8UXQQy1Kw9rhFhCXnq31xxSA==" | ||||||
|     }, |     }, | ||||||
|     "@types/body-parser": { |     "@types/body-parser": { | ||||||
|       "version": "1.17.1", |       "version": "1.17.1", | ||||||
| @@ -707,9 +707,9 @@ | |||||||
|       "integrity": "sha512-tHq6qdbT9U1IRSGf14CL0pUlULksvY9OZ+5eEgl1N7t+OA3tGvNpxJCzuKQlsNgCVwbAs670L1vcVQi8j9HjnA==" |       "integrity": "sha512-tHq6qdbT9U1IRSGf14CL0pUlULksvY9OZ+5eEgl1N7t+OA3tGvNpxJCzuKQlsNgCVwbAs670L1vcVQi8j9HjnA==" | ||||||
|     }, |     }, | ||||||
|     "@types/node": { |     "@types/node": { | ||||||
|       "version": "12.7.2", |       "version": "12.7.3", | ||||||
|       "resolved": "https://verdaccio.lossless.one/@types%2fnode/-/node-12.7.2.tgz", |       "resolved": "https://verdaccio.lossless.one/@types%2fnode/-/node-12.7.3.tgz", | ||||||
|       "integrity": "sha512-dyYO+f6ihZEtNPDcWNR1fkoTDf3zAK3lAABDze3mz6POyIercH0lEUawUFXlG8xaQZmm1yEBON/4TsYv/laDYg==" |       "integrity": "sha512-3SiLAIBkDWDg6vFo0+5YJyHPWU9uwu40Qe+v+0MH8wRKYBimHvvAOyk3EzMrD/TrIlLYfXrqDqrg913PynrMJQ==" | ||||||
|     }, |     }, | ||||||
|     "@types/nodegit": { |     "@types/nodegit": { | ||||||
|       "version": "0.24.10", |       "version": "0.24.10", | ||||||
|   | |||||||
							
								
								
									
										16
									
								
								package.json
									
									
									
									
									
								
							
							
						
						
									
										16
									
								
								package.json
									
									
									
									
									
								
							| @@ -1,6 +1,6 @@ | |||||||
| { | { | ||||||
|   "name": "@shipzone/npmci", |   "name": "@shipzone/npmci", | ||||||
|   "version": "3.1.45", |   "version": "3.1.60", | ||||||
|   "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", | ||||||
| @@ -9,8 +9,8 @@ | |||||||
|     "npmci": "cli.js" |     "npmci": "cli.js" | ||||||
|   }, |   }, | ||||||
|   "scripts": { |   "scripts": { | ||||||
|     "test": "(rm -f config.json) && tstest test/", |     "test": "tstest test/", | ||||||
|     "build": "(rm -f config.json) && tsbuild && (npm run testVersion)", |     "build": "tsbuild && (npm run testVersion)", | ||||||
|     "testVersion": "(cd test/assets/ && node ../../cli.js -v)" |     "testVersion": "(cd test/assets/ && node ../../cli.js -v)" | ||||||
|   }, |   }, | ||||||
|   "repository": { |   "repository": { | ||||||
| @@ -28,16 +28,16 @@ | |||||||
|     "@gitzone/tsrun": "^1.2.6", |     "@gitzone/tsrun": "^1.2.6", | ||||||
|     "@gitzone/tstest": "^1.0.24", |     "@gitzone/tstest": "^1.0.24", | ||||||
|     "@pushrocks/tapbundle": "^3.0.13", |     "@pushrocks/tapbundle": "^3.0.13", | ||||||
|     "@types/node": "^12.7.2", |     "@types/node": "^12.7.3", | ||||||
|     "tslint": "^5.19.0", |     "tslint": "^5.19.0", | ||||||
|     "tslint-config-prettier": "^1.18.0" |     "tslint-config-prettier": "^1.18.0" | ||||||
|   }, |   }, | ||||||
|   "dependencies": { |   "dependencies": { | ||||||
|     "@apiglobal/typedrequest": "^1.0.17", |     "@apiglobal/typedrequest": "^1.0.24", | ||||||
|     "@pushrocks/lik": "^3.0.11", |     "@pushrocks/lik": "^3.0.11", | ||||||
|     "@pushrocks/npmextra": "^3.0.5", |     "@pushrocks/npmextra": "^3.0.5", | ||||||
|     "@pushrocks/projectinfo": "^4.0.2", |     "@pushrocks/projectinfo": "^4.0.2", | ||||||
|     "@pushrocks/qenv": "^4.0.2", |     "@pushrocks/qenv": "^4.0.4", | ||||||
|     "@pushrocks/smartanalytics": "^2.0.15", |     "@pushrocks/smartanalytics": "^2.0.15", | ||||||
|     "@pushrocks/smartcli": "^3.0.7", |     "@pushrocks/smartcli": "^3.0.7", | ||||||
|     "@pushrocks/smartdelay": "^2.0.3", |     "@pushrocks/smartdelay": "^2.0.3", | ||||||
| @@ -48,11 +48,11 @@ | |||||||
|     "@pushrocks/smartparam": "^1.0.4", |     "@pushrocks/smartparam": "^1.0.4", | ||||||
|     "@pushrocks/smartpromise": "^3.0.2", |     "@pushrocks/smartpromise": "^3.0.2", | ||||||
|     "@pushrocks/smartrequest": "^1.1.23", |     "@pushrocks/smartrequest": "^1.1.23", | ||||||
|     "@pushrocks/smartshell": "^2.0.23", |     "@pushrocks/smartshell": "^2.0.25", | ||||||
|     "@pushrocks/smartsocket": "^1.1.45", |     "@pushrocks/smartsocket": "^1.1.45", | ||||||
|     "@pushrocks/smartssh": "^1.2.3", |     "@pushrocks/smartssh": "^1.2.3", | ||||||
|     "@pushrocks/smartstring": "^3.0.10", |     "@pushrocks/smartstring": "^3.0.10", | ||||||
|     "@servezone/servezone-interfaces": "^2.0.28", |     "@servezone/servezone-interfaces": "^2.0.29", | ||||||
|     "@types/shelljs": "^0.8.5", |     "@types/shelljs": "^0.8.5", | ||||||
|     "@types/through2": "^2.0.34", |     "@types/through2": "^2.0.34", | ||||||
|     "through2": "^3.0.1" |     "through2": "^3.0.1" | ||||||
|   | |||||||
| @@ -1,6 +1,6 @@ | |||||||
| import * as plugins from '../npmci.plugins'; | import * as plugins from '../npmci.plugins'; | ||||||
|  |  | ||||||
| import {Npmci} from '../npmci.classes.npmci'; | import { Npmci } from '../npmci.classes.npmci'; | ||||||
| import { logger } from '../npmci.logging'; | import { logger } from '../npmci.logging'; | ||||||
|  |  | ||||||
| /** | /** | ||||||
| @@ -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); | ||||||
|   } |   } | ||||||
| } | } | ||||||
|   | |||||||
| @@ -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); | ||||||
|   } |   }; | ||||||
| } | } | ||||||
|   | |||||||
| @@ -269,11 +269,10 @@ export class Dockerfile { | |||||||
|     ); |     ); | ||||||
|     await bash(`docker tag ${this.buildTag} ${this.pushTag}`); |     await bash(`docker tag ${this.buildTag} ${this.pushTag}`); | ||||||
|     await bash(`docker push ${this.pushTag}`); |     await bash(`docker push ${this.pushTag}`); | ||||||
|     console.log('you can get the digest using this command'); |     const imageDigest = (await bash( | ||||||
|     console.log(`docker inspect --format='{{index .RepoDigests 0}}' ${this.pushTag}`); |       `docker inspect --format="{{index .RepoDigests 0}}" ${this.pushTag}` | ||||||
|     /* const imageDigest = (await bash( |     )).split('@')[1]; | ||||||
|       `docker inspect --format='{{index .RepoDigests 0}}' ${pushTag}` |     console.log(`The image ${this.pushTag} has digest ${imageDigest}`); | ||||||
|     )).split('@')[1]; */ |  | ||||||
|     await this.npmciDockerManagerRef.npmciRef.cloudlyConnector.announceDockerContainer({ |     await this.npmciDockerManagerRef.npmciRef.cloudlyConnector.announceDockerContainer({ | ||||||
|       dockerImageUrl: this.pushTag, |       dockerImageUrl: this.pushTag, | ||||||
|       dockerImageVersion: this.npmciDockerManagerRef.npmciRef.npmciConfig.getConfig().projectInfo |       dockerImageVersion: this.npmciDockerManagerRef.npmciRef.npmciConfig.getConfig().projectInfo | ||||||
|   | |||||||
| @@ -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' | ||||||
|   | |||||||
| @@ -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'; | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user