From f4d72cd201cc1dce3a9456f37266532bc3d92ee0 Mon Sep 17 00:00:00 2001 From: Bryan Thornbury Date: Thu, 22 Oct 2015 16:17:57 -0700 Subject: [PATCH] docker use executing username to avoid root file perms, support absolute paths in repoapi_client --- scripts/dockerbuild.sh | 1 + scripts/package_upload.json | 6 ------ scripts/repoapi_client.sh | 2 +- 3 files changed, 2 insertions(+), 7 deletions(-) delete mode 100644 scripts/package_upload.json diff --git a/scripts/dockerbuild.sh b/scripts/dockerbuild.sh index 204636c63..76751db16 100755 --- a/scripts/dockerbuild.sh +++ b/scripts/dockerbuild.sh @@ -24,5 +24,6 @@ docker build -t $DOTNET_BUILD_CONTAINER_TAG scripts/docker/ docker rm -f $DOTNET_BUILD_CONTAINER_NAME docker run --rm \ -v $DOCKER_HOST_SHARE_DIR:/opt/code \ + -u $(whoami) \ -e DOTNET_BUILD_VERSION=$DOTNET_BUILD_VERSION \ $DOTNET_BUILD_CONTAINER_TAG $BUILD_COMMAND $1 diff --git a/scripts/package_upload.json b/scripts/package_upload.json deleted file mode 100644 index 1effb8f14..000000000 --- a/scripts/package_upload.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "name":"dotnet", - "version":"0.3", - "repositoryId":"561d36b9e548cb6eea0d6fc3", - "sourceUrl":"http://dotnetbuilddrops.blob.core.windows.net/debiantest/dotnet_0.3-1_amd64.deb" -} diff --git a/scripts/repoapi_client.sh b/scripts/repoapi_client.sh index 72c576cf9..135e0bbdc 100644 --- a/scripts/repoapi_client.sh +++ b/scripts/repoapi_client.sh @@ -68,7 +68,7 @@ function AddPackage fi packageUrl=$(grep "sourceUrl" $packageFile | head -n 1 | awk '{print $2}') echo "Adding package to $server [$packageUrl]" - curl -i -k "$baseurl/v1/packages" --data @./$packageFile -H "Content-Type: application/json" + curl -i -k "$baseurl/v1/packages" --data @$packageFile -H "Content-Type: application/json" BailIf $? echo "" }