Jenkinsfile: run docker container and build
Project: http://git-wip-us.apache.org/repos/asf/logging-log4net/repo Commit: http://git-wip-us.apache.org/repos/asf/logging-log4net/commit/939deef8 Tree: http://git-wip-us.apache.org/repos/asf/logging-log4net/tree/939deef8 Diff: http://git-wip-us.apache.org/repos/asf/logging-log4net/diff/939deef8 Branch: refs/heads/develop Commit: 939deef8cafad43b9573ce584ae58b4dc93e7aa0 Parents: 64e8649 Author: Dominik Psenner <dpsen...@apache.org> Authored: Tue Jul 18 19:44:56 2017 +0200 Committer: Dominik Psenner <dpsen...@apache.org> Committed: Tue Jul 18 19:44:56 2017 +0200 ---------------------------------------------------------------------- Jenkinsfile | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/logging-log4net/blob/939deef8/Jenkinsfile ---------------------------------------------------------------------- diff --git a/Jenkinsfile b/Jenkinsfile index 36a2740..ad8029c 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -55,10 +55,17 @@ pipeline { echo "$JENKINS_GID" // build docker container - docker.build 'builder-netstandard:latest', "--build-arg JENKINS_UID=$JENKINS_UID --build-arg JENKINS_GID=$JENKINS_GID buildtools/docker/netstandard/" + def docker_container = docker.build 'builder-netstandard:latest', "-f buildtools/docker/netstandard/Dockerfile --build-arg JENKINS_UID=$JENKINS_UID --build-arg JENKINS_GID=$JENKINS_GID buildtools/docker/netstandard" // run docker container - // sh "docker run builder-netstandard:latest nant compile-netstandard" + docker_container.inside { + // compile + sh "nant compile-netstandard" + stash includes: 'bin/**/*.*', name: 'netstandard-assemblies' + + // test + sh 'cd netstandard/log4net.tests && dotnet test' + } }