fix(fix request package usage): update

This commit is contained in:
Philipp Kunz 2018-09-22 14:36:25 +02:00
parent 5d468fc840
commit 5085d664cb
3 changed files with 22 additions and 4 deletions

View File

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

View File

@ -53,4 +53,4 @@
"through2": "^2.0.3"
},
"private": false
}
}

View File

@ -22,7 +22,20 @@ 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.postFormData(
'https://gitlab.com/api/v3/projects/' + regexProjectId + '/trigger/builds',
{},
[
{
name: 'token',
payload: regexProjectTriggerToken,
type: 'string'
},
{
name: 'ref',
payload: regexRefName,
type: 'string'
}
]
);
};