Skip to content

Commit ed796a3

Browse files
authored
Merge pull request #56 from frontlinersnl/feature/upgrade-to-net9
feat: upgrade to net9
2 parents 34cc372 + 0defe88 commit ed796a3

File tree

9 files changed

+24
-23
lines changed

9 files changed

+24
-23
lines changed

CHANGELOG.md

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,18 @@ All notable changes to this project will be documented in this file.
55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
66
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

8+
## [12.0.0]
9+
10+
- Updated to NET 9 SDK Container
11+
- Update to Node 20
12+
- Update Docker Compose to v2.29.7
13+
- Removed not working code coverage report generation
14+
- [BREAKING] Removed dotnet tools global. These are moved to the project repo as local. This makes it easier to update or change.
15+
- [BREAKING] Dropped NET 7 support
16+
817
## [11.0.1]
918

10-
Added make as a dependency
19+
- Added make as a dependency
1120

1221
## [11.0.0]
1322

Dockerfile

Lines changed: 5 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
FROM mcr.microsoft.com/dotnet/sdk:8.0
1+
FROM mcr.microsoft.com/dotnet/sdk:9.0
22

3-
# "install" the dotnet 7 runtime so we can also run the NET 7 tests
4-
COPY --from=mcr.microsoft.com/dotnet/sdk:7.0.404-1-bookworm-slim-amd64 /usr/share/dotnet/shared /usr/share/dotnet/shared
3+
# "install" the dotnet 8 runtime so we can also run the NET 8 tests
4+
COPY --from=mcr.microsoft.com/dotnet/sdk:8.0 /usr/share/dotnet/shared /usr/share/dotnet/shared
55

66
# install base software
77
RUN mkdir -p /usr/share/man/man1 \
@@ -16,7 +16,7 @@ RUN mkdir -p /usr/share/man/man1 \
1616
zip \
1717
make \
1818
ca-certificates \
19-
&& curl -fsSL https://deb.nodesource.com/setup_18.x | bash - \
19+
&& curl -fsSL https://deb.nodesource.com/setup_20.x | bash - \
2020
&& apt-get install --no-install-recommends -y nodejs \
2121
&& apt-get install -y --no-install-recommends nuget libgtk2.0-0 libgtk-3-0 libgbm-dev libnotify-dev libgconf-2-4 libnss3 libxss1 libasound2 libxtst6 xauth xvfb procps\
2222
&& apt-get clean && rm -rf /var/lib/apt/lists/*
@@ -27,12 +27,11 @@ RUN apt-get update \
2727
&& apt-get clean && rm -rf /var/lib/apt/lists/*
2828

2929
# install docker-compose
30-
RUN curl -L "https://github.com/docker/compose/releases/download/v2.16.0/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose \
30+
RUN curl -L "https://github.com/docker/compose/releases/download/v2.29.7/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose \
3131
&& chmod +x /usr/local/bin/docker-compose
3232

3333
# install Chromium for (unit)-testing during build-phase
3434
RUN apt-get update && \
35-
apt-get install -y --no-install-recommends libgtk2.0-0 libgtk-3-0 libgbm-dev libnotify-dev libgconf-2-4 libnss3 libxss1 libasound2 libxtst6 xauth xvfb && \
3635
apt-get install -y --no-install-recommends chromium && \
3736
rm -rf /var/lib/apt/lists/*
3837

@@ -49,12 +48,6 @@ RUN mkdir -p ~/scripts
4948
COPY scripts /scripts
5049
RUN echo "source /scripts/dotnetcore.sh" >> ~/.bashrc
5150

52-
# install reportgenerator for code coverage
53-
RUN dotnet tool install -g dotnet-reportgenerator-globaltool
54-
RUN dotnet tool install -g dotnet-sonarscanner
55-
RUN dotnet tool install -g dotnet-format
56-
RUN dotnet tool install -g dotnet-coverage
57-
5851
# add entrypoint and run
5952
COPY dotnet-build.sh /dotnet-build.sh
6053
COPY entrypoint.sh /entrypoint.sh

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
MIT License
22

3-
Copyright (c) 2019 FRONTLINERS
3+
Copyright (c) 2025 FRONTLINERS
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# bitbucket-pipelines dotnet-build
22

3-
[![logo](./logo.jpg)](https://frontliners.nl)
3+
[![logo](./logo.png)](https://frontliners.nl)
44

55
Docker image to automate dotnet builds
66

dotnet-build.sh

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,9 @@ rm -rf ./**/bin
4848
rm -rf ./**/obj
4949
rm -rf "$DIST"
5050

51+
# Install dotnet tools
52+
dotnet tool restore
53+
5154
# create artifacts dir
5255
mkdir -p "$ARTIFACTS_DIST"
5356

@@ -68,14 +71,10 @@ shopt -s nocaseglob # disable casing
6871
echo "running tests"
6972
for f in *.test/*.csproj; do
7073
echo "Processing $f file..."
71-
dotnet add "$f" package JUnitTestLogger
72-
dotnet test "$f" --logger "junit" --configuration $RELEASE --results-directory "$DIST/test-results" /p:CollectCoverage=true /p:CoverletOutputFormat="opencover" /p:CoverletOutput="$DIST/test-coverlet"
74+
dotnet test "$f" --configuration $RELEASE --results-directory "$DIST/test-results" /p:CollectCoverage=true /p:CoverletOutputFormat="opencover" /p:CoverletOutput="$DIST/test-coverlet"
7375
done
7476
shopt -u nocaseglob # enable casing
7577

76-
# collect codecoverage files and generate report for sonarcloud (warning is for backwards compatability)
77-
reportgenerator -reports:"**/*.opencover*.xml" -targetdir:"$DIST/coverage" -reporttypes:"Cobertura;HTMLInline;HTMLChart;SonarQube" || echo -e "\033[33mWARNING: codecoverage not succesfull\033[0m"
78-
7978
# publish
8079
echo "publishing $CS_PROJECT_FILE"
8180
dotnet publish --configuration $RELEASE --output "$PROJECT_DIST" "$CS_PROJECT_FILE"

logo.jpg

-8.68 KB
Binary file not shown.

logo.png

42.6 KB
Loading

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "dotnet-build",
3-
"version": "11.0.1",
3+
"version": "12.0.0",
44
"description": "[![logo](./logo.jpg)](https://frontliners.nl)",
55
"main": "index.js",
66
"scripts": {

0 commit comments

Comments
 (0)