-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
David Nelson
committed
Jun 17, 2024
1 parent
8af0c71
commit 905d526
Showing
7 changed files
with
81 additions
and
49 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -82,3 +82,8 @@ _ReSharper.Caches/ | |
|
||
/artifacts | ||
*.binlog | ||
|
||
# GitLab | ||
.idea/ | ||
.gitlab/packages | ||
**/TestResults.xml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
variables: | ||
BASE_IMAGE_VERSION: ${CI_COMMIT_REF_SLUG}-${CI_PIPELINE_ID} | ||
DOCKER_VERSION: 24.0.5 | ||
|
||
workflow: | ||
rules: | ||
- if: $CI_PIPELINE_SOURCE == "merge_request_event" | ||
- if: $CI_COMMIT_TAG | ||
- when: never | ||
|
||
build-base: | ||
image: docker:${DOCKER_VERSION} | ||
services: | ||
- docker:${DOCKER_VERSION}-dind | ||
script: | ||
- echo "$CI_REGISTRY_PASSWORD" | docker login $CI_REGISTRY -u $CI_REGISTRY_USER --password-stdin | ||
- docker buildx build -f .gitlab/Dockerfile-build -t ${CI_REGISTRY_IMAGE}/base:${BASE_IMAGE_VERSION} --push .gitlab | ||
|
||
build: | ||
needs: | ||
- build-base | ||
image: ${CI_REGISTRY_IMAGE}/base:${BASE_IMAGE_VERSION} | ||
script: | ||
- ./build.sh Compile Test Pack --configuration Release | ||
artifacts: | ||
paths: | ||
- artifacts/*.nupkg | ||
- artifacts/*.snupkg | ||
reports: | ||
junit: "**/TestResults.xml" | ||
|
||
publish: | ||
image: ${CI_REGISTRY_IMAGE}/base:${BASE_IMAGE_VERSION} | ||
needs: | ||
- build | ||
script: | ||
- dotnet nuget add source "${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/nuget/index.json" --name gitlab | ||
- dotnet nuget push artifacts/*.nupkg --source gitlab --api-key ${CI_DEPLOY_PASSWORD} | ||
when: manual |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
FROM mcr.microsoft.com/dotnet/sdk:8.0-alpine | ||
|
||
COPY --from=mcr.microsoft.com/dotnet/sdk:7.0-alpine /usr/share/dotnet/shared /usr/share/dotnet/shared | ||
COPY --from=mcr.microsoft.com/dotnet/sdk:7.0-alpine /usr/share/dotnet/sdk /usr/share/dotnet/sdk | ||
COPY --from=mcr.microsoft.com/dotnet/sdk:6.0-alpine /usr/share/dotnet/shared /usr/share/dotnet/shared | ||
COPY --from=mcr.microsoft.com/dotnet/sdk:6.0-alpine /usr/share/dotnet/sdk /usr/share/dotnet/sdk | ||
|
||
RUN apk add --no-cache bash npm |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
<Project Sdk="Microsoft.NET.Sdk"> | ||
|
||
<PropertyGroup> | ||
<TargetFramework>net8.0</TargetFramework> | ||
</PropertyGroup> | ||
|
||
<ItemGroup> | ||
<!-- If this version changes, the adapter path in the pipeline needs to be updated --> | ||
<PackageReference Include="JunitXml.TestLogger" Version="3.1.12" /> | ||
</ItemGroup> | ||
|
||
</Project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters