Repository: logging-log4net Updated Branches: refs/heads/feature/cd-pipeline 309318281 -> a4413073a
This is yet another try to get build netstandard Project: http://git-wip-us.apache.org/repos/asf/logging-log4net/repo Commit: http://git-wip-us.apache.org/repos/asf/logging-log4net/commit/a4413073 Tree: http://git-wip-us.apache.org/repos/asf/logging-log4net/tree/a4413073 Diff: http://git-wip-us.apache.org/repos/asf/logging-log4net/diff/a4413073 Branch: refs/heads/feature/cd-pipeline Commit: a4413073a75c3b88392358c7b14cea723b3eb750 Parents: 3093182 Author: Dominik Psenner <dpsen...@apache.org> Authored: Sat Jul 8 11:26:27 2017 +0200 Committer: Dominik Psenner <dpsen...@apache.org> Committed: Sat Jul 8 11:26:27 2017 +0200 ---------------------------------------------------------------------- .gitignore | 1 + buildtools/docker/build-builder-mono-2.0.sh | 12 ++++++++++++ buildtools/docker/build-builder-mono-3.5.sh | 12 ++++++++++++ buildtools/docker/build-builder-mono-4.0.sh | 12 ++++++++++++ buildtools/docker/build-builder-netstandard.sh | 12 ++++++++++++ buildtools/docker/builder-netstandard/Dockerfile | 17 +++++++++++++++++ .../docker/builder-netstandard/entrypoint.sh | 8 ++++++++ buildtools/docker/run-builder-mono-2.0.sh | 12 ++++++++++++ buildtools/docker/run-builder-mono-3.5.sh | 12 ++++++++++++ buildtools/docker/run-builder-mono-4.0.sh | 12 ++++++++++++ buildtools/docker/run-builder-netstandard.sh | 18 ++++++++++++++++++ buildtools/docker/run.sh | 17 +++++++++++++++++ log4net.build | 5 ++--- netstandard/NuGet.Config | 7 ------- 14 files changed, 147 insertions(+), 10 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/logging-log4net/blob/a4413073/.gitignore ---------------------------------------------------------------------- diff --git a/.gitignore b/.gitignore index 0149163..6c925f2 100644 --- a/.gitignore +++ b/.gitignore @@ -235,3 +235,4 @@ target # other files to ignore old-log4net.snk src/GeneratedAssemblyInfo.cs + http://git-wip-us.apache.org/repos/asf/logging-log4net/blob/a4413073/buildtools/docker/build-builder-mono-2.0.sh ---------------------------------------------------------------------- diff --git a/buildtools/docker/build-builder-mono-2.0.sh b/buildtools/docker/build-builder-mono-2.0.sh new file mode 100755 index 0000000..89433a5 --- /dev/null +++ b/buildtools/docker/build-builder-mono-2.0.sh @@ -0,0 +1,12 @@ +#!/bin/bash + +MY_PATH="`dirname \"$0\"`" # relative +MY_PATH="`( cd \"$MY_PATH\" && pwd )`" # absolutized and normalized +if [ -z "$MY_PATH" ] ; then + # error; for some reason, the path is not accessible + # to the script (e.g. permissions re-evaled after suid) + exit 1 # fail +fi + +$MY_PATH/build.sh "builder-mono-2.0" + http://git-wip-us.apache.org/repos/asf/logging-log4net/blob/a4413073/buildtools/docker/build-builder-mono-3.5.sh ---------------------------------------------------------------------- diff --git a/buildtools/docker/build-builder-mono-3.5.sh b/buildtools/docker/build-builder-mono-3.5.sh new file mode 100755 index 0000000..6d5b311 --- /dev/null +++ b/buildtools/docker/build-builder-mono-3.5.sh @@ -0,0 +1,12 @@ +#!/bin/bash + +MY_PATH="`dirname \"$0\"`" # relative +MY_PATH="`( cd \"$MY_PATH\" && pwd )`" # absolutized and normalized +if [ -z "$MY_PATH" ] ; then + # error; for some reason, the path is not accessible + # to the script (e.g. permissions re-evaled after suid) + exit 1 # fail +fi + +$MY_PATH/build.sh "builder-mono-3.5" + http://git-wip-us.apache.org/repos/asf/logging-log4net/blob/a4413073/buildtools/docker/build-builder-mono-4.0.sh ---------------------------------------------------------------------- diff --git a/buildtools/docker/build-builder-mono-4.0.sh b/buildtools/docker/build-builder-mono-4.0.sh new file mode 100755 index 0000000..b4fb616 --- /dev/null +++ b/buildtools/docker/build-builder-mono-4.0.sh @@ -0,0 +1,12 @@ +#!/bin/bash + +MY_PATH="`dirname \"$0\"`" # relative +MY_PATH="`( cd \"$MY_PATH\" && pwd )`" # absolutized and normalized +if [ -z "$MY_PATH" ] ; then + # error; for some reason, the path is not accessible + # to the script (e.g. permissions re-evaled after suid) + exit 1 # fail +fi + +$MY_PATH/build.sh "builder-mono-4.0" + http://git-wip-us.apache.org/repos/asf/logging-log4net/blob/a4413073/buildtools/docker/build-builder-netstandard.sh ---------------------------------------------------------------------- diff --git a/buildtools/docker/build-builder-netstandard.sh b/buildtools/docker/build-builder-netstandard.sh new file mode 100755 index 0000000..79c9fb3 --- /dev/null +++ b/buildtools/docker/build-builder-netstandard.sh @@ -0,0 +1,12 @@ +#!/bin/bash + +MY_PATH="`dirname \"$0\"`" # relative +MY_PATH="`( cd \"$MY_PATH\" && pwd )`" # absolutized and normalized +if [ -z "$MY_PATH" ] ; then + # error; for some reason, the path is not accessible + # to the script (e.g. permissions re-evaled after suid) + exit 1 # fail +fi + +$MY_PATH/build.sh "builder-netstandard" + http://git-wip-us.apache.org/repos/asf/logging-log4net/blob/a4413073/buildtools/docker/builder-netstandard/Dockerfile ---------------------------------------------------------------------- diff --git a/buildtools/docker/builder-netstandard/Dockerfile b/buildtools/docker/builder-netstandard/Dockerfile index 5b13c07..afe284f 100644 --- a/buildtools/docker/builder-netstandard/Dockerfile +++ b/buildtools/docker/builder-netstandard/Dockerfile @@ -7,3 +7,20 @@ MAINTAINER "d...@logging.apache.org" # install dependencies RUN apt-get update && apt-get install -y nant git +# install gosu +# entrypoint.sh requires this tool +RUN apt-get update && apt-get -y --no-install-recommends install \ + ca-certificates \ + curl +#RUN curl -o /usr/local/bin/gosu -SL "https://github.com/tianon/gosu/releases/download/1.4/gosu-$(dpkg --print-architecture)" \ +# && curl -o /usr/local/bin/gosu.asc -SL "https://github.com/tianon/gosu/releases/download/1.4/gosu-$(dpkg --print-architecture).asc" \ +# && gpg --verify /usr/local/bin/gosu.asc \ +# && rm /usr/local/bin/gosu.asc \ +# && chmod +x /usr/local/bin/gosu +RUN curl -o /usr/local/bin/gosu -SL "https://github.com/tianon/gosu/releases/download/1.4/gosu-$(dpkg --print-architecture)" \ + && chmod +x /usr/local/bin/gosu + +# set up an entry point for the image that allows customization +# before anything else is run on the container +COPY entrypoint.sh /usr/local/bin/entrypoint.sh +ENTRYPOINT ["/usr/local/bin/entrypoint.sh"] http://git-wip-us.apache.org/repos/asf/logging-log4net/blob/a4413073/buildtools/docker/builder-netstandard/entrypoint.sh ---------------------------------------------------------------------- diff --git a/buildtools/docker/builder-netstandard/entrypoint.sh b/buildtools/docker/builder-netstandard/entrypoint.sh new file mode 100755 index 0000000..8710ab5 --- /dev/null +++ b/buildtools/docker/builder-netstandard/entrypoint.sh @@ -0,0 +1,8 @@ +#!/bin/bash +USER_ID=${UID:-9001} + +echo "Setting up user 'user' that maps to uid $USER_ID" +useradd --shell /bin/bash -u $USER_ID -o -c "" -m user +export HOME=/home/user + +exec /usr/local/bin/gosu user "$@" http://git-wip-us.apache.org/repos/asf/logging-log4net/blob/a4413073/buildtools/docker/run-builder-mono-2.0.sh ---------------------------------------------------------------------- diff --git a/buildtools/docker/run-builder-mono-2.0.sh b/buildtools/docker/run-builder-mono-2.0.sh new file mode 100755 index 0000000..348d5ea --- /dev/null +++ b/buildtools/docker/run-builder-mono-2.0.sh @@ -0,0 +1,12 @@ +#!/bin/bash + +MY_PATH="`dirname \"$0\"`" # relative +MY_PATH="`( cd \"$MY_PATH\" && pwd )`" # absolutized and normalized +if [ -z "$MY_PATH" ] ; then + # error; for some reason, the path is not accessible + # to the script (e.g. permissions re-evaled after suid) + exit 1 # fail +fi + +$MY_PATH/run.sh "builder-mono-2.0" + http://git-wip-us.apache.org/repos/asf/logging-log4net/blob/a4413073/buildtools/docker/run-builder-mono-3.5.sh ---------------------------------------------------------------------- diff --git a/buildtools/docker/run-builder-mono-3.5.sh b/buildtools/docker/run-builder-mono-3.5.sh new file mode 100755 index 0000000..4ecc006 --- /dev/null +++ b/buildtools/docker/run-builder-mono-3.5.sh @@ -0,0 +1,12 @@ +#!/bin/bash + +MY_PATH="`dirname \"$0\"`" # relative +MY_PATH="`( cd \"$MY_PATH\" && pwd )`" # absolutized and normalized +if [ -z "$MY_PATH" ] ; then + # error; for some reason, the path is not accessible + # to the script (e.g. permissions re-evaled after suid) + exit 1 # fail +fi + +$MY_PATH/run.sh "builder-mono-3.5" + http://git-wip-us.apache.org/repos/asf/logging-log4net/blob/a4413073/buildtools/docker/run-builder-mono-4.0.sh ---------------------------------------------------------------------- diff --git a/buildtools/docker/run-builder-mono-4.0.sh b/buildtools/docker/run-builder-mono-4.0.sh new file mode 100755 index 0000000..a9153b7 --- /dev/null +++ b/buildtools/docker/run-builder-mono-4.0.sh @@ -0,0 +1,12 @@ +#!/bin/bash + +MY_PATH="`dirname \"$0\"`" # relative +MY_PATH="`( cd \"$MY_PATH\" && pwd )`" # absolutized and normalized +if [ -z "$MY_PATH" ] ; then + # error; for some reason, the path is not accessible + # to the script (e.g. permissions re-evaled after suid) + exit 1 # fail +fi + +$MY_PATH/run.sh "builder-mono-4.0" + http://git-wip-us.apache.org/repos/asf/logging-log4net/blob/a4413073/buildtools/docker/run-builder-netstandard.sh ---------------------------------------------------------------------- diff --git a/buildtools/docker/run-builder-netstandard.sh b/buildtools/docker/run-builder-netstandard.sh new file mode 100755 index 0000000..e3d2794 --- /dev/null +++ b/buildtools/docker/run-builder-netstandard.sh @@ -0,0 +1,18 @@ +#!/bin/bash + +MY_PATH="`dirname \"$0\"`" # relative +MY_PATH="`( cd \"$MY_PATH\" && pwd )`" # absolutized and normalized +if [ -z "$MY_PATH" ] ; then + # error; for some reason, the path is not accessible + # to the script (e.g. permissions re-evaled after suid) + echo "Path is not accessible to the script" + exit 1 # fail +fi + +WORKING_DIR="$1" +if [ -z "$WORKING_DIR" ]; then + WORKING_DIR=$(pwd) +fi + +$MY_PATH/run.sh "builder-netstandard" $WORKING_DIR + http://git-wip-us.apache.org/repos/asf/logging-log4net/blob/a4413073/buildtools/docker/run.sh ---------------------------------------------------------------------- diff --git a/buildtools/docker/run.sh b/buildtools/docker/run.sh new file mode 100755 index 0000000..873c09d --- /dev/null +++ b/buildtools/docker/run.sh @@ -0,0 +1,17 @@ +#!/bin/bash + +MY_PATH="`dirname \"$0\"`" # relative +MY_PATH="`( cd \"$MY_PATH\" && pwd )`" # absolutized and normalized +if [ -z "$MY_PATH" ] ; then + # error; for some reason, the path is not accessible + # to the script (e.g. permissions re-evaled after suid) + exit 1 # fail +fi + +WORKING_DIR=$2 +if [ -z "$WORKING_DIR" ]; then + WORKING_DIR="$(pwd)" +fi + +docker run -it --rm -e UID=$(id -u) -u $(id -u):$(id -g) -v $WORKING_DIR:/home/user -w /home/user -e USERNAME=$USERNAME -e USER=$USER -e USERID=$UID $1:latest /bin/bash + http://git-wip-us.apache.org/repos/asf/logging-log4net/blob/a4413073/log4net.build ---------------------------------------------------------------------- diff --git a/log4net.build b/log4net.build index 00af934..6961d8b 100644 --- a/log4net.build +++ b/log4net.build @@ -1764,13 +1764,12 @@ limitations under the License. <echo message="Skipping build; required framework is not available: netstandard"/> </if> <if test="${dotnet.available == '0'}"> - <echo message="dotnet restore log4net.netstandard.sln --configfile=NuGet.Config"/> + <echo message="dotnet restore log4net.netstandard.sln"/> <exec program="dotnet" workingdir="netstandard"> <arg value="restore"/> <arg value="log4net.netstandard.sln"/> - <arg value="--configfile=NuGet.Config"/> </exec> - <if test="${current.build.config.release != '-c}"> + <if test="${current.build.config.release != '-c'}"> <echo message="dotnet build log4net"/> </if> <if test="${current.build.config.release == '-c'}"> http://git-wip-us.apache.org/repos/asf/logging-log4net/blob/a4413073/netstandard/NuGet.Config ---------------------------------------------------------------------- diff --git a/netstandard/NuGet.Config b/netstandard/NuGet.Config deleted file mode 100644 index 4980d51..0000000 --- a/netstandard/NuGet.Config +++ /dev/null @@ -1,7 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<configuration> - <add key="repositoryPath" value=".nuget"/> - <activePackageSource> - <add key="NuGet official package source" value="https://nuget.org/api/v2/" /> - </activePackageSource> -</configuration>