-
-
Save suya55/06f9ed70d75767218284bf27fbf34ec6 to your computer and use it in GitHub Desktop.
Revisions
-
rhuss revised this gist
Jul 16, 2015 . 1 changed file with 2 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -13,8 +13,8 @@ def exec(cmd) { [ "mkdir /tmp/,x", "echo FROM busybox > /tmp/,x/Dockerfile", "DOCKER_HOST=tcp://localhost:2375 docker build -t test/test:1.0 /tmp/,x", "DOCKER_HOST=tcp://localhost:2375 docker push --force=true test/test:1.0", "rm /tmp/,x/Dockerfile", "rmdir /tmp/,x", "DOCKER_HOST=tcp://localhost:2375 docker rmi test/test:1.0" -
rhuss renamed this gist
Jul 16, 2015 . 1 changed file with 0 additions and 0 deletions.There are no files selected for viewing
File renamed without changes. -
rhuss renamed this gist
Jul 16, 2015 . 1 changed file with 3 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -4,6 +4,7 @@ def exec(cmd) { .directory(new File("/tmp")) .redirectErrorStream(true) .start() process.outputStream.close() process.inputStream.eachLine {println it} process.waitFor(); return process.exitValue() @@ -12,8 +13,8 @@ def exec(cmd) { [ "mkdir /tmp/,x", "echo FROM busybox > /tmp/,x/Dockerfile", "DOCKER_HOST=tcp://localhost:2375 docker build -t fabric8/test:1.0 /tmp/,x", "DOCKER_HOST=tcp://localhost:2375 docker push --force=true fabric8/test:1.0", "rm /tmp/,x/Dockerfile", "rmdir /tmp/,x", "DOCKER_HOST=tcp://localhost:2375 docker rmi test/test:1.0" -
rhuss revised this gist
Jul 16, 2015 . 1 changed file with 5 additions and 13 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,6 +1,6 @@ def exec(cmd) { println cmd def process = new ProcessBuilder([ "sh", "-c", cmd]) .directory(new File("/tmp")) .redirectErrorStream(true) .start() @@ -9,14 +9,6 @@ private def executeOnShell(String command) { return process.exitValue() } [ "mkdir /tmp/,x", "echo FROM busybox > /tmp/,x/Dockerfile", @@ -26,5 +18,5 @@ private def addShellPrefix(String command) { "rmdir /tmp/,x", "DOCKER_HOST=tcp://localhost:2375 docker rmi test/test:1.0" ].each { exec(it) } -
rhuss created this gist
Jul 16, 2015 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,30 @@ private def executeOnShell(String command) { println command def process = new ProcessBuilder(addShellPrefix(command)) .directory(new File("/tmp")) .redirectErrorStream(true) .start() process.inputStream.eachLine {println it} process.waitFor(); return process.exitValue() } private def addShellPrefix(String command) { commandArray = new String[3] commandArray[0] = "sh" commandArray[1] = "-c" commandArray[2] = command return commandArray } [ "mkdir /tmp/,x", "echo FROM busybox > /tmp/,x/Dockerfile", "DOCKER_HOST=tcp://localhost:2375 docker build -t test/test:1.0 /tmp/,x", "DOCKER_HOST=tcp://localhost:2375 docker push test/test:1.0", "rm /tmp/,x/Dockerfile", "rmdir /tmp/,x", "DOCKER_HOST=tcp://localhost:2375 docker rmi test/test:1.0" ].each { executeOnShell(it) }