Compare commits
	
		
			8 Commits
		
	
	
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
| 50d3f2d795 | |||
| 305856b9e1 | |||
| 3683743f3c | |||
| 41237e0e5f | |||
| bce84a0e74 | |||
| 79bed919d8 | |||
| 4b202ce00e | |||
| 16ca787314 | 
							
								
								
									
										46
									
								
								package.json
									
									
									
									
									
								
							
							
						
						
									
										46
									
								
								package.json
									
									
									
									
									
								
							| @@ -1,6 +1,6 @@ | ||||
| { | ||||
|   "name": "@shipzone/npmci", | ||||
|   "version": "4.1.18", | ||||
|   "version": "4.1.22", | ||||
|   "private": false, | ||||
|   "description": "node and docker in gitlab ci on steroids", | ||||
|   "main": "dist_ts/index.js", | ||||
| @@ -29,31 +29,31 @@ | ||||
|     "@gitzone/tsbuild": "^2.1.66", | ||||
|     "@gitzone/tsrun": "^1.2.42", | ||||
|     "@gitzone/tstest": "^1.0.74", | ||||
|     "@pushrocks/tapbundle": "^5.0.8", | ||||
|     "@types/node": "^20.3.1" | ||||
|     "@push.rocks/tapbundle": "^5.0.8", | ||||
|     "@types/node": "^20.4.1" | ||||
|   }, | ||||
|   "dependencies": { | ||||
|     "@apiglobal/typedrequest": "^2.0.12", | ||||
|     "@pushrocks/lik": "^6.0.2", | ||||
|     "@pushrocks/npmextra": "^3.0.9", | ||||
|     "@pushrocks/projectinfo": "^5.0.1", | ||||
|     "@pushrocks/qenv": "^5.0.2", | ||||
|     "@pushrocks/smartanalytics": "^2.0.15", | ||||
|     "@pushrocks/smartcli": "^4.0.6", | ||||
|     "@pushrocks/smartdelay": "^3.0.1", | ||||
|     "@pushrocks/smartenv": "^5.0.5", | ||||
|     "@pushrocks/smartfile": "^10.0.25", | ||||
|     "@pushrocks/smartgit": "^3.0.0", | ||||
|     "@pushrocks/smartlog": "^3.0.2", | ||||
|     "@pushrocks/smartlog-destination-local": "^9.0.0", | ||||
|     "@pushrocks/smartparam": "^1.1.6", | ||||
|     "@pushrocks/smartpath": "^5.0.5", | ||||
|     "@pushrocks/smartpromise": "^4.0.2", | ||||
|     "@pushrocks/smartrequest": "^2.0.15", | ||||
|     "@pushrocks/smartshell": "^3.0.3", | ||||
|     "@pushrocks/smartsocket": "^2.0.19", | ||||
|     "@pushrocks/smartssh": "^2.0.0", | ||||
|     "@pushrocks/smartstring": "^4.0.7", | ||||
|     "@push.rocks/lik": "^6.0.3", | ||||
|     "@push.rocks/npmextra": "^3.0.9", | ||||
|     "@push.rocks/projectinfo": "^5.0.1", | ||||
|     "@push.rocks/qenv": "^5.0.2", | ||||
|     "@push.rocks/smartanalytics": "^2.0.15", | ||||
|     "@push.rocks/smartcli": "^4.0.6", | ||||
|     "@push.rocks/smartdelay": "^3.0.1", | ||||
|     "@push.rocks/smartenv": "^5.0.5", | ||||
|     "@push.rocks/smartfile": "^10.0.28", | ||||
|     "@push.rocks/smartgit": "^3.0.0", | ||||
|     "@push.rocks/smartlog": "^3.0.2", | ||||
|     "@push.rocks/smartlog-destination-local": "^9.0.0", | ||||
|     "@push.rocks/smartobject": "^1.0.10", | ||||
|     "@push.rocks/smartpath": "^5.0.11", | ||||
|     "@push.rocks/smartpromise": "^4.0.2", | ||||
|     "@push.rocks/smartrequest": "^2.0.18", | ||||
|     "@push.rocks/smartshell": "^3.0.3", | ||||
|     "@push.rocks/smartsocket": "^2.0.19", | ||||
|     "@push.rocks/smartssh": "^2.0.0", | ||||
|     "@push.rocks/smartstring": "^4.0.7", | ||||
|     "@servezone/interfaces": "^1.0.3", | ||||
|     "@tsclass/tsclass": "^4.0.42", | ||||
|     "@types/through2": "^2.0.38", | ||||
|   | ||||
							
								
								
									
										881
									
								
								pnpm-lock.yaml
									
									
									
										generated
									
									
									
								
							
							
						
						
									
										881
									
								
								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'; | ||||
| import { tap, expect } from '@pushrocks/tapbundle'; | ||||
| import { tap, expect } from '@push.rocks/tapbundle'; | ||||
|  | ||||
| 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 smartpath from '@pushrocks/smartpath'; | ||||
| import * as smartpath from '@push.rocks/smartpath'; | ||||
|  | ||||
| process.env.NPMTS_TEST = 'true'; | ||||
| process.env.NPMCI_URL_CLOUDLY = 'localhost'; | ||||
|   | ||||
| @@ -3,6 +3,6 @@ | ||||
|  */ | ||||
| export const commitinfo = { | ||||
|   name: '@shipzone/npmci', | ||||
|   version: '4.1.18', | ||||
|   version: '4.1.22', | ||||
|   description: 'node and docker in gitlab ci on steroids' | ||||
| } | ||||
|   | ||||
| @@ -48,8 +48,7 @@ export class NpmciCloudronManager { | ||||
|     logger.log('ok', 'CloudronManifest prepared'); | ||||
|  | ||||
|     // lets figure out the docker image tag | ||||
|     const dockerfiles = await this.npmciRef.dockerManager.getDockerfiles(); | ||||
|     const dockerImageTag = dockerfiles[0].pushTag; | ||||
|     const dockerImageTag = await this.npmciRef.npmciConfig.kvStorage.readKey('latestPushedDockerTag'); | ||||
|     const appName = this.npmciRef.npmciConfig.getConfig().cloudronAppName; | ||||
|      | ||||
|     const cloudronEnvVar = process.env.NPMCI_LOGIN_CLOUDRON; | ||||
|   | ||||
| @@ -93,7 +93,7 @@ export class NpmciDockerManager { | ||||
|     } | ||||
|  | ||||
|     // handle registries | ||||
|     await plugins.smartparam.forEachMinimatch( | ||||
|     await plugins.smartobject.forEachMinimatch( | ||||
|       process.env, | ||||
|       'NPMCI_LOGIN_DOCKER*', | ||||
|       async (envString: string) => { | ||||
|   | ||||
| @@ -285,6 +285,7 @@ export class Dockerfile { | ||||
|       labels: [], | ||||
|       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 * as plugins from './mod.plugins.js'; | ||||
| import { ObjectMap } from '@pushrocks/lik'; | ||||
|  | ||||
| import { DockerRegistry } from './mod.classes.dockerregistry.js'; | ||||
|  | ||||
| export class RegistryStorage { | ||||
|   objectMap = new ObjectMap<DockerRegistry>(); | ||||
|   objectMap = new plugins.lik.ObjectMap<DockerRegistry>(); | ||||
|   constructor() { | ||||
|     // Nothing here | ||||
|   } | ||||
|   | ||||
| @@ -54,7 +54,7 @@ export class NpmciNpmManager { | ||||
|   public async prepare() { | ||||
|     const config = this.npmciRef.npmciConfig.getConfig(); | ||||
|     let npmrcFileString: string = ''; | ||||
|     await plugins.smartparam.forEachMinimatch( | ||||
|     await plugins.smartobject.forEachMinimatch( | ||||
|       process.env, | ||||
|       'NPMCI_TOKEN_NPM*', | ||||
|       (npmEnvArg: string) => { | ||||
| @@ -100,7 +100,7 @@ export class NpmciNpmManager { | ||||
|       let publishVerdaccioAsWell = false; | ||||
|       const config = this.npmciRef.npmciConfig.getConfig(); | ||||
|       const availableRegistries: string[] = []; | ||||
|       await plugins.smartparam.forEachMinimatch( | ||||
|       await plugins.smartobject.forEachMinimatch( | ||||
|         process.env, | ||||
|         'NPMCI_TOKEN_NPM*', | ||||
|         (npmEnvArg: string) => { | ||||
|   | ||||
| @@ -31,7 +31,7 @@ const notUndefined = (stringArg: string) => { | ||||
|  */ | ||||
| export let prepare = async () => { | ||||
|   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) { | ||||
|     sshInstance.writeToDisk(); | ||||
|   } else { | ||||
|   | ||||
| @@ -7,7 +7,7 @@ const triggerValueRegex = | ||||
|  | ||||
| export let trigger = async () => { | ||||
|   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) => { | ||||
|   | ||||
| @@ -2,12 +2,10 @@ import { logger } from './npmci.logging.js'; | ||||
| import * as plugins from './npmci.plugins.js'; | ||||
| import * as paths from './npmci.paths.js'; | ||||
|  | ||||
| import * as smartpromise from '@pushrocks/smartpromise'; | ||||
|  | ||||
| /** | ||||
|  * wether nvm is available or not | ||||
|  */ | ||||
| export let nvmAvailable = smartpromise.defer<boolean>(); | ||||
| export let nvmAvailable = plugins.smartpromise.defer<boolean>(); | ||||
| /** | ||||
|  * the smartshell instance for npmci | ||||
|  */ | ||||
|   | ||||
| @@ -27,7 +27,7 @@ export interface INpmciOptions { | ||||
|   urlCloudly: string; | ||||
|  | ||||
|   // cloudron | ||||
|   cloudronAppName: string; | ||||
|   cloudronAppName?: string; | ||||
| } | ||||
|  | ||||
| /** | ||||
|   | ||||
| @@ -13,27 +13,29 @@ import * as servezoneInterfaces from '@servezone/interfaces'; | ||||
|  | ||||
| export { servezoneInterfaces }; | ||||
|  | ||||
| // @pushrocks | ||||
| import * as npmextra from '@pushrocks/npmextra'; | ||||
| import * as projectinfo from '@pushrocks/projectinfo'; | ||||
| import * as qenv from '@pushrocks/qenv'; | ||||
| import * as smartanalytics from '@pushrocks/smartanalytics'; | ||||
| import * as smartdelay from '@pushrocks/smartdelay'; | ||||
| import * as smartfile from '@pushrocks/smartfile'; | ||||
| import * as smartcli from '@pushrocks/smartcli'; | ||||
| import * as smartgit from '@pushrocks/smartgit'; | ||||
| import * as smartlog from '@pushrocks/smartlog'; | ||||
| import * as smartlogDestinationLocal from '@pushrocks/smartlog-destination-local'; | ||||
| import * as smartparam from '@pushrocks/smartparam'; | ||||
| import * as smartpath from '@pushrocks/smartpath'; | ||||
| import * as smartpromise from '@pushrocks/smartpromise'; | ||||
| import * as smartrequest from '@pushrocks/smartrequest'; | ||||
| import * as smartshell from '@pushrocks/smartshell'; | ||||
| import * as smartsocket from '@pushrocks/smartsocket'; | ||||
| import * as smartssh from '@pushrocks/smartssh'; | ||||
| import * as smartstring from '@pushrocks/smartstring'; | ||||
| // @push.rocks | ||||
| import * as lik from '@push.rocks/lik'; | ||||
| import * as npmextra from '@push.rocks/npmextra'; | ||||
| import * as projectinfo from '@push.rocks/projectinfo'; | ||||
| import * as qenv from '@push.rocks/qenv'; | ||||
| import * as smartanalytics from '@push.rocks/smartanalytics'; | ||||
| import * as smartdelay from '@push.rocks/smartdelay'; | ||||
| import * as smartfile from '@push.rocks/smartfile'; | ||||
| import * as smartcli from '@push.rocks/smartcli'; | ||||
| import * as smartgit from '@push.rocks/smartgit'; | ||||
| import * as smartlog from '@push.rocks/smartlog'; | ||||
| import * as smartlogDestinationLocal from '@push.rocks/smartlog-destination-local'; | ||||
| import * as smartobject from '@push.rocks/smartobject'; | ||||
| import * as smartpath from '@push.rocks/smartpath'; | ||||
| import * as smartpromise from '@push.rocks/smartpromise'; | ||||
| import * as smartrequest from '@push.rocks/smartrequest'; | ||||
| import * as smartshell from '@push.rocks/smartshell'; | ||||
| import * as smartsocket from '@push.rocks/smartsocket'; | ||||
| import * as smartssh from '@push.rocks/smartssh'; | ||||
| import * as smartstring from '@push.rocks/smartstring'; | ||||
|  | ||||
| export { | ||||
|   lik, | ||||
|   npmextra, | ||||
|   projectinfo, | ||||
|   qenv, | ||||
| @@ -44,7 +46,7 @@ export { | ||||
|   smartcli, | ||||
|   smartlog, | ||||
|   smartlogDestinationLocal, | ||||
|   smartparam, | ||||
|   smartobject, | ||||
|   smartpath, | ||||
|   smartpromise, | ||||
|   smartrequest, | ||||
|   | ||||
		Reference in New Issue
	
	Block a user