Jenkinsfile: attempt to build a nant docker image on the fly

Project: http://git-wip-us.apache.org/repos/asf/logging-log4net/repo
Commit: http://git-wip-us.apache.org/repos/asf/logging-log4net/commit/8f471551
Tree: http://git-wip-us.apache.org/repos/asf/logging-log4net/tree/8f471551
Diff: http://git-wip-us.apache.org/repos/asf/logging-log4net/diff/8f471551

Branch: refs/heads/develop
Commit: 8f4715519a538646c840135dbf3aaf2eafdcec7e
Parents: 5373f00
Author: Dominik Psenner <[email protected]>
Authored: Sun Jul 2 17:39:28 2017 +0200
Committer: Dominik Psenner <[email protected]>
Committed: Sun Jul 2 17:39:28 2017 +0200

----------------------------------------------------------------------
 Jenkinsfile                       | 11 ++++-------
 buildtools/docker/nant/Dockerfile |  9 +++++++++
 2 files changed, 13 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/logging-log4net/blob/8f471551/Jenkinsfile
----------------------------------------------------------------------
diff --git a/Jenkinsfile b/Jenkinsfile
index e94cf06..05858db 100644
--- a/Jenkinsfile
+++ b/Jenkinsfile
@@ -42,14 +42,11 @@ pipeline {
                        }
                }
                stage('Build on ubuntu') {
-                       agent {
-                               docker {
-                                       image 'ubuntu:latest'
-                               }
-                       }
+                       agent { label 'ubuntu' }
                        steps {
-                               sh "sudo apt-get install -y nant"
-                               sh "nant -buildfile:log4net.build"
+                               
docker.build("buildtools/docker/nant/").inside() {
+                                       sh "nant -buildfile:log4net.build"
+                               }
                        }
                }
                stage('Test on Windows') {

http://git-wip-us.apache.org/repos/asf/logging-log4net/blob/8f471551/buildtools/docker/nant/Dockerfile
----------------------------------------------------------------------
diff --git a/buildtools/docker/nant/Dockerfile 
b/buildtools/docker/nant/Dockerfile
new file mode 100644
index 0000000..593beef
--- /dev/null
+++ b/buildtools/docker/nant/Dockerfile
@@ -0,0 +1,9 @@
+# base it on ubuntu:latest
+from ubuntu:latest
+
+# set the maintainer of this docker image
+LABEL maintainer "[email protected]"
+
+# install nant
+RUN apt-get update && apt-get install -y nant
+

Reply via email to