You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@logging.apache.org by dp...@apache.org on 2017/08/18 08:47:09 UTC

logging-log4net git commit: Jenkinsfile: split up the netstandard stage into two

Repository: logging-log4net
Updated Branches:
  refs/heads/feature/netstandard-2.0 20cb82c49 -> e666d9ea6


Jenkinsfile: split up the netstandard stage into two

One stage does now build netstandard-1.3 and the other netstandard-2.0.


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

Branch: refs/heads/feature/netstandard-2.0
Commit: e666d9ea6d0cda486fdb718febb3a294366fc381
Parents: 20cb82c
Author: Dominik Psenner <dp...@apache.org>
Authored: Fri Aug 18 10:46:26 2017 +0200
Committer: Dominik Psenner <dp...@apache.org>
Committed: Fri Aug 18 10:46:26 2017 +0200

----------------------------------------------------------------------
 Jenkinsfile | 39 ++++++++++++++++++++++++++++++++++++---
 1 file changed, 36 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/logging-log4net/blob/e666d9ea/Jenkinsfile
----------------------------------------------------------------------
diff --git a/Jenkinsfile b/Jenkinsfile
index 0d9386e..3f6f1b9 100644
--- a/Jenkinsfile
+++ b/Jenkinsfile
@@ -37,7 +37,7 @@ pipeline {
 		}
 
 		// builds
-		stage('build netstandard') {
+		stage('build netstandard-1.3') {
 			steps {
 				script {
 					checkout scm
@@ -62,8 +62,40 @@ pipeline {
 					builder.inside {
 						// compile
 						sh "dotnet build src/log4net.csproj -c Release -f netstandard1.3 -o ../bin/netstandard1.3"
+						stash includes: 'bin/**/*.*', name: 'netstandard-1.3-assemblies'
+
+						// test
+						sh "dotnet test tests/src/log4net.Tests.csproj"
+					}
+				}
+			}
+		}
+		stage('build netstandard-2.0') {
+			steps {
+				script {
+					checkout scm
+					def builder_dir = "buildtools/docker/builder-netstandard"
+
+					// calculate args required to build the docker container
+					def JENKINS_UID = sh (
+						script: "stat -c \"%u\" $builder_dir",
+						returnStdout: true
+					).trim()
+					def JENKINS_GID = sh (
+						script: "stat -c \"%g\" $builder_dir",
+						returnStdout: true
+					).trim()
+					echo "$JENKINS_UID"
+					echo "$JENKINS_GID"
+
+					// build docker container
+					def builder = docker.build 'builder-netstandard:latest', "--file $builder_dir/Dockerfile --build-arg JENKINS_UID=$JENKINS_UID --build-arg JENKINS_GID=$JENKINS_GID $builder_dir"
+
+					// run docker container
+					builder.inside {
+						// compile
 						sh "dotnet build src/log4net.csproj -c Release -f netstandard2.0 -o ../bin/netstandard2.0"
-						stash includes: 'bin/**/*.*', name: 'netstandard-assemblies'
+						stash includes: 'bin/**/*.*', name: 'netstandard-2.0-assemblies'
 
 						// test
 						sh "dotnet test tests/src/log4net.Tests.csproj"
@@ -223,7 +255,8 @@ pipeline {
 					unstash 'mono-2.0-assemblies'
 					unstash 'mono-3.5-assemblies'
 					unstash 'mono-4.0-assemblies'
-					unstash 'netstandard-assemblies'
+					unstash 'netstandard-1.3-assemblies'
+					unstash 'netstandard-2.0-assemblies'
 
 					// unstash test results
 					unstash 'net-3.5-testresults'