Compare commits
	
		
			12 Commits
		
	
	
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
| 7ba7dc54a1 | |||
| 4f98eeec2a | |||
| 419a6b9e5f | |||
| 9c040c34f5 | |||
| 50d3f2d795 | |||
| 305856b9e1 | |||
| 3683743f3c | |||
| 41237e0e5f | |||
| bce84a0e74 | |||
| 79bed919d8 | |||
| 4b202ce00e | |||
| 16ca787314 | 
| @@ -12,10 +12,10 @@ | |||||||
|     "projectType": "npm", |     "projectType": "npm", | ||||||
|     "module": { |     "module": { | ||||||
|       "githost": "gitlab.com", |       "githost": "gitlab.com", | ||||||
|       "gitscope": "shipzone", |       "gitscope": "ship.zone", | ||||||
|       "gitrepo": "npmci", |       "gitrepo": "npmci", | ||||||
|       "description": "node and docker in gitlab ci on steroids", |       "description": "node and docker in gitlab ci on steroids", | ||||||
|       "npmPackagename": "@shipzone/npmci", |       "npmPackagename": "@ship.zone/npmci", | ||||||
|       "license": "MIT" |       "license": "MIT" | ||||||
|     } |     } | ||||||
|   } |   } | ||||||
|   | |||||||
							
								
								
									
										52
									
								
								package.json
									
									
									
									
									
								
							
							
						
						
									
										52
									
								
								package.json
									
									
									
									
									
								
							| @@ -1,6 +1,6 @@ | |||||||
| { | { | ||||||
|   "name": "@shipzone/npmci", |   "name": "@shipzone/npmci", | ||||||
|   "version": "4.1.18", |   "version": "4.1.24", | ||||||
|   "private": false, |   "private": false, | ||||||
|   "description": "node and docker in gitlab ci on steroids", |   "description": "node and docker in gitlab ci on steroids", | ||||||
|   "main": "dist_ts/index.js", |   "main": "dist_ts/index.js", | ||||||
| @@ -27,33 +27,33 @@ | |||||||
|   "homepage": "https://gitlab.com/gitzone/npmci#README", |   "homepage": "https://gitlab.com/gitzone/npmci#README", | ||||||
|   "devDependencies": { |   "devDependencies": { | ||||||
|     "@gitzone/tsbuild": "^2.1.66", |     "@gitzone/tsbuild": "^2.1.66", | ||||||
|     "@gitzone/tsrun": "^1.2.42", |     "@gitzone/tsrun": "^1.2.44", | ||||||
|     "@gitzone/tstest": "^1.0.74", |     "@gitzone/tstest": "^1.0.77", | ||||||
|     "@pushrocks/tapbundle": "^5.0.8", |     "@push.rocks/tapbundle": "^5.0.12", | ||||||
|     "@types/node": "^20.3.1" |     "@types/node": "^20.4.2" | ||||||
|   }, |   }, | ||||||
|   "dependencies": { |   "dependencies": { | ||||||
|     "@apiglobal/typedrequest": "^2.0.12", |     "@api.global/typedrequest": "^3.0.1", | ||||||
|     "@pushrocks/lik": "^6.0.2", |     "@push.rocks/lik": "^6.0.3", | ||||||
|     "@pushrocks/npmextra": "^3.0.9", |     "@push.rocks/npmextra": "^3.0.9", | ||||||
|     "@pushrocks/projectinfo": "^5.0.1", |     "@push.rocks/projectinfo": "^5.0.1", | ||||||
|     "@pushrocks/qenv": "^5.0.2", |     "@push.rocks/qenv": "^5.0.2", | ||||||
|     "@pushrocks/smartanalytics": "^2.0.15", |     "@push.rocks/smartanalytics": "^2.0.15", | ||||||
|     "@pushrocks/smartcli": "^4.0.6", |     "@push.rocks/smartcli": "^4.0.6", | ||||||
|     "@pushrocks/smartdelay": "^3.0.1", |     "@push.rocks/smartdelay": "^3.0.5", | ||||||
|     "@pushrocks/smartenv": "^5.0.5", |     "@push.rocks/smartenv": "^5.0.5", | ||||||
|     "@pushrocks/smartfile": "^10.0.25", |     "@push.rocks/smartfile": "^10.0.28", | ||||||
|     "@pushrocks/smartgit": "^3.0.0", |     "@push.rocks/smartgit": "^3.0.0", | ||||||
|     "@pushrocks/smartlog": "^3.0.2", |     "@push.rocks/smartlog": "^3.0.3", | ||||||
|     "@pushrocks/smartlog-destination-local": "^9.0.0", |     "@push.rocks/smartlog-destination-local": "^9.0.0", | ||||||
|     "@pushrocks/smartparam": "^1.1.6", |     "@push.rocks/smartobject": "^1.0.12", | ||||||
|     "@pushrocks/smartpath": "^5.0.5", |     "@push.rocks/smartpath": "^5.0.11", | ||||||
|     "@pushrocks/smartpromise": "^4.0.2", |     "@push.rocks/smartpromise": "^4.0.2", | ||||||
|     "@pushrocks/smartrequest": "^2.0.15", |     "@push.rocks/smartrequest": "^2.0.18", | ||||||
|     "@pushrocks/smartshell": "^3.0.3", |     "@push.rocks/smartshell": "^3.0.3", | ||||||
|     "@pushrocks/smartsocket": "^2.0.19", |     "@push.rocks/smartsocket": "^2.0.19", | ||||||
|     "@pushrocks/smartssh": "^2.0.0", |     "@push.rocks/smartssh": "^2.0.0", | ||||||
|     "@pushrocks/smartstring": "^4.0.7", |     "@push.rocks/smartstring": "^4.0.7", | ||||||
|     "@servezone/interfaces": "^1.0.3", |     "@servezone/interfaces": "^1.0.3", | ||||||
|     "@tsclass/tsclass": "^4.0.42", |     "@tsclass/tsclass": "^4.0.42", | ||||||
|     "@types/through2": "^2.0.38", |     "@types/through2": "^2.0.38", | ||||||
|   | |||||||
							
								
								
									
										1084
									
								
								pnpm-lock.yaml
									
									
									
										generated
									
									
									
								
							
							
						
						
									
										1084
									
								
								pnpm-lock.yaml
									
									
									
										generated
									
									
									
								
							
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							| @@ -1,5 +1,5 @@ | |||||||
| process.env['NODE_TLS_REJECT_UNAUTHORIZED'] = '0'; | process.env['NODE_TLS_REJECT_UNAUTHORIZED'] = '0'; | ||||||
| import { tap, expect } from '@pushrocks/tapbundle'; | import { tap, expect } from '@push.rocks/tapbundle'; | ||||||
|  |  | ||||||
| import * as cloudlyConnectorMod from '../ts/connector.cloudly/cloudlyconnector.js'; | import * as cloudlyConnectorMod from '../ts/connector.cloudly/cloudlyconnector.js'; | ||||||
|  |  | ||||||
|   | |||||||
| @@ -1,6 +1,6 @@ | |||||||
| import { tap, expect } from '@pushrocks/tapbundle'; | import { tap, expect } from '@push.rocks/tapbundle'; | ||||||
| import * as path from 'path'; | import * as path from 'path'; | ||||||
| import * as smartpath from '@pushrocks/smartpath'; | import * as smartpath from '@push.rocks/smartpath'; | ||||||
|  |  | ||||||
| process.env.NPMTS_TEST = 'true'; | process.env.NPMTS_TEST = 'true'; | ||||||
| process.env.NPMCI_URL_CLOUDLY = 'localhost'; | process.env.NPMCI_URL_CLOUDLY = 'localhost'; | ||||||
|   | |||||||
| @@ -3,6 +3,6 @@ | |||||||
|  */ |  */ | ||||||
| export const commitinfo = { | export const commitinfo = { | ||||||
|   name: '@shipzone/npmci', |   name: '@shipzone/npmci', | ||||||
|   version: '4.1.18', |   version: '4.1.24', | ||||||
|   description: 'node and docker in gitlab ci on steroids' |   description: 'node and docker in gitlab ci on steroids' | ||||||
| } | } | ||||||
|   | |||||||
| @@ -48,8 +48,7 @@ export class NpmciCloudronManager { | |||||||
|     logger.log('ok', 'CloudronManifest prepared'); |     logger.log('ok', 'CloudronManifest prepared'); | ||||||
|  |  | ||||||
|     // lets figure out the docker image tag |     // lets figure out the docker image tag | ||||||
|     const dockerfiles = await this.npmciRef.dockerManager.getDockerfiles(); |     const dockerImageTag = await this.npmciRef.npmciConfig.kvStorage.readKey('latestPushedDockerTag'); | ||||||
|     const dockerImageTag = dockerfiles[0].pushTag; |  | ||||||
|     const appName = this.npmciRef.npmciConfig.getConfig().cloudronAppName; |     const appName = this.npmciRef.npmciConfig.getConfig().cloudronAppName; | ||||||
|      |      | ||||||
|     const cloudronEnvVar = process.env.NPMCI_LOGIN_CLOUDRON; |     const cloudronEnvVar = process.env.NPMCI_LOGIN_CLOUDRON; | ||||||
|   | |||||||
| @@ -93,7 +93,7 @@ export class NpmciDockerManager { | |||||||
|     } |     } | ||||||
|  |  | ||||||
|     // handle registries |     // handle registries | ||||||
|     await plugins.smartparam.forEachMinimatch( |     await plugins.smartobject.forEachMinimatch( | ||||||
|       process.env, |       process.env, | ||||||
|       'NPMCI_LOGIN_DOCKER*', |       'NPMCI_LOGIN_DOCKER*', | ||||||
|       async (envString: string) => { |       async (envString: string) => { | ||||||
|   | |||||||
| @@ -285,6 +285,7 @@ export class Dockerfile { | |||||||
|       labels: [], |       labels: [], | ||||||
|       version: this.npmciDockerManagerRef.npmciRef.npmciConfig.getConfig().projectInfo.npm.version, |       version: this.npmciDockerManagerRef.npmciRef.npmciConfig.getConfig().projectInfo.npm.version, | ||||||
|     }); |     }); | ||||||
|  |     await this.npmciDockerManagerRef.npmciRef.npmciConfig.kvStorage.writeKey('latestPushedDockerTag', this.pushTag) | ||||||
|   } |   } | ||||||
|  |  | ||||||
|   /** |   /** | ||||||
|   | |||||||
| @@ -1,11 +1,10 @@ | |||||||
| import { logger } from '../npmci.logging.js'; | import { logger } from '../npmci.logging.js'; | ||||||
| import * as plugins from './mod.plugins.js'; | import * as plugins from './mod.plugins.js'; | ||||||
| import { ObjectMap } from '@pushrocks/lik'; |  | ||||||
|  |  | ||||||
| import { DockerRegistry } from './mod.classes.dockerregistry.js'; | import { DockerRegistry } from './mod.classes.dockerregistry.js'; | ||||||
|  |  | ||||||
| export class RegistryStorage { | export class RegistryStorage { | ||||||
|   objectMap = new ObjectMap<DockerRegistry>(); |   objectMap = new plugins.lik.ObjectMap<DockerRegistry>(); | ||||||
|   constructor() { |   constructor() { | ||||||
|     // Nothing here |     // Nothing here | ||||||
|   } |   } | ||||||
|   | |||||||
| @@ -54,7 +54,7 @@ export class NpmciNpmManager { | |||||||
|   public async prepare() { |   public async prepare() { | ||||||
|     const config = this.npmciRef.npmciConfig.getConfig(); |     const config = this.npmciRef.npmciConfig.getConfig(); | ||||||
|     let npmrcFileString: string = ''; |     let npmrcFileString: string = ''; | ||||||
|     await plugins.smartparam.forEachMinimatch( |     await plugins.smartobject.forEachMinimatch( | ||||||
|       process.env, |       process.env, | ||||||
|       'NPMCI_TOKEN_NPM*', |       'NPMCI_TOKEN_NPM*', | ||||||
|       (npmEnvArg: string) => { |       (npmEnvArg: string) => { | ||||||
| @@ -100,7 +100,7 @@ export class NpmciNpmManager { | |||||||
|       let publishVerdaccioAsWell = false; |       let publishVerdaccioAsWell = false; | ||||||
|       const config = this.npmciRef.npmciConfig.getConfig(); |       const config = this.npmciRef.npmciConfig.getConfig(); | ||||||
|       const availableRegistries: string[] = []; |       const availableRegistries: string[] = []; | ||||||
|       await plugins.smartparam.forEachMinimatch( |       await plugins.smartobject.forEachMinimatch( | ||||||
|         process.env, |         process.env, | ||||||
|         'NPMCI_TOKEN_NPM*', |         'NPMCI_TOKEN_NPM*', | ||||||
|         (npmEnvArg: string) => { |         (npmEnvArg: string) => { | ||||||
|   | |||||||
| @@ -31,7 +31,7 @@ const notUndefined = (stringArg: string) => { | |||||||
|  */ |  */ | ||||||
| export let prepare = async () => { | export let prepare = async () => { | ||||||
|   sshInstance = new plugins.smartssh.SshInstance(); // init ssh instance |   sshInstance = new plugins.smartssh.SshInstance(); // init ssh instance | ||||||
|   plugins.smartparam.forEachMinimatch(process.env, 'NPMCI_SSHKEY_*', evaluateSshEnv); |   plugins.smartobject.forEachMinimatch(process.env, 'NPMCI_SSHKEY_*', evaluateSshEnv); | ||||||
|   if (!process.env.NPMTS_TEST) { |   if (!process.env.NPMTS_TEST) { | ||||||
|     sshInstance.writeToDisk(); |     sshInstance.writeToDisk(); | ||||||
|   } else { |   } else { | ||||||
|   | |||||||
| @@ -7,7 +7,7 @@ const triggerValueRegex = | |||||||
|  |  | ||||||
| export let trigger = async () => { | export let trigger = async () => { | ||||||
|   logger.log('info', 'now running triggers'); |   logger.log('info', 'now running triggers'); | ||||||
|   await plugins.smartparam.forEachMinimatch(process.env, 'NPMCI_TRIGGER_*', evaluateTrigger); |   await plugins.smartobject.forEachMinimatch(process.env, 'NPMCI_TRIGGER_*', evaluateTrigger); | ||||||
| }; | }; | ||||||
|  |  | ||||||
| const evaluateTrigger = async (triggerEnvVarArg) => { | const evaluateTrigger = async (triggerEnvVarArg) => { | ||||||
|   | |||||||
| @@ -2,12 +2,10 @@ import { logger } from './npmci.logging.js'; | |||||||
| import * as plugins from './npmci.plugins.js'; | import * as plugins from './npmci.plugins.js'; | ||||||
| import * as paths from './npmci.paths.js'; | import * as paths from './npmci.paths.js'; | ||||||
|  |  | ||||||
| import * as smartpromise from '@pushrocks/smartpromise'; |  | ||||||
|  |  | ||||||
| /** | /** | ||||||
|  * wether nvm is available or not |  * wether nvm is available or not | ||||||
|  */ |  */ | ||||||
| export let nvmAvailable = smartpromise.defer<boolean>(); | export let nvmAvailable = plugins.smartpromise.defer<boolean>(); | ||||||
| /** | /** | ||||||
|  * the smartshell instance for npmci |  * the smartshell instance for npmci | ||||||
|  */ |  */ | ||||||
|   | |||||||
| @@ -27,7 +27,7 @@ export interface INpmciOptions { | |||||||
|   urlCloudly: string; |   urlCloudly: string; | ||||||
|  |  | ||||||
|   // cloudron |   // cloudron | ||||||
|   cloudronAppName: string; |   cloudronAppName?: string; | ||||||
| } | } | ||||||
|  |  | ||||||
| /** | /** | ||||||
|   | |||||||
| @@ -13,27 +13,29 @@ import * as servezoneInterfaces from '@servezone/interfaces'; | |||||||
|  |  | ||||||
| export { servezoneInterfaces }; | export { servezoneInterfaces }; | ||||||
|  |  | ||||||
| // @pushrocks | // @push.rocks | ||||||
| import * as npmextra from '@pushrocks/npmextra'; | import * as lik from '@push.rocks/lik'; | ||||||
| import * as projectinfo from '@pushrocks/projectinfo'; | import * as npmextra from '@push.rocks/npmextra'; | ||||||
| import * as qenv from '@pushrocks/qenv'; | import * as projectinfo from '@push.rocks/projectinfo'; | ||||||
| import * as smartanalytics from '@pushrocks/smartanalytics'; | import * as qenv from '@push.rocks/qenv'; | ||||||
| import * as smartdelay from '@pushrocks/smartdelay'; | import * as smartanalytics from '@push.rocks/smartanalytics'; | ||||||
| import * as smartfile from '@pushrocks/smartfile'; | import * as smartdelay from '@push.rocks/smartdelay'; | ||||||
| import * as smartcli from '@pushrocks/smartcli'; | import * as smartfile from '@push.rocks/smartfile'; | ||||||
| import * as smartgit from '@pushrocks/smartgit'; | import * as smartcli from '@push.rocks/smartcli'; | ||||||
| import * as smartlog from '@pushrocks/smartlog'; | import * as smartgit from '@push.rocks/smartgit'; | ||||||
| import * as smartlogDestinationLocal from '@pushrocks/smartlog-destination-local'; | import * as smartlog from '@push.rocks/smartlog'; | ||||||
| import * as smartparam from '@pushrocks/smartparam'; | import * as smartlogDestinationLocal from '@push.rocks/smartlog-destination-local'; | ||||||
| import * as smartpath from '@pushrocks/smartpath'; | import * as smartobject from '@push.rocks/smartobject'; | ||||||
| import * as smartpromise from '@pushrocks/smartpromise'; | import * as smartpath from '@push.rocks/smartpath'; | ||||||
| import * as smartrequest from '@pushrocks/smartrequest'; | import * as smartpromise from '@push.rocks/smartpromise'; | ||||||
| import * as smartshell from '@pushrocks/smartshell'; | import * as smartrequest from '@push.rocks/smartrequest'; | ||||||
| import * as smartsocket from '@pushrocks/smartsocket'; | import * as smartshell from '@push.rocks/smartshell'; | ||||||
| import * as smartssh from '@pushrocks/smartssh'; | import * as smartsocket from '@push.rocks/smartsocket'; | ||||||
| import * as smartstring from '@pushrocks/smartstring'; | import * as smartssh from '@push.rocks/smartssh'; | ||||||
|  | import * as smartstring from '@push.rocks/smartstring'; | ||||||
|  |  | ||||||
| export { | export { | ||||||
|  |   lik, | ||||||
|   npmextra, |   npmextra, | ||||||
|   projectinfo, |   projectinfo, | ||||||
|   qenv, |   qenv, | ||||||
| @@ -44,7 +46,7 @@ export { | |||||||
|   smartcli, |   smartcli, | ||||||
|   smartlog, |   smartlog, | ||||||
|   smartlogDestinationLocal, |   smartlogDestinationLocal, | ||||||
|   smartparam, |   smartobject, | ||||||
|   smartpath, |   smartpath, | ||||||
|   smartpromise, |   smartpromise, | ||||||
|   smartrequest, |   smartrequest, | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user