Compare commits
9 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| f510277c16 | |||
| 2d61640c91 | |||
| e4507b7073 | |||
| 0acb6ad351 | |||
| c33e0c622b | |||
| 5085e86c9b | |||
| 3ea8265a75 | |||
| d7e4efc2c0 | |||
| 7ca0171658 |
10
dist/npmci.build.docker.js
vendored
10
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.37",
|
||||
"version": "2.1.40",
|
||||
"description": "",
|
||||
"main": "dist/index.js",
|
||||
"bin": {
|
||||
|
||||
3
test/assets/test/test_latest.sh
Normal file → Executable file
3
test/assets/test/test_latest.sh
Normal file → Executable file
@@ -0,0 +1,3 @@
|
||||
#!/bin/sh
|
||||
npm -v
|
||||
node -v
|
||||
@@ -147,6 +147,7 @@ export class Dockerfile {
|
||||
this.localBaseImageDependent = false;
|
||||
};
|
||||
build(){
|
||||
plugins.beautylog.info("now building Dockerfile for " + this.cleanTag);
|
||||
let done = plugins.q.defer();
|
||||
this.patchContents();
|
||||
bashBare("docker build -t " + this.buildTag + " -f " + this.filePath + " .");
|
||||
@@ -174,8 +175,8 @@ export class Dockerfile {
|
||||
);
|
||||
if(testExists){
|
||||
bashBare("docker run -v " +
|
||||
plugins.path.join(paths.NpmciProjectDir,"./test") + ":/test/ " +
|
||||
"--name " + this.containerName + " /test/" + "test_" + this.version + ".sh");
|
||||
plugins.path.join(paths.NpmciProjectDir,"./test/") + ":/test/ " +
|
||||
"--name " + this.containerName + " " + this.buildTag + " /test/" + "test_" + this.version + ".sh");
|
||||
} else {
|
||||
plugins.beautylog.warn("skipping tests for " + this.cleanTag + " because no testfile was found!");
|
||||
}
|
||||
@@ -185,12 +186,13 @@ export class Dockerfile {
|
||||
bashBare("docker push " + this.releaseTag);
|
||||
}
|
||||
getId(){
|
||||
let containerId = bashBare("docker inspect --format=\"{{.Id}}\" " + this.buildTag);
|
||||
let containerId = bashBare("docker inspect --type=image --format=\"{{.Id}}\" " + this.buildTag);
|
||||
return containerId;
|
||||
};
|
||||
patchContents(){
|
||||
let done = plugins.q.defer();
|
||||
if(this.localBaseImageDependent == true){
|
||||
plugins.beautylog.info("patching Dockerfile due to local build dependency!");
|
||||
this.patchedContent = this.content.replace(/FROM\s[a-zA-Z0-9\/\-\:]*/, 'FROM ' + this.localBaseDockerfile.buildTag);
|
||||
plugins.smartfile.memory.toFsSync(
|
||||
this.patchedContent,
|
||||
|
||||
Reference in New Issue
Block a user