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 1
1
ARG DOTNET_VERSION=5.0.103
2
2
FROM mcr.microsoft.com/dotnet/sdk:${DOTNET_VERSION} AS elasticsearch-net-build
3
3
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
5
10
11
+ WORKDIR /sln
12
+ RUN chown $GROUP_ID:$USER_ID $(pwd)
6
13
COPY ./*.sln ./nuget.config ./*.Build.props ./*.Build.targets ./
7
14
8
15
COPY ./dotnet-tools.json ./
@@ -24,11 +31,19 @@ RUN for file in $(find . -name "*.?sproj"); do mkdir -p $(dirname $file)/$(basen
24
31
COPY build/scripts/scripts.fsproj ./build/scripts/
25
32
COPY .ci/Jenkins.csproj ./.ci/
26
33
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
+
27
39
# Install app dependencies
28
40
RUN dotnet restore
29
41
30
42
# copy relevant files (see .dockerignore)
31
43
COPY . .
32
44
33
45
# 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"
28
28
29
29
echo -e " \033[1m>>>>> Build [elastic/elasticsearch-net container] >>>>>>>>>>>>>>>>>>>>>>>>>>>>>\033[0m"
30
30
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) " .
32
34
33
35
echo -e " \033[1m>>>>> Run [elastic/elasticsearch-net container] >>>>>>>>>>>>>>>>>>>>>>>>>>>>>\033[0m"
34
36
Original file line number Diff line number Diff line change @@ -36,7 +36,9 @@ echo -e "\033[34;1mINFO:\033[0m DOTNET_VERSION ${DOTNET_VERSION}\033[0m"
36
36
37
37
echo -e " \033[1m>>>>> Build [elastic/elasticsearch-net container] >>>>>>>>>>>>>>>>>>>>>>>>>>>>>\033[0m"
38
38
39
- docker build --file .ci/DockerFile --tag elastic/elasticsearch-net .
39
+ docker build --file .ci/DockerFile --tag elastic/elasticsearch-net \
40
+ --build-arg USER_ID=$( id -u) \
41
+ --build-arg GROUP_ID=$( id -g) .
40
42
41
43
echo -e " \033[1m>>>>> Run [elastic/elasticsearch-net container] >>>>>>>>>>>>>>>>>>>>>>>>>>>>>\033[0m"
42
44
Original file line number Diff line number Diff line change 33
33
name : " code-gen ${{ matrix.branch }}"
34
34
- name : " PR ${{ matrix.branch }}"
35
35
# fixate to known release.
36
- uses : peter-evans/create-pull-request@5ea31358e901bfaf28ca19849903d802fd0a891b
36
+ uses : peter-evans/create-pull-request@052fc72b4198ba9fbc81b818c6e1859f747d49a8
37
37
with :
38
38
token : ${{ secrets.GITHUB_TOKEN }}
39
39
branch : " fix/${{ matrix.branch }}/code-gen"
Original file line number Diff line number Diff line change @@ -11,7 +11,8 @@ public static class GeneratorLocations
11
11
{
12
12
// @formatter:off — disable formatter after this line
13
13
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" ) ;
15
16
16
17
public static string NestFolder { get ; } = $@ "{ Root } ../../src/Nest/";
17
18
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