Skip to content

Commit

Permalink
chore: refresh dotnet
Browse files Browse the repository at this point in the history
  • Loading branch information
h3rmanj committed Oct 25, 2023
1 parent b65274c commit 93818b0
Show file tree
Hide file tree
Showing 4 changed files with 59 additions and 61 deletions.
47 changes: 23 additions & 24 deletions dotnet/iwebapi/.gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,29 +48,26 @@ analyze:
image: ghcr.io/nosinovacao/dotnet-sonar:latest
script:
- dotnet restore
- dotnet /sonar-scanner/SonarScanner.MSBuild.dll begin
- dotnet /sonar-scanner/SonarScanner.MSBuild.dll begin
/k:$SONAR_PROJECT
/d:sonar.host.url=$SONAR_HOST_URL
/d:sonar.login=$SONAR_TOKEN
/d:sonar.cs.opencover.reportsPaths=IntegrationTests/coverage.opencover.xml
/name:$SONAR_PROJECT
- dotnet build
- dotnet build
- dotnet /sonar-scanner/SonarScanner.MSBuild.dll end
/d:sonar.login=$SONAR_TOKEN
/d:sonar.login=$SONAR_TOKEN
allow_failure: true
retry: 2
needs: []

image:dev:
image:create:
stage: image
image:
name: gcr.io/kaniko-project/executor:debug
entrypoint: [""]
variables:
IMAGE_TAG: dev
IMAGE_VERSION: $CI_PIPELINE_IID
environment:
name: Development
name: $ENVIRONMENT_NAME
action: prepare
script:
- echo $DOCKER_AUTH_CONFIG > /kaniko/.docker/config.json
Expand All @@ -80,18 +77,18 @@ image:dev:
--destination $CI_REGISTRY_IMAGE:$IMAGE_TAG
--destination $CI_REGISTRY_IMAGE:$IMAGE_VERSION
rules:
- if: '$CI_COMMIT_BRANCH == "master" || $CI_COMMIT_BRANCH == "main"'
needs: [ "build" ]

image:prod:
extends: image:dev
variables:
IMAGE_TAG: latest
IMAGE_VERSION: $CI_COMMIT_TAG
environment:
name: Production
rules:
- if: '$CI_COMMIT_TAG'
- if: "$CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH"
variables:
ENVIRONMENT_NAME: Development
IMAGE_TAG: dev
IMAGE_VERSION: $CI_PIPELINE_IID
- if: "$CI_COMMIT_TAG"
variables:
ENVIRONMENT_NAME: Production
IMAGE_TAG: latest
IMAGE_VERSION: $CI_COMMIT_TAG
needs:
- build

# --- deployment ---
deploy:dev:
Expand Down Expand Up @@ -122,9 +119,12 @@ deploy:dev:
--set secrets.Sentry__Dsn=$SENTRY_DSN
--set config.ASPNETCORE_ENVIRONMENT=$CI_ENVIRONMENT_NAME
rules:
- if: '$CI_COMMIT_BRANCH == "master" || $CI_COMMIT_BRANCH == "main"'
needs: [ "test", "image:dev" ]
- if: "$CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH"
needs:
- test
- image:create

# example production deployment job, remove the dot to enable
.deploy:prod:
extends: deploy:dev
variables:
Expand All @@ -134,6 +134,5 @@ deploy:dev:
name: Production
url: https://$CI_PROJECT_NAME.apps.int.intility.no
rules:
- if: '$CI_COMMIT_TAG'
- if: "$CI_COMMIT_TAG"
when: manual
needs: [ "test", "image:prod" ]
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,14 @@
<NoWarn>$(NoWarn);1591</NoWarn>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="7.0.5" />
<PackageReference Include="Microsoft.AspNetCore.Mvc.Versioning" Version="5.0.0"/>
<PackageReference Include="Microsoft.AspNetCore.Mvc.Versioning.ApiExplorer" Version="5.0.0" />
<PackageReference Include="Microsoft.Azure.AppConfiguration.AspNetCore" Version="6.0.0" />
<PackageReference Include="Microsoft.Identity.Web" Version="2.11.0" />
<PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="7.0.13" />
<PackageReference Include="Microsoft.AspNetCore.Mvc.Versioning" Version="5.1.0" />
<PackageReference Include="Microsoft.AspNetCore.Mvc.Versioning.ApiExplorer" Version="5.1.0" />
<PackageReference Include="Microsoft.Azure.AppConfiguration.AspNetCore" Version="6.1.0" />
<PackageReference Include="Microsoft.Identity.Web" Version="2.15.3" />
<PackageReference Include="Swashbuckle.AspNetCore" Version="6.5.0" />
<PackageReference Include="Intility.Logging.AspNetCore" Version="1.4.0" />
<PackageReference Include="Intility.Extensions.Logging.Elasticsearch" Version="1.4.0" />
<PackageReference Include="Intility.Extensions.Logging.Sentry" Version="1.4.0" />
<PackageReference Include="Intility.Logging.AspNetCore" Version="1.5.0" />
<PackageReference Include="Intility.Extensions.Logging.Elasticsearch" Version="1.5.0" />
<PackageReference Include="Intility.Extensions.Logging.Sentry" Version="1.5.0" />
</ItemGroup>
</Project>
47 changes: 23 additions & 24 deletions dotnet/iworker/.gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,29 +48,26 @@ analyze:
image: ghcr.io/nosinovacao/dotnet-sonar:latest
script:
- dotnet restore
- dotnet /sonar-scanner/SonarScanner.MSBuild.dll begin
- dotnet /sonar-scanner/SonarScanner.MSBuild.dll begin
/k:$SONAR_PROJECT
/d:sonar.host.url=$SONAR_HOST_URL
/d:sonar.login=$SONAR_TOKEN
/d:sonar.cs.opencover.reportsPaths=IntegrationTests/coverage.opencover.xml
/name:$SONAR_PROJECT
- dotnet build
- dotnet build
- dotnet /sonar-scanner/SonarScanner.MSBuild.dll end
/d:sonar.login=$SONAR_TOKEN
/d:sonar.login=$SONAR_TOKEN
allow_failure: true
retry: 2
needs: []

image:dev:
image:create:
stage: image
image:
name: gcr.io/kaniko-project/executor:debug
entrypoint: [""]
variables:
IMAGE_TAG: dev
IMAGE_VERSION: $CI_PIPELINE_IID
environment:
name: Development
name: $ENVIRONMENT_NAME
action: prepare
script:
- echo $DOCKER_AUTH_CONFIG > /kaniko/.docker/config.json
Expand All @@ -80,18 +77,18 @@ image:dev:
--destination $CI_REGISTRY_IMAGE:$IMAGE_TAG
--destination $CI_REGISTRY_IMAGE:$IMAGE_VERSION
rules:
- if: '$CI_COMMIT_BRANCH == "master" || $CI_COMMIT_BRANCH == "main"'
needs: [ "build" ]

image:prod:
extends: image:dev
variables:
IMAGE_TAG: latest
IMAGE_VERSION: $CI_COMMIT_TAG
environment:
name: Production
rules:
- if: '$CI_COMMIT_TAG'
- if: "$CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH"
variables:
ENVIRONMENT_NAME: Development
IMAGE_TAG: dev
IMAGE_VERSION: $CI_PIPELINE_IID
- if: "$CI_COMMIT_TAG"
variables:
ENVIRONMENT_NAME: Production
IMAGE_TAG: latest
IMAGE_VERSION: $CI_COMMIT_TAG
needs:
- build

# --- deployment ---
deploy:dev:
Expand Down Expand Up @@ -123,16 +120,18 @@ deploy:dev:
--set secrets.Sentry__Dsn=$SENTRY_DSN
--set config.DOTNET_ENVIRONMENT=$CI_ENVIRONMENT_NAME
rules:
- if: '$CI_COMMIT_BRANCH == "master" || $CI_COMMIT_BRANCH == "main"'
needs: [ "test", "image:dev" ]
- if: "$CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH"
needs:
- test
- image:create

# example production deployment job, remove the dot to enable
.deploy:prod:
extends: deploy:dev
variables:
IMAGE_TAG: $CI_COMMIT_TAG
environment:
name: Production
rules:
- if: '$CI_COMMIT_TAG'
- if: "$CI_COMMIT_TAG"
when: manual
needs: [ "test", "image:prod" ]
10 changes: 5 additions & 5 deletions dotnet/iworker/Company.Worker1/Company.Worker1.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Azure.Identity" Version="1.8.2" />
<PackageReference Include="Azure.Identity" Version="1.10.3" />
<PackageReference Include="Microsoft.Extensions.Hosting" Version="7.0.1" />
<PackageReference Include="Microsoft.Azure.AppConfiguration.AspNetCore" Version="6.0.0" />
<PackageReference Include="Intility.Logging.AspNetCore" Version="1.4.0"/>
<PackageReference Include="Intility.Extensions.Logging.Elasticsearch" Version="1.4.0"/>
<PackageReference Include="Intility.Extensions.Logging.Sentry" Version="1.4.0"/>
<PackageReference Include="Microsoft.Azure.AppConfiguration.AspNetCore" Version="6.1.0" />
<PackageReference Include="Intility.Logging.AspNetCore" Version="1.5.0"/>
<PackageReference Include="Intility.Extensions.Logging.Elasticsearch" Version="1.5.0"/>
<PackageReference Include="Intility.Extensions.Logging.Sentry" Version="1.5.0"/>
</ItemGroup>
</Project>

0 comments on commit 93818b0

Please sign in to comment.