281 lines
20 KiB
JavaScript
281 lines
20 KiB
JavaScript
"use strict";
|
|
const plugins = require("./npmci.plugins");
|
|
const paths = require("./npmci.paths");
|
|
const NpmciEnv = require("./npmci.env");
|
|
const npmci_bash_1 = require("./npmci.bash");
|
|
/**
|
|
* builds a cwd of Dockerfiles by triggering a promisechain
|
|
*/
|
|
exports.build = function () {
|
|
let done = plugins.q.defer();
|
|
exports.readDockerfiles()
|
|
.then(exports.sortDockerfiles)
|
|
.then(exports.mapDockerfiles)
|
|
.then(exports.buildDockerfiles)
|
|
.then(exports.pushDockerfiles)
|
|
.then(() => {
|
|
done.resolve();
|
|
});
|
|
return done.promise;
|
|
};
|
|
/**
|
|
* creates instance of class Dockerfile for all Dockerfiles in cwd
|
|
* @returns Promise<Dockerfile[]>
|
|
*/
|
|
exports.readDockerfiles = function () {
|
|
let done = plugins.q.defer();
|
|
let readDockerfilesArray = [];
|
|
plugins.gulp.src("./Dockerfile*")
|
|
.pipe(plugins.through2.obj(function (file, enc, cb) {
|
|
let myDockerfile = new Dockerfile({
|
|
filePath: file.path,
|
|
read: true
|
|
});
|
|
readDockerfilesArray.push(myDockerfile);
|
|
cb(null, file);
|
|
}, function () {
|
|
done.resolve(readDockerfilesArray);
|
|
}));
|
|
return done.promise;
|
|
};
|
|
/**
|
|
* sorts Dockerfiles into a dependency chain
|
|
* @param sortableArrayArg an array of instances of class Dockerfile
|
|
* @returns Promise<Dockerfile[]>
|
|
*/
|
|
exports.sortDockerfiles = function (sortableArrayArg) {
|
|
let done = plugins.q.defer();
|
|
let sortedArray = [];
|
|
let cleanTagsOriginal = exports.cleanTagsArrayFunction(sortableArrayArg, sortedArray);
|
|
let sorterFunctionCounter = 0;
|
|
let sorterFunction = function () {
|
|
sortableArrayArg.forEach((dockerfileArg) => {
|
|
let cleanTags = exports.cleanTagsArrayFunction(sortableArrayArg, sortedArray);
|
|
if (cleanTags.indexOf(dockerfileArg.baseImage) == -1 && sortedArray.indexOf(dockerfileArg) == -1) {
|
|
sortedArray.push(dockerfileArg);
|
|
}
|
|
;
|
|
if (cleanTagsOriginal.indexOf(dockerfileArg.baseImage) != -1) {
|
|
dockerfileArg.localBaseImageDependent = true;
|
|
}
|
|
;
|
|
});
|
|
if (sortableArrayArg.length == sortedArray.length) {
|
|
done.resolve(sortedArray);
|
|
}
|
|
else if (sorterFunctionCounter < 10) {
|
|
sorterFunctionCounter++;
|
|
sorterFunction();
|
|
}
|
|
;
|
|
};
|
|
sorterFunction();
|
|
return done.promise;
|
|
};
|
|
/**
|
|
* maps local Dockerfiles dependencies to the correspoding Dockerfile class instances
|
|
*/
|
|
exports.mapDockerfiles = function (sortedArray) {
|
|
let done = plugins.q.defer();
|
|
sortedArray.forEach((dockerfileArg) => {
|
|
if (dockerfileArg.localBaseImageDependent) {
|
|
sortedArray.forEach((dockfile2) => {
|
|
if (dockfile2.cleanTag == dockerfileArg.baseImage) {
|
|
dockerfileArg.localBaseDockerfile = dockfile2;
|
|
}
|
|
});
|
|
}
|
|
;
|
|
});
|
|
done.resolve(sortedArray);
|
|
return done.promise;
|
|
};
|
|
/**
|
|
* builds the correspoding real docker image for each Dockerfile class instance
|
|
*/
|
|
exports.buildDockerfiles = (sortedArrayArg) => {
|
|
let done = plugins.q.defer();
|
|
sortedArrayArg.forEach(function (dockerfileArg) {
|
|
dockerfileArg.build();
|
|
});
|
|
done.resolve(sortedArrayArg);
|
|
return done.promise;
|
|
};
|
|
/**
|
|
* pushes the real Dockerfile images to a Docker registry
|
|
*/
|
|
exports.pushDockerfiles = function (sortedArrayArg) {
|
|
let done = plugins.q.defer();
|
|
sortedArrayArg.forEach(function (dockerfileArg) {
|
|
dockerfileArg.push(NpmciEnv.buildStage);
|
|
});
|
|
done.resolve(sortedArrayArg);
|
|
return done.promise;
|
|
};
|
|
/**
|
|
* pulls corresponding real Docker images for instances of Dockerfile from a registry.
|
|
* This is needed if building, testing, and publishing of Docker images is carried out in seperate CI stages.
|
|
*/
|
|
exports.pullDockerfileImages = (sortableArrayArg, registryArg = "registry.gitlab.com") => {
|
|
let done = plugins.q.defer();
|
|
sortableArrayArg.forEach((dockerfileArg) => {
|
|
dockerfileArg.pull(registryArg);
|
|
});
|
|
done.resolve(sortableArrayArg);
|
|
return done.promise;
|
|
};
|
|
/**
|
|
* tests all Dockerfiles in by calling class Dockerfile.test();
|
|
* @param sortedArrayArg Dockerfile[] that contains all Dockerfiles in cwd
|
|
*/
|
|
exports.testDockerfiles = (sortedArrayArg) => {
|
|
let done = plugins.q.defer();
|
|
sortedArrayArg.forEach(function (dockerfileArg) {
|
|
dockerfileArg.test();
|
|
});
|
|
done.resolve(sortedArrayArg);
|
|
return done.promise;
|
|
};
|
|
/**
|
|
* class Dockerfile represents a Dockerfile on disk in npmci
|
|
*/
|
|
class Dockerfile {
|
|
constructor(options) {
|
|
this.filePath = options.filePath;
|
|
this.repo = NpmciEnv.repo.user + "/" + NpmciEnv.repo.repo;
|
|
this.version = exports.dockerFileVersion(plugins.path.parse(options.filePath).base);
|
|
this.cleanTag = this.repo + ":" + this.version;
|
|
this.buildTag = this.cleanTag;
|
|
this.testTag = exports.dockerTag("registry.gitlab.com", this.repo, this.version, "test");
|
|
this.releaseTag = exports.dockerTag(NpmciEnv.dockerRegistry, this.repo, this.version);
|
|
this.containerName = "dockerfile-" + this.version;
|
|
if (options.filePath && options.read) {
|
|
this.content = plugins.smartfile.fs.toStringSync(plugins.path.resolve(options.filePath));
|
|
}
|
|
;
|
|
this.baseImage = exports.dockerBaseImage(this.content);
|
|
this.localBaseImageDependent = false;
|
|
}
|
|
;
|
|
/**
|
|
* builds the Dockerfile
|
|
*/
|
|
build() {
|
|
let done = plugins.q.defer();
|
|
plugins.beautylog.info("now building Dockerfile for " + this.cleanTag);
|
|
npmci_bash_1.bashBare("docker build -t " + this.buildTag + " -f " + this.filePath + " .");
|
|
NpmciEnv.dockerFilesBuilt.push(this);
|
|
done.resolve();
|
|
return done.promise;
|
|
}
|
|
;
|
|
/**
|
|
* pushes the Dockerfile to a registry
|
|
*/
|
|
push(stageArg) {
|
|
let done = plugins.q.defer();
|
|
let pushTag;
|
|
switch (stageArg) {
|
|
case "release":
|
|
pushTag = this.releaseTag;
|
|
break;
|
|
case "test":
|
|
default:
|
|
pushTag = this.testTag;
|
|
break;
|
|
}
|
|
npmci_bash_1.bashBare("docker tag " + this.buildTag + " " + pushTag);
|
|
npmci_bash_1.bashBare("docker push " + pushTag);
|
|
done.resolve();
|
|
return done.promise;
|
|
}
|
|
;
|
|
/**
|
|
* pulls the Dockerfile from a registry
|
|
*/
|
|
pull(registryArg) {
|
|
let pullTag = this.testTag;
|
|
npmci_bash_1.bashBare("docker pull " + pullTag);
|
|
npmci_bash_1.bashBare("docker tag " + pullTag + " " + this.buildTag);
|
|
}
|
|
;
|
|
/**
|
|
* tests the Dockerfile;
|
|
*/
|
|
test() {
|
|
let testFile = plugins.path.join(paths.NpmciTestDir, "test_" + this.version + ".sh");
|
|
let testFileExists = plugins.smartfile.fs.fileExistsSync(testFile);
|
|
if (testFileExists) {
|
|
npmci_bash_1.bashBare("docker run --name npmci_test_container " + this.buildTag + " mkdir /npmci_test");
|
|
npmci_bash_1.bashBare("docker cp " + testFile + " npmci_test_container:/npmci_test/test.sh");
|
|
npmci_bash_1.bashBare("docker commit npmci_test_container npmci_test_image");
|
|
npmci_bash_1.bashBare("docker run npmci_test_image sh /npmci_test/test.sh");
|
|
npmci_bash_1.bashBare("docker rm npmci_test_container");
|
|
npmci_bash_1.bashBare("docker rmi --force npmci_test_image");
|
|
}
|
|
else {
|
|
plugins.beautylog.warn("skipping tests for " + this.cleanTag + " because no testfile was found!");
|
|
}
|
|
}
|
|
;
|
|
/**
|
|
* gets the id of a Dockerfile
|
|
*/
|
|
getId() {
|
|
let containerId = npmci_bash_1.bashBare("docker inspect --type=image --format=\"{{.Id}}\" " + this.buildTag);
|
|
return containerId;
|
|
}
|
|
;
|
|
}
|
|
exports.Dockerfile = Dockerfile;
|
|
/**
|
|
*
|
|
*/
|
|
exports.dockerFileVersion = function (dockerfileNameArg) {
|
|
let versionString;
|
|
let versionRegex = /Dockerfile_([a-zA-Z0-9\.]*)$/;
|
|
let regexResultArray = versionRegex.exec(dockerfileNameArg);
|
|
if (regexResultArray && regexResultArray.length == 2) {
|
|
versionString = regexResultArray[1];
|
|
}
|
|
else {
|
|
versionString = "latest";
|
|
}
|
|
return versionString;
|
|
};
|
|
/**
|
|
*
|
|
*/
|
|
exports.dockerBaseImage = function (dockerfileContentArg) {
|
|
let baseImageRegex = /FROM\s([a-zA-z0-9\/\-\:]*)\n?/;
|
|
let regexResultArray = baseImageRegex.exec(dockerfileContentArg);
|
|
return regexResultArray[1];
|
|
};
|
|
/**
|
|
*
|
|
*/
|
|
exports.dockerTag = function (registryArg, repoArg, versionArg, suffixArg) {
|
|
let tagString;
|
|
let registry = registryArg;
|
|
let repo = repoArg;
|
|
let version = versionArg;
|
|
if (suffixArg) {
|
|
version = versionArg + "_" + suffixArg;
|
|
}
|
|
;
|
|
tagString = registry + "/" + repo + ":" + version;
|
|
return tagString;
|
|
};
|
|
/**
|
|
*
|
|
*/
|
|
exports.cleanTagsArrayFunction = function (dockerfileArrayArg, trackingArrayArg) {
|
|
let cleanTagsArray = [];
|
|
dockerfileArrayArg.forEach(function (dockerfileArg) {
|
|
if (trackingArrayArg.indexOf(dockerfileArg) == -1) {
|
|
cleanTagsArray.push(dockerfileArg.cleanTag);
|
|
}
|
|
});
|
|
return cleanTagsArray;
|
|
};
|
|
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibnBtY2kuYnVpbGQuZG9ja2VyLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vdHMvbnBtY2kuYnVpbGQuZG9ja2VyLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7QUFBQSxNQUFZLE9BQU8sV0FBTSxpQkFBaUIsQ0FBQyxDQUFBO0FBQzNDLE1BQVksS0FBSyxXQUFNLGVBQWUsQ0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