This commit is contained in:
Philipp Kunz 2016-06-05 08:19:03 +02:00
parent b7068b7b53
commit 7a33252f2f
3 changed files with 11 additions and 6 deletions

View File

@ -2,8 +2,9 @@ image: hosttoday/ht-docker-node:lts
stages: stages:
- release - release
- test
- trigger - trigger
- test
before_script: before_script:
- npm install -g npmci - npm install -g npmci

File diff suppressed because one or more lines are too long

View File

@ -30,6 +30,7 @@ let readDockerfiles = function(){
let sortDockerfiles = function(){ let sortDockerfiles = function(){
let done = plugins.q.defer(); let done = plugins.q.defer();
let redoSort:boolean; let redoSort:boolean;
let sortCounter:number = 0;
let sortFunction = function(){ let sortFunction = function(){
redoSort = false; redoSort = false;
let notYetBuiltImages:string[] = []; let notYetBuiltImages:string[] = [];
@ -42,12 +43,13 @@ let sortDockerfiles = function(){
if(aIndex != -1){notYetBuiltImages.splice(aIndex,1)} if(aIndex != -1){notYetBuiltImages.splice(aIndex,1)}
if(notYetBuiltImages.indexOf(b.cleanTag) != -1){ if(notYetBuiltImages.indexOf(b.cleanTag) != -1){
redoSort = true; redoSort = true;
return -1; return 1;
} else { } else {
return 0 return 0
} }
}); });
if(redoSort){ if(redoSort && sortCounter <= 100){
sortCounter++;
sortFunction(); sortFunction();
} else { } else {
done.resolve(); done.resolve();