complete modular transition
This commit is contained in:
@ -1,5 +1,5 @@
|
||||
import * as plugins from './npmci.plugins'
|
||||
import { bash } from './npmci.bash'
|
||||
import * as plugins from './mod.plugins'
|
||||
import { bash } from '../npmci.bash'
|
||||
|
||||
export let command = async () => {
|
||||
let wrappedCommand: string = ''
|
||||
|
1
ts/mod_command/mod.plugins.ts
Normal file
1
ts/mod_command/mod.plugins.ts
Normal file
@ -0,0 +1 @@
|
||||
export * from '../npmci.plugins'
|
@ -1,10 +1,10 @@
|
||||
import * as plugins from './npmci.plugins'
|
||||
import * as configModule from './npmci.config'
|
||||
import * as plugins from './mod.plugins'
|
||||
import * as configModule from '../npmci.config'
|
||||
import {
|
||||
bash,
|
||||
bashNoError,
|
||||
nvmAvailable,
|
||||
yarnAvailable } from './npmci.bash'
|
||||
yarnAvailable } from '../npmci.bash'
|
||||
|
||||
/**
|
||||
* Install a specific version of node
|
||||
|
1
ts/mod_install/mod.plugins.ts
Normal file
1
ts/mod_install/mod.plugins.ts
Normal file
@ -0,0 +1 @@
|
||||
export * from '../npmci.plugins'
|
@ -1,7 +1,7 @@
|
||||
import * as plugins from './npmci.plugins'
|
||||
import { bash } from './npmci.bash'
|
||||
import * as env from './npmci.env'
|
||||
import * as sshModule from './npmci.ssh'
|
||||
import * as plugins from './mod.plugins'
|
||||
import { bash } from '../npmci.bash'
|
||||
import * as env from '../npmci.env'
|
||||
import * as sshModule from '../npmci.ssh'
|
||||
|
||||
|
||||
// types
|
||||
|
1
ts/mod_prepare/mod.plugins.ts
Normal file
1
ts/mod_prepare/mod.plugins.ts
Normal file
@ -0,0 +1 @@
|
||||
export * from '../npmci.plugins'
|
@ -1,8 +1,12 @@
|
||||
import * as plugins from './npmci.plugins'
|
||||
import { prepare } from './npmci.prepare'
|
||||
import { bash } from './npmci.bash'
|
||||
import * as NpmciEnv from './npmci.env'
|
||||
import * as NpmciBuildDocker from './npmci.build.docker'
|
||||
import * as plugins from './mod.plugins'
|
||||
import { bash } from '../npmci.bash'
|
||||
import * as NpmciEnv from '../npmci.env'
|
||||
|
||||
import * as npmciMods from '../npmci.mods'
|
||||
|
||||
// import interfaces
|
||||
import { Dockerfile } from '../mod_docker/index'
|
||||
|
||||
|
||||
/**
|
||||
* type of supported services
|
||||
@ -26,20 +30,20 @@ export let publish = async (pubServiceArg: TPubService = 'npm') => {
|
||||
* tries to publish current cwd to NPM registry
|
||||
*/
|
||||
let publishNpm = async () => {
|
||||
await prepare('npm')
|
||||
.then(async function () {
|
||||
await bash('npm publish')
|
||||
plugins.beautylog.ok('Done!')
|
||||
})
|
||||
let modPrepare = await npmciMods.modPrepare.load()
|
||||
await modPrepare.prepare('npm')
|
||||
await bash('npm publish')
|
||||
plugins.beautylog.ok('Done!')
|
||||
}
|
||||
|
||||
/**
|
||||
* tries to publish current cwd to Docker registry
|
||||
*/
|
||||
let publishDocker = async () => {
|
||||
return await NpmciBuildDocker.readDockerfiles()
|
||||
.then(NpmciBuildDocker.pullDockerfileImages)
|
||||
.then(NpmciBuildDocker.pushDockerfiles)
|
||||
let modDocker = await npmciMods.modDocker.load()
|
||||
return await modDocker.readDockerfiles()
|
||||
.then(modDocker.pullDockerfileImages)
|
||||
.then(modDocker.pushDockerfiles)
|
||||
.then(dockerfileArray => {
|
||||
return dockerfileArray
|
||||
})
|
||||
|
1
ts/mod_publish/mod.plugins.ts
Normal file
1
ts/mod_publish/mod.plugins.ts
Normal file
@ -0,0 +1 @@
|
||||
export * from '../npmci.plugins'
|
@ -1,6 +1,5 @@
|
||||
import * as plugins from './npmci.plugins'
|
||||
import { prepare } from './npmci.prepare'
|
||||
import { bash } from './npmci.bash'
|
||||
import * as plugins from './mod.plugins'
|
||||
import { bash } from '../npmci.bash'
|
||||
|
||||
let triggerValueRegex = /^([a-zA-Z0-9\.]*)\|([a-zA-Z0-9\.]*)\|([a-zA-Z0-9\.]*)\|([a-zA-Z0-9\.]*)\|?([a-zA-Z0-9\.\-\/]*)/
|
||||
|
||||
@ -23,5 +22,8 @@ let evaluateTrigger = async (triggerEnvVarArg) => {
|
||||
}
|
||||
plugins.beautylog.info('Found Trigger!')
|
||||
plugins.beautylog.log('triggering build for ref ' + regexRefName + ' of ' + regexTriggerName)
|
||||
plugins.request.post('https://gitlab.com/api/v3/projects/' + regexProjectId + '/trigger/builds', { form: { token: regexProjectTriggerToken, ref: regexRefName } })
|
||||
plugins.request.post(
|
||||
'https://gitlab.com/api/v3/projects/' + regexProjectId + '/trigger/builds',
|
||||
{ form: { token: regexProjectTriggerToken, ref: regexRefName }
|
||||
})
|
||||
}
|
||||
|
@ -0,0 +1 @@
|
||||
export * from '../npmci.plugins'
|
||||
|
Reference in New Issue
Block a user