Compare commits
13 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 361d45e086 | |||
| cb7cb852ea | |||
| 61720f47be | |||
| b435fc6bdf | |||
| 70ad41ab86 | |||
| d67109b4bc | |||
| a29e04f9e3 | |||
| 9634ca3b4d | |||
| d2e7488868 | |||
| bb44333d70 | |||
| 87f6adeda4 | |||
| 6334396bfc | |||
| 7a33252f2f |
@@ -2,8 +2,9 @@ image: hosttoday/ht-docker-node:lts
|
||||
|
||||
stages:
|
||||
- release
|
||||
- test
|
||||
- trigger
|
||||
- test
|
||||
|
||||
|
||||
before_script:
|
||||
- npm install -g npmci
|
||||
|
||||
41
dist/npmci.build.docker.js
vendored
41
dist/npmci.build.docker.js
vendored
File diff suppressed because one or more lines are too long
@@ -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"
|
||||
}
|
||||
|
||||
@@ -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){
|
||||
let cleanTags = [];
|
||||
NpmciEnv.dockerFiles.forEach(function(dockerfileArg){
|
||||
cleanTags.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;
|
||||
return -1;
|
||||
} else {
|
||||
return 0
|
||||
}
|
||||
});
|
||||
if(redoSort){
|
||||
sortFunction();
|
||||
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 {
|
||||
done.resolve();
|
||||
return 0
|
||||
}
|
||||
};
|
||||
sortFunction();
|
||||
});
|
||||
done.resolve();
|
||||
return done.promise;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user