Hi, it seems I can't get this to be working. The problems are mainly two:
1. nant runs nunit and outputs the xml in nunit format which jenkins can't parse; it would be necessary to XSL transform the xml into junit format :-( 2. since tests fail, nant always exits with code 1 and I can't get jenkins to ignore that exit code and parse the test results. With this it is impossible to understand what test breaks and what's going on. I see two options: 1. migrate (rewrite from scratch) and use cake to script the build process; this would further allow us to run the tests with code overage, restore the dependencies in an automated way (and not downloading nunit at hand) and a few other things. BUT it is a lot of work.. 2. Somehow hack it that it works. Ideas? please note further that net-4.5 tests appear to constantly fail. is log4net broken for the net-4.5 target? Cheers, Dominik 2017-07-04 20:04 GMT+02:00 Apache Jenkins Server <[email protected]> : > See <https://builds.apache.org/job/logging-log4net/job/ > feature%252Fcd-pipeline/44/display/redirect> > > ------------------------------------------ > [...truncated 63.22 KB...] > compile-net-4.5-current-configuration: > > > check-bin-dir: > > [mkdir] Creating directory 'f:\jenkins\jenkins-slave\ > workspace\log4net_feature_cd-pipeline-76KUCPODUF6LCE45226EBUR4GNVLYP > MYVC23Z4ITBOMNJT3CA2WA\bin'. > > check-doc-dir: > > [mkdir] Creating directory 'f:\jenkins\jenkins-slave\ > workspace\log4net_feature_cd-pipeline-76KUCPODUF6LCE45226EBUR4GNVLYP > MYVC23Z4ITBOMNJT3CA2WA\doc'. > > check-sdkdoc-dir: > > > check-sdkdoc-debug: > > > check-current-build-config: > > > check-build-debug: > > > check-build-defines: > > > set-net-4.5-runtime-configuration: > > > check-log4net-basedir: > > > check-current-bin-dir: > > [mkdir] Creating directory 'f:\jenkins\jenkins-slave\ > workspace\log4net_feature_cd-pipeline-76KUCPODUF6LCE45226EBUR4GNVLYP > MYVC23Z4ITBOMNJT3CA2WA\bin\net\4.5\debug'. > > clean-current-bin-dir: > > [echo] Cleaning the bin/net/4.5/debug binaries directory. > [delete] Deleting directory 'f:\jenkins\jenkins-slave\ > workspace\log4net_feature_cd-pipeline-76KUCPODUF6LCE45226EBUR4GNVLYP > MYVC23Z4ITBOMNJT3CA2WA\bin\net\4.5\debug'. > [mkdir] Creating directory 'f:\jenkins\jenkins-slave\ > workspace\log4net_feature_cd-pipeline-76KUCPODUF6LCE45226EBUR4GNVLYP > MYVC23Z4ITBOMNJT3CA2WA\bin\net\4.5\debug'. > [csc] Compiling 226 files to 'f:\jenkins\jenkins-slave\ > workspace\log4net_feature_cd-pipeline-76KUCPODUF6LCE45226EBUR4GNVLYP > MYVC23Z4ITBOMNJT3CA2WA\bin\net\4.5\debug\log4net.dll'. > > set-release-build-configuration: > > > check-current-build-config: > > > set-build-configuration-flags: > > > compile-net-4.5-current-configuration: > > > check-bin-dir: > > > check-doc-dir: > > > check-sdkdoc-dir: > > > check-sdkdoc-debug: > > > check-current-build-config: > > > check-build-debug: > > > check-build-defines: > > > set-net-4.5-runtime-configuration: > > > check-log4net-basedir: > > > check-current-bin-dir: > > [mkdir] Creating directory 'f:\jenkins\jenkins-slave\ > workspace\log4net_feature_cd-pipeline-76KUCPODUF6LCE45226EBUR4GNVLYP > MYVC23Z4ITBOMNJT3CA2WA\bin\net\4.5\release'. > > clean-current-bin-dir: > > [echo] Cleaning the bin/net/4.5/release binaries directory. > [delete] Deleting directory 'f:\jenkins\jenkins-slave\ > workspace\log4net_feature_cd-pipeline-76KUCPODUF6LCE45226EBUR4GNVLYP > MYVC23Z4ITBOMNJT3CA2WA\bin\net\4.5\release'. > [mkdir] Creating directory 'f:\jenkins\jenkins-slave\ > workspace\log4net_feature_cd-pipeline-76KUCPODUF6LCE45226EBUR4GNVLYP > MYVC23Z4ITBOMNJT3CA2WA\bin\net\4.5\release'. > [echo] Old key file not found. > [echo] The release build using the old key will be skipped. > [csc] Compiling 226 files to 'f:\jenkins\jenkins-slave\ > workspace\log4net_feature_cd-pipeline-76KUCPODUF6LCE45226EBUR4GNVLYP > MYVC23Z4ITBOMNJT3CA2WA\bin\net\4.5\release\log4net.dll'. > > BUILD SUCCEEDED > > Total time: 2.4 seconds. > > [Pipeline] stash > Stashed 6 file(s) > [Pipeline] bat > [log4net_feature_cd-pipeline-76KUCPODUF6LCE45226EBUR4GNVLYPMYVC23Z4ITBOMNJT3CA2WA] > Running batch script > > f:\jenkins\jenkins-slave\workspace\log4net_feature_cd-pipeline- > 76KUCPODUF6LCE45226EBUR4GNVLYPMYVC23Z4ITBOMNJT3CA2WA>F:\ > jenkins\tools\nant\nant-0.92\bin\NAnt.exe -t:net-4.0 > -buildfile:tests/nant.build runtests-net-4.5 && exit /B 0 > NAnt 0.92 (Build 0.92.4543.0; release; 6/9/2012) > Copyright (C) 2001-2012 Gerry Shaw > http://nant.sourceforge.net > > Buildfile: file:///f:/jenkins/jenkins-slave/workspace/log4net_ > feature_cd-pipeline-76KUCPODUF6LCE45226EBUR4GNVLYP > MYVC23Z4ITBOMNJT3CA2WA/tests/nant.build > Target framework: Microsoft .NET Framework 4.0 > Target(s) specified: runtests-net-4.5 > > > check-current-build-config: > > > set-build-configuration: > > > set-debug-build-configuration: > > > check-current-build-config: > > > set-build-configuration-flags: > > > check-bin-dir: > > [mkdir] Creating directory 'f:\jenkins\jenkins-slave\ > workspace\log4net_feature_cd-pipeline-76KUCPODUF6LCE45226EBUR4GNVLYP > MYVC23Z4ITBOMNJT3CA2WA\tests\bin'. > > check-doc-dir: > > [mkdir] Creating directory 'f:\jenkins\jenkins-slave\ > workspace\log4net_feature_cd-pipeline-76KUCPODUF6LCE45226EBUR4GNVLYP > MYVC23Z4ITBOMNJT3CA2WA\tests\doc'. > > check-sdkdoc-dir: > > > check-sdkdoc-debug: > > > check-build-debug: > > > check-build-defines: > > > set-net-4.5-runtime-configuration: > > > check-log4net-basedir: > > > check-current-bin-dir: > > [mkdir] Creating directory 'f:\jenkins\jenkins-slave\ > workspace\log4net_feature_cd-pipeline-76KUCPODUF6LCE45226EBUR4GNVLYP > MYVC23Z4ITBOMNJT3CA2WA\tests\bin\net\4.5\debug'. > > clean-current-bin-dir: > > [echo] Cleaning the bin/net/4.5/debug binaries directory. > [delete] Deleting directory 'f:\jenkins\jenkins-slave\ > workspace\log4net_feature_cd-pipeline-76KUCPODUF6LCE45226EBUR4GNVLYP > MYVC23Z4ITBOMNJT3CA2WA\tests\bin\net\4.5\debug'. > [mkdir] Creating directory 'f:\jenkins\jenkins-slave\ > workspace\log4net_feature_cd-pipeline-76KUCPODUF6LCE45226EBUR4GNVLYP > MYVC23Z4ITBOMNJT3CA2WA\tests\bin\net\4.5\debug'. > > check-log4net-output-dir: > > > check-log4net-assembly: > > [echo] Testing if file exists: ..//bin/net/4.5/debug\log4net.dll > > install-nunit: > > [get] Retrieving 'https://github.com/nunit/ > nunitv2/releases/download/2.6.4/NUnit-2.6.4.zip' to > 'C:\Users\jenkins\AppData\Local\Microsoft\Windows\INetCache\nunit.zip'. > [unzip] Unzipping > 'C:\Users\jenkins\AppData\Local\Microsoft\Windows\INetCache\nunit.zip' > to 'C:\Users\jenkins\AppData\Local\Microsoft\Windows\INetCache\nunit.tmp'. > [copy] Copying 1 file to 'f:\jenkins\jenkins-slave\ > workspace\log4net_feature_cd-pipeline-76KUCPODUF6LCE45226EBUR4GNVLYP > MYVC23Z4ITBOMNJT3CA2WA\tests\lib\net\4.5\debug'. > > compile-net-4.5: > > [copy] Copying 3 files to 'f:\jenkins\jenkins-slave\ > workspace\log4net_feature_cd-pipeline-76KUCPODUF6LCE45226EBUR4GNVLYP > MYVC23Z4ITBOMNJT3CA2WA\tests\bin\net\4.5\debug'. > [copy] Copying 1 file to 'f:\jenkins\jenkins-slave\ > workspace\log4net_feature_cd-pipeline-76KUCPODUF6LCE45226EBUR4GNVLYP > MYVC23Z4ITBOMNJT3CA2WA\tests\bin\net\4.5\debug'. > [csc] Compiling 46 files to 'f:\jenkins\jenkins-slave\ > workspace\log4net_feature_cd-pipeline-76KUCPODUF6LCE45226EBUR4GNVLYP > MYVC23Z4ITBOMNJT3CA2WA\tests\bin\net\4.5\debug\log4net.Tests.dll'. > > runtests-net-4.5: > > [nunit2] log4net:WARN Exception while rendering format [IGNORE THIS > WARNING - EXCEPTION EXPECTED Before {0} After {1} {2}] > [nunit2] System.FormatException: Index (zero based) must be greater > than or equal to zero and less than the size of the argument list. > [nunit2] at System.Text.StringBuilder.AppendFormatHelper(IFormatProvider > provider, String format, ParamsArray args) > [nunit2] at System.String.FormatHelper(IFormatProvider provider, > String format, ParamsArray args) > [nunit2] at System.String.Format(IFormatProvider provider, String > format, Object[] args) > [nunit2] at log4net.Util.SystemStringFormat.StringFormat(IFormatProvider > provider, String format, Object[] args) in f:\jenkins\jenkins-slave\ > workspace\log4net_feature_cd-pipeline-76KUCPODUF6LCE45226EBUR4GNVLYP > MYVC23Z4ITBOMNJT3CA2WA\src\Util\SystemStringFormat.cs:line 105 > [nunit2] log4net:ERROR Hello > [nunit2] log4net:ERROR World > [nunit2] log4net:ERROR This will be recorded. > [nunit2] log4net:ERROR This will be recorded. > [nunit2] > > BUILD FAILED > > f:\jenkins\jenkins-slave\workspace\log4net_feature_cd-pipeline- > 76KUCPODUF6LCE45226EBUR4GNVLYPMYVC23Z4ITBOMNJT3CA2WA\tests\ > nant.build(861,10): > Tests Failed. > > Total time: 22.8 seconds. > > [Pipeline] } > [Pipeline] // withEnv > [Pipeline] } > [Pipeline] // node > [Pipeline] } > [Pipeline] // stage > [Pipeline] stage > [Pipeline] { (build mono-2.0) > Stage 'build mono-2.0' skipped due to earlier failure(s) > [Pipeline] } > [Pipeline] // stage > [Pipeline] stage > [Pipeline] { (build mono-3.5) > Stage 'build mono-3.5' skipped due to earlier failure(s) > [Pipeline] } > [Pipeline] // stage > [Pipeline] stage > [Pipeline] { (build mono-4.0) > Stage 'build mono-4.0' skipped due to earlier failure(s) > [Pipeline] } > [Pipeline] // stage > [Pipeline] stage > [Pipeline] { (build netstandard) > Stage 'build netstandard' skipped due to earlier failure(s) > [Pipeline] } > [Pipeline] // stage > [Pipeline] stage > [Pipeline] { (build site) > Stage 'build site' skipped due to earlier failure(s) > [Pipeline] } > [Pipeline] // stage > [Pipeline] stage > [Pipeline] { (prepare package) > Stage 'prepare package' skipped due to earlier failure(s) > [Pipeline] } > [Pipeline] // stage > [Pipeline] stage > [Pipeline] { (publish site) > Stage 'publish site' skipped due to earlier failure(s) > [Pipeline] } > [Pipeline] // stage > [Pipeline] stage > [Pipeline] { (Declarative: Post Actions) > [Pipeline] step > -- Dominik Psenner
