Compare commits

...

4 Commits

Author SHA1 Message Date
8604c63d37 3.0.59 2018-09-22 15:18:21 +02:00
db0b38bd7b fix(cli): update cli files to be in line with gitzone cli template 2018-09-22 15:18:21 +02:00
edde87b6be 3.0.58 2018-09-22 14:36:26 +02:00
5085d664cb fix(fix request package usage): update 2018-09-22 14:36:25 +02:00
6 changed files with 32 additions and 7 deletions

View File

@@ -26,6 +26,7 @@ mirror:
snyk: snyk:
stage: security stage: security
script: script:
- npmci npm prepare
- npmci command npm install -g snyk - npmci command npm install -g snyk
- npmci command npm install --ignore-scripts - npmci command npm install --ignore-scripts
- npmci command snyk test - npmci command snyk test
@@ -39,6 +40,7 @@ snyk:
testLEGACY: testLEGACY:
stage: test stage: test
script: script:
- npmci npm prepare
- npmci node install legacy - npmci node install legacy
- npmci npm install - npmci npm install
- npmci npm test - npmci npm test
@@ -51,6 +53,7 @@ testLEGACY:
testLTS: testLTS:
stage: test stage: test
script: script:
- npmci npm prepare
- npmci node install lts - npmci node install lts
- npmci npm install - npmci npm install
- npmci npm test - npmci npm test
@@ -62,6 +65,7 @@ testLTS:
testSTABLE: testSTABLE:
stage: test stage: test
script: script:
- npmci npm prepare
- npmci node install stable - npmci node install stable
- npmci npm install - npmci npm install
- npmci npm test - npmci npm test
@@ -118,6 +122,7 @@ pages:
stage: metadata stage: metadata
script: script:
- npmci command npm install -g typedoc typescript - npmci command npm install -g typedoc typescript
- npmci npm prepare
- npmci npm install - npmci npm install
- npmci command typedoc --module "commonjs" --target "ES2016" --out public/ ts/ - npmci command typedoc --module "commonjs" --target "ES2016" --out public/ ts/
tags: tags:

3
cli.js Normal file
View File

@@ -0,0 +1,3 @@
#!/usr/bin/env node
process.env.CLI_CALL = 'true';
require('./dist/index');

4
cli.ts.js Normal file
View File

@@ -0,0 +1,4 @@
#!/usr/bin/env node
process.env.CLI_CALL = 'true';
require('@gitzone/tsrun');
require('./ts/index');

2
package-lock.json generated
View File

@@ -1,6 +1,6 @@
{ {
"name": "@shipzone/npmci", "name": "@shipzone/npmci",
"version": "3.0.57", "version": "3.0.59",
"lockfileVersion": 1, "lockfileVersion": 1,
"requires": true, "requires": true,
"dependencies": { "dependencies": {

View File

@@ -1,16 +1,16 @@
{ {
"name": "@shipzone/npmci", "name": "@shipzone/npmci",
"version": "3.0.57", "version": "3.0.59",
"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",
"typings": "dist/index.d.ts", "typings": "dist/index.d.ts",
"bin": { "bin": {
"npmci": "dist/cli.js" "npmci": "cli.js"
}, },
"scripts": { "scripts": {
"test": "(rm -f config.json) && tstest test/", "test": "(rm -f config.json) && tstest test/",
"build": "(rm -f config.json) && tsbuild && (npm run testVersion)", "build": "(rm -f config.json) && tsbuild && (npm run testVersion)",
"testVersion": "(cd test/assets/ && node ../../dist/cli.js -v)" "testVersion": "(cd test/assets/ && node ../../cli.js -v)"
}, },
"repository": { "repository": {
"type": "git", "type": "git",

View File

@@ -22,7 +22,20 @@ let evaluateTrigger = async triggerEnvVarArg => {
} }
plugins.beautylog.info('Found Trigger!'); plugins.beautylog.info('Found Trigger!');
plugins.beautylog.log('triggering build for ref ' + regexRefName + ' of ' + regexTriggerName); plugins.beautylog.log('triggering build for ref ' + regexRefName + ' of ' + regexTriggerName);
plugins.request.post('https://gitlab.com/api/v3/projects/' + regexProjectId + '/trigger/builds', { plugins.request.postFormData(
form: { token: regexProjectTriggerToken, ref: regexRefName } 'https://gitlab.com/api/v3/projects/' + regexProjectId + '/trigger/builds',
}); {},
[
{
name: 'token',
payload: regexProjectTriggerToken,
type: 'string'
},
{
name: 'ref',
payload: regexRefName,
type: 'string'
}
]
);
}; };