Skip to content

Commit 53034a9

Browse files
committed
(build) made git repo safe for artifact docker tests
1 parent 0f9694c commit 53034a9

File tree

5 files changed

+12
-1
lines changed

5 files changed

+12
-1
lines changed

build/CI.sln

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,13 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "actions", "actions", "{A9B9
4848
..\.github\actions\docker-test\action.yml = ..\.github\actions\docker-test\action.yml
4949
EndProjectSection
5050
EndProject
51+
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "scripts", "scripts", "{960DC223-117E-41DE-8A89-C85E3D69A8E8}"
52+
ProjectSection(SolutionItems) = preProject
53+
..\tests\scripts\test-global-tool.sh = ..\tests\scripts\test-global-tool.sh
54+
..\tests\scripts\test-msbuild-task.sh = ..\tests\scripts\test-msbuild-task.sh
55+
..\tests\scripts\test-native-tool.sh = ..\tests\scripts\test-native-tool.sh
56+
EndProjectSection
57+
EndProject
5158
Global
5259
GlobalSection(SolutionConfigurationPlatforms) = preSolution
5360
Debug|Any CPU = Debug|Any CPU

build/docker/Dockerfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,5 +15,6 @@ FROM $REGISTRY/gittools/build-images:$DISTRO-runtime-$DOTNET_VERSION
1515

1616
WORKDIR /tools
1717
COPY --from=installer /tools .
18+
RUN git config --global --add safe.directory '*'
1819

1920
ENTRYPOINT ["/tools/dotnet-gitversion"]

tests/scripts/test-global-tool.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ do
1616
shift
1717
done
1818

19+
git config --global --add safe.directory '*'
1920
result=$(dotnet tool install GitVersion.Tool --version $version --tool-path /tools --add-source $nugetPath) # >/dev/null
2021
status=$?
2122
if test $status -eq 0

tests/scripts/test-msbuild-task.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ do
1919
shift
2020
done
2121

22+
git config --global --add safe.directory '*'
2223
result=$(dotnet build $repoPath --source $nugetPath --source https://api.nuget.org/v3/index.json -p:GitVersionMsBuildVersion=$version -p:TargetFrameworks=$targetframework) # >/dev/null
2324
status=$?
2425
if test $status -eq 0

tests/scripts/test-native-tool.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,12 @@ do
1616
shift
1717
done
1818

19+
git config --global --add safe.directory '*'
1920
result=$(tar -xvpf /native/gitversion-$runtime-$version.tar.gz -C /native) # >/dev/null
2021
status=$?
2122
if test $status -eq 0
2223
then
2324
/native/gitversion $repoPath /showvariable FullSemver;
2425
else
2526
echo $result
26-
fi
27+
fi

0 commit comments

Comments
 (0)