File tree Expand file tree Collapse file tree 6 files changed +26
-7
lines changed Expand file tree Collapse file tree 6 files changed +26
-7
lines changed Original file line number Diff line number Diff line change 11ARG DOTNET_VERSION=5.0.103
22FROM mcr.microsoft.com/dotnet/sdk:${DOTNET_VERSION} AS elasticsearch-net-build
33
4- WORKDIR /sln
4+ ARG USER_ID
5+ ARG GROUP_ID
6+
7+ RUN echo addgroup --gid $GROUP_ID user
8+ RUN addgroup --gid $GROUP_ID user
9+ RUN adduser --disabled-password --gecos '' --uid $USER_ID --gid $GROUP_ID user
510
11+ WORKDIR /sln
12+ RUN chown $GROUP_ID:$USER_ID $(pwd)
613COPY ./*.sln ./nuget.config ./*.Build.props ./*.Build.targets ./
714
815COPY ./dotnet-tools.json ./
@@ -24,11 +31,19 @@ RUN for file in $(find . -name "*.?sproj"); do mkdir -p $(dirname $file)/$(basen
2431COPY build/scripts/scripts.fsproj ./build/scripts/
2532COPY .ci/Jenkins.csproj ./.ci/
2633
34+ RUN chown -R $GROUP_ID:$USER_ID $(pwd)
35+ RUN chown -R $GROUP_ID:$USER_ID $(pwd)
36+ RUN chown -R $GROUP_ID:$USER_ID /tmp/NuGetScratch
37+ USER user
38+
2739# Install app dependencies
2840RUN dotnet restore
2941
3042# copy relevant files (see .dockerignore)
3143COPY . .
3244
3345# making sure enough git info is available inside the container
34- RUN git rev-parse HEAD .
46+ RUN git rev-parse HEAD .
47+
48+
49+
Original file line number Diff line number Diff line change @@ -28,7 +28,9 @@ echo -e "\033[34;1mINFO:\033[0m DOTNET_VERSION ${DOTNET_VERSION}\033[0m"
2828
2929echo -e " \033[1m>>>>> Build [elastic/elasticsearch-net container] >>>>>>>>>>>>>>>>>>>>>>>>>>>>>\033[0m"
3030
31- docker build --file .ci/DockerFile --tag elastic/elasticsearch-net .
31+ docker build --file .ci/DockerFile --tag elastic/elasticsearch-net \
32+ --build-arg USER_ID=" $( id -u) " \
33+ --build-arg GROUP_ID=" $( id -g) " .
3234
3335echo -e " \033[1m>>>>> Run [elastic/elasticsearch-net container] >>>>>>>>>>>>>>>>>>>>>>>>>>>>>\033[0m"
3436
Original file line number Diff line number Diff line change @@ -37,7 +37,9 @@ echo -e "\033[34;1mINFO:\033[0m DOTNET_VERSION ${DOTNET_VERSION}\033[0m"
3737
3838echo -e " \033[1m>>>>> Build [elastic/elasticsearch-net container] >>>>>>>>>>>>>>>>>>>>>>>>>>>>>\033[0m"
3939
40- docker build --file .ci/DockerFile --tag elastic/elasticsearch-net .
40+ docker build --file .ci/DockerFile --tag elastic/elasticsearch-net \
41+ --build-arg USER_ID=$( id -u) \
42+ --build-arg GROUP_ID=$( id -g) .
4143
4244echo -e " \033[1m>>>>> Run [elastic/elasticsearch-net container] >>>>>>>>>>>>>>>>>>>>>>>>>>>>>\033[0m"
4345
Original file line number Diff line number Diff line change 3333 name : " code-gen ${{ matrix.branch }}"
3434 - name : " PR ${{ matrix.branch }}"
3535 # fixate to known release.
36- uses : peter-evans/create-pull-request@5ea31358e901bfaf28ca19849903d802fd0a891b
36+ uses : peter-evans/create-pull-request@052fc72b4198ba9fbc81b818c6e1859f747d49a8
3737 with :
3838 token : ${{ secrets.GITHUB_TOKEN }}
3939 branch : " fix/${{ matrix.branch }}/code-gen"
Original file line number Diff line number Diff line change @@ -11,7 +11,8 @@ public static class GeneratorLocations
1111 {
1212 // @formatter:off — disable formatter after this line
1313 public static string EsNetFolder { get ; } = $@ "{ Root } ../../src/Elasticsearch.Net/";
14- public static string LastDownloadedRef { get ; } = Path . Combine ( Root , "last_downloaded_version.txt" ) ;
14+
15+ public static string LastDownloadedRef { get ; } = Path . Combine ( Path . GetTempPath ( ) , "last_downloaded_version.txt" ) ;
1516
1617 public static string NestFolder { get ; } = $@ "{ Root } ../../src/Nest/";
1718 public static string RestSpecificationFolder { get ; } = $@ "{ Root } RestSpecification/";
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments