fix tagging logic
This commit is contained in:
parent
e92d421bae
commit
c0d0e5154a
4
dist/npmci.build.docker.d.ts
vendored
4
dist/npmci.build.docker.d.ts
vendored
@ -3,7 +3,7 @@ export declare let readDockerfiles: () => any;
|
||||
export declare let sortDockerfiles: (sortableArrayArg: Dockerfile[]) => any;
|
||||
export declare let mapDockerfiles: (sortedArray: Dockerfile[]) => any;
|
||||
export declare let buildDockerfiles: (sortedArrayArg: Dockerfile[]) => any;
|
||||
export declare let pushDockerfiles: (sortedArrayArg: Dockerfile[], regsitryArg?: string) => any;
|
||||
export declare let pushDockerfiles: (sortedArrayArg: Dockerfile[]) => any;
|
||||
export declare let pullDockerfileImages: (sortableArrayArg: Dockerfile[], registryArg?: string) => any;
|
||||
export declare let testDockerfiles: (sortedArrayArg: Dockerfile[]) => any;
|
||||
export declare let releaseDockerfiles: (sortedArrayArg: Dockerfile[], registryArg?: any) => any;
|
||||
@ -26,7 +26,7 @@ export declare class Dockerfile {
|
||||
read?: boolean;
|
||||
});
|
||||
build(): any;
|
||||
push(registryArg: string): any;
|
||||
push(stageArg: any): any;
|
||||
pull(registryArg: string): void;
|
||||
test(): void;
|
||||
getId(): string;
|
||||
|
19
dist/npmci.build.docker.js
vendored
19
dist/npmci.build.docker.js
vendored
File diff suppressed because one or more lines are too long
@ -83,10 +83,10 @@ export let buildDockerfiles = (sortedArrayArg:Dockerfile[]) => {
|
||||
return done.promise;
|
||||
}
|
||||
|
||||
export let pushDockerfiles = function(sortedArrayArg:Dockerfile[],regsitryArg = "registry.gitlab.com"){
|
||||
export let pushDockerfiles = function(sortedArrayArg:Dockerfile[]){
|
||||
let done = plugins.q.defer();
|
||||
sortedArrayArg.forEach(function(dockerfileArg){
|
||||
dockerfileArg.push(regsitryArg);
|
||||
dockerfileArg.push(NpmciEnv.buildStage);
|
||||
});
|
||||
done.resolve(sortedArrayArg);
|
||||
return done.promise;
|
||||
@ -155,10 +155,18 @@ export class Dockerfile {
|
||||
done.resolve();
|
||||
return done.promise;
|
||||
};
|
||||
push(registryArg:string){
|
||||
push(stageArg){
|
||||
let done = plugins.q.defer();
|
||||
let pushTag;
|
||||
NpmciEnv.buildStage == "test" ? pushTag = this.testTag : pushTag = this.releaseTag;
|
||||
switch (stageArg){
|
||||
case "release":
|
||||
pushTag = this.releaseTag;
|
||||
break;
|
||||
case "test":
|
||||
default:
|
||||
pushTag = this.testTag;
|
||||
break;
|
||||
}
|
||||
bashBare("docker tag " + this.buildTag + " " + pushTag);
|
||||
bashBare("docker push " + pushTag);
|
||||
done.resolve();
|
||||
|
Loading…
Reference in New Issue
Block a user