update trigger
This commit is contained in:
parent
4c0f0f5cc6
commit
27a12415e6
@ -11,10 +11,10 @@ export let trigger = function(){
|
|||||||
let iteratorString = i.toString();
|
let iteratorString = i.toString();
|
||||||
if(process.env["TRIGGER" + iteratorString]){
|
if(process.env["TRIGGER" + iteratorString]){
|
||||||
let triggerRegexResultArray = triggerRegex.exec(process.env["TRIGGER" + iteratorString]);
|
let triggerRegexResultArray = triggerRegex.exec(process.env["TRIGGER" + iteratorString]);
|
||||||
let regexDomain = triggerRegexResultArray[0];
|
let regexDomain = triggerRegexResultArray[1];
|
||||||
let regexProjectId = triggerRegexResultArray[1];
|
let regexProjectId = triggerRegexResultArray[2];
|
||||||
let regexProjectTriggerToken = triggerRegexResultArray[2];
|
let regexProjectTriggerToken = triggerRegexResultArray[3];
|
||||||
let regexRefName = triggerRegexResultArray[3];
|
let regexRefName = triggerRegexResultArray[4];
|
||||||
plugins.beautylog.log("triggering build for ref " + regexRefName);
|
plugins.beautylog.log("triggering build for ref " + regexRefName);
|
||||||
plugins.beautylog.log("Found TRIGGER" + iteratorString);
|
plugins.beautylog.log("Found TRIGGER" + iteratorString);
|
||||||
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}});
|
||||||
|
Loading…
Reference in New Issue
Block a user