Compare commits

...

13 Commits

Author SHA1 Message Date
361d45e086 2.1.24 2016-06-05 10:11:07 +02:00
cb7cb852ea now sorting Dockerfiles correctly 2016-06-05 10:11:01 +02:00
61720f47be 2.1.23 2016-06-05 09:42:14 +02:00
b435fc6bdf update smartstring 2016-06-05 09:42:08 +02:00
70ad41ab86 fix gitlab.yml 2016-06-05 09:38:11 +02:00
d67109b4bc 2.1.22 2016-06-05 09:34:21 +02:00
a29e04f9e3 fix gitlab.yml 2016-06-05 09:33:51 +02:00
9634ca3b4d 2.1.21 2016-06-05 08:53:52 +02:00
d2e7488868 fix 2016-06-05 08:53:46 +02:00
bb44333d70 2.1.20 2016-06-05 08:30:12 +02:00
87f6adeda4 fix 2016-06-05 08:30:08 +02:00
6334396bfc 2.1.19 2016-06-05 08:19:59 +02:00
7a33252f2f fix 2016-06-05 08:19:03 +02:00
4 changed files with 33 additions and 51 deletions

View File

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

File diff suppressed because one or more lines are too long

View File

@@ -1,6 +1,6 @@
{
"name": "npmci",
"version": "2.1.18",
"version": "2.1.24",
"description": "",
"main": "dist/index.js",
"bin": {
@@ -32,7 +32,7 @@
"shelljs": "^0.7.0",
"smartfile": "^3.0.10",
"smartssh": "^1.0.5",
"smartstring": "^2.0.4",
"smartstring": "^2.0.6",
"through2": "^2.0.1",
"typings-global": "^1.0.3"
}

View File

@@ -29,31 +29,23 @@ let readDockerfiles = function(){
let sortDockerfiles = function(){
let done = plugins.q.defer();
let redoSort:boolean;
let sortFunction = function(){
redoSort = false;
let notYetBuiltImages:string[] = [];
NpmciEnv.dockerFiles.forEach((dockerFileArg)=>{
notYetBuiltImages.push(dockerFileArg.cleanTag);
});
NpmciEnv.dockerFiles.sort(function(a,b){
plugins.beautylog.log("sort build order for Dockerimages");
let aIndex = notYetBuiltImages.indexOf(a.cleanTag);
if(aIndex != -1){notYetBuiltImages.splice(aIndex,1)}
if(notYetBuiltImages.indexOf(b.cleanTag) != -1){
redoSort = true;
let cleanTags = [];
NpmciEnv.dockerFiles.forEach(function(dockerfileArg){
cleanTags.push(dockerfileArg.cleanTag);
});
let aIndex = cleanTags.indexOf(a.cleanTag);
let bIndex = cleanTags.indexOf(b.baseImage);
console.log(cleanTags);
console.log(a.cleanTag);
console.log(b.cleanTag);
if(bIndex < aIndex && bIndex != -1){
return -1;
} else {
return 0
}
});
if(redoSort){
sortFunction();
} else {
done.resolve();
}
};
sortFunction();
return done.promise;
}