Compare commits

..

2 Commits

Author SHA1 Message Date
a965cf38c8 2.1.25 2016-06-05 10:24:00 +02:00
7924ba26a2 now sorting Dockerfiles correctly 2016-06-05 10:23:55 +02:00
3 changed files with 18 additions and 18 deletions

File diff suppressed because one or more lines are too long

View File

@@ -1,6 +1,6 @@
{
"name": "npmci",
"version": "2.1.24",
"version": "2.1.25",
"description": "",
"main": "dist/index.js",
"bin": {

View File

@@ -34,13 +34,13 @@ let sortDockerfiles = function(){
NpmciEnv.dockerFiles.forEach(function(dockerfileArg){
cleanTags.push(dockerfileArg.cleanTag);
});
let aIndex = cleanTags.indexOf(a.cleanTag);
let bIndex = cleanTags.indexOf(b.baseImage);
let aIndex = cleanTags.indexOf(a.baseImage);
let bIndex = cleanTags.indexOf(b.cleanTag);
console.log(cleanTags);
console.log(a.cleanTag);
console.log(b.cleanTag);
if(bIndex < aIndex && bIndex != -1){
return -1;
console.log(a.baseImage,aIndex);
console.log(b.cleanTag,bIndex);
if(aIndex < bIndex && bIndex != -1){
return 1;
} else {
return 0
}
@@ -117,12 +117,12 @@ let dockerBaseImage = function(dockerfileContentArg:string){
export let dockerTag = function(repoArg:string,versionArg:string):string{
let tagString:string;
let registry = NpmciEnv.dockerRegistry;
if(process.env.CI_BUILD_STAGE == "test"){
if(process.env.CI_BUILD_STAGE == "build" || process.env.CI_BUILD_STAGE == "test"){
registry = "registry.gitlab.com";
}
let repo = repoArg;
let version = versionArg;
if(process.env.CI_BUILD_STAGE == "test" || process.env.CI_BUILD_STAGE == "build"){
if(process.env.CI_BUILD_STAGE == "build" || process.env.CI_BUILD_STAGE == "test"){
version = version + "_test";
}
tagString = registry + "/" + repo + ":" + version;