Repository: logging-log4net
Updated Branches:
  refs/heads/feature/cd-pipeline fd7c10d6a -> b38985eb7


builder-netstandard: attempt to build the docker container manually


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

Branch: refs/heads/feature/cd-pipeline
Commit: b38985eb77e24e812a014d0338c84de3cb2db42d
Parents: fd7c10d
Author: Dominik Psenner <dpsen...@apache.org>
Authored: Tue Jul 18 18:11:36 2017 +0200
Committer: Dominik Psenner <dpsen...@apache.org>
Committed: Tue Jul 18 18:11:36 2017 +0200

----------------------------------------------------------------------
 Jenkinsfile                                     | 38 ++++++++++++--------
 .../docker/builder-netstandard/Dockerfile       |  4 +--
 2 files changed, 25 insertions(+), 17 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/logging-log4net/blob/b38985eb/Jenkinsfile
----------------------------------------------------------------------
diff --git a/Jenkinsfile b/Jenkinsfile
index 10ce384..e833a45 100644
--- a/Jenkinsfile
+++ b/Jenkinsfile
@@ -27,20 +27,12 @@ pipeline {
        agent {
                label 'ubuntu'
        }
-       environment {
-               JENKINS_UID = "null"
-               JENKINS_GID = "null"
-       }
        stages {
                // prepare node for builds
                stage('checkout') {
                        steps {
                                deleteDir()
                                checkout scm
-                               sh '''
-                                       export JENKINS_UID=`stat -c "%u" .`
-                                       export JENKINS_GID=`stat -c "%g" .`
-                               '''
                        }
                }
 
@@ -53,17 +45,33 @@ pipeline {
                                }
                        }
                        steps {
-                               sh 'echo ${JENKINS_UID}'
-                               sh 'echo ${JENKINS_GID}'
+                               script {
+                                       checkout scm
+
+                                       // calculate args required to build the 
docker container
+                                       def JENKINS_UID = sh (
+                                               script: 'stat -c "%u" .',
+                                               returnStdout: true
+                                       ).trim()
+                                       def JENKINS_GID = sh (
+                                               script: 'stat -c "%g" .',
+                                               returnStdout: true
+                                       ).trim()
+
+                                       // build docker container
+                                       docker.build 
'builder-netstandard:latest', "-f 
buildtools/docker/builder-netstandard/Dockerfile --build-arg 
JENKINS_UID=$JENKINS_UID --build-arg JENKINS_GID=$JENKINS_GID"
+
+                                       // run docker container
+                                       // sh "docker run 
builder-netstandard:latest nant compile-netstandard"
+                               }
 
-                               checkout scm
 
                                // compile 
-                               sh 'nant compile-netstandard'
-                               stash includes: 'bin/**/*.*', name: 
'netstandard-assemblies'
+                               // sh 'nant compile-netstandard'
+                               // stash includes: 'bin/**/*.*', name: 
'netstandard-assemblies'
 
                                // test
-                               sh 'cd netstandard/log4net.tests && dotnet test'
+                               // sh 'cd netstandard/log4net.tests && dotnet 
test'
                        }
                }
                stage('build net-3.5') {
@@ -218,7 +226,7 @@ pipeline {
                                        unstash 'mono-2.0-assemblies'
                                        unstash 'mono-3.5-assemblies'
                                        unstash 'mono-4.0-assemblies'
-                                       unstash 'netstandard-assemblies'
+                                       // unstash 'netstandard-assemblies'
 
                                        // unstash test results
                                        unstash 'net-3.5-testresults'

http://git-wip-us.apache.org/repos/asf/logging-log4net/blob/b38985eb/buildtools/docker/builder-netstandard/Dockerfile
----------------------------------------------------------------------
diff --git a/buildtools/docker/builder-netstandard/Dockerfile 
b/buildtools/docker/builder-netstandard/Dockerfile
index 2c5f9dc..2dc5f54 100644
--- a/buildtools/docker/builder-netstandard/Dockerfile
+++ b/buildtools/docker/builder-netstandard/Dockerfile
@@ -2,8 +2,8 @@
 FROM microsoft/dotnet
 
 # define arguments passed in as environment variables
-ENV JENKINS_UID
-ENV JENKINS_GID
+ARG JENKINS_UID
+ARG JENKINS_GID
 
 # set the maintainer of this docker image
 MAINTAINER "d...@logging.apache.org"

Reply via email to