Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build: rename inforit to frontliners #53

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ updates:
- "Mastermindzh"
- "pascal89"
- "HBTeun"
- "patheems"
labels:
- "docker"
open-pull-requests-limit: 1
38 changes: 1 addition & 37 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,45 +5,9 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [11.0.0]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why are you reverting stuff?

## [7.2.0-frontliners]

- [BREAKING] Renamed Inforit to Frontliners
- [BREAKING] Updated to NET 8 SDK container
- Added NET 7 runtime so NET 7 projects can still run (for example the multi target nuget package tests)

## [10.0.1]

- Updated base image with patch version `7.0.404-1-bullseye-slim-amd64`

## [10.0.0]

- default csproj path now set to src/Api.csproj
- can be customized with env variable "CS_PROJECT_FILE"
- dotnet-build now no longer uses `"` to prevent word splitting on the nuget config path

## [9.1.0]

- container now explicitly installs nuget by default

## [9.0.0]

- Updated various internally used packages
- NodeJS from LTS 16 to LTS 18 (this is a major break, permissive rmdirs are removed)
- Java from 11 to 17
- because of the rebuild chrome, firefox and a load of other packages are also updated to their latest versions

## [8.1.0]

- Updated docker-compose to v2.16.0

## [8.0.1]

- Fixed a CLI change between NET6 and NET7

## [8.0.0]

- Updated to NET 7
- Removed patheems (Patrick Heemskerk) as reviewer

## [7.2.0]

Expand Down
17 changes: 5 additions & 12 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
FROM mcr.microsoft.com/dotnet/sdk:8.0.100-1-bookworm-slim-amd64

# "install" the dotnet 7 runtime so we can also run the NET 7 tests
COPY --from=mcr.microsoft.com/dotnet/sdk:7.0.404-1-bookworm-slim-amd64 /usr/share/dotnet/shared /usr/share/dotnet/shared
FROM mcr.microsoft.com/dotnet/sdk:6.0.402-bullseye-slim-amd64

# install base software
RUN mkdir -p /usr/share/man/man1 \
Expand All @@ -15,18 +12,14 @@ RUN mkdir -p /usr/share/man/man1 \
dpkg \
zip \
ca-certificates \
&& curl -fsSL https://deb.nodesource.com/setup_18.x | bash - \
default-jre \
&& curl -fsSL https://deb.nodesource.com/setup_16.x | bash - \
&& apt-get install --no-install-recommends -y nodejs \
&& 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\
&& apt-get clean && rm -rf /var/lib/apt/lists/*

# install modern version of java
RUN apt-get update \
&& apt-get install --no-install-recommends -y openjdk-17-jdk openjdk-17-jre \
&& 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 procps\
&& apt-get clean && rm -rf /var/lib/apt/lists/*

# install docker-compose
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 \
RUN curl -L "https://github.com/docker/compose/releases/download/v2.0.1/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose \
&& chmod +x /usr/local/bin/docker-compose

# install Chromium for (unit)-testing during build-phase
Expand Down
16 changes: 8 additions & 8 deletions dotnet-build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,16 +17,16 @@ fi

# Add nuget source if access token is set
if [ -n "$MYGET_ACCESS_TOKEN" ]; then
NUGET_CONFIG=~/.nuget/NuGet/NuGet.Config
NUGET_CONFIG="~/.nuget/NuGet/NuGet.Config"
echo "Adding private myget source"
SOURCE="https://www.myget.org/F/frontliners/auth/$MYGET_ACCESS_TOKEN/api/v3/index.json"
if ! grep -q "$SOURCE" $NUGET_CONFIG; then
VAR=$(sed "/<\/packageSources>/i <add key=\"Frontliners MyGet package source\" value=\"$SOURCE\" protocolVersion=\"3\" />" $NUGET_CONFIG)
echo "$VAR" >$NUGET_CONFIG
if ! grep -q "$SOURCE" "$NUGET_CONFIG"; then
VAR=$(sed "/<\/packageSources>/i <add key=\"Frontliners MyGet package source\" value=\"$SOURCE\" protocolVersion=\"3\" />" ~/.nuget/NuGet/NuGet.Config)
echo "$VAR" >~/.nuget/NuGet/NuGet.Config
fi
fi

CS_PROJECT_FILE="${CS_PROJECT_FILE:-"src/Api/Api.csproj"}"
CS_PROJECT_FILE="Api/Api.csproj"
CS_PROJECT_NAME="Api"
DIST="./dist"
RELEASE="Release"
Expand Down Expand Up @@ -61,15 +61,15 @@ dotnet restore "$CS_PROJECT_FILE"

# build project
echo "building $CS_PROJECT_FILE"
dotnet build --configuration $RELEASE --no-restore "$CS_PROJECT_FILE"
dotnet build -c $RELEASE --no-restore "$CS_PROJECT_FILE"

# run tests
shopt -s nocaseglob # disable casing
echo "running tests"
for f in *.test/*.csproj; do
echo "Processing $f file..."
dotnet add "$f" package JUnitTestLogger
dotnet test "$f" --logger "junit" --configuration $RELEASE --results-directory "$DIST/test-results" /p:CollectCoverage=true /p:CoverletOutputFormat="opencover" /p:CoverletOutput="$DIST/test-coverlet"
dotnet test "$f" --logger "junit" -c $RELEASE -r "$DIST/test-results" /p:CollectCoverage=true /p:CoverletOutputFormat="opencover" /p:CoverletOutput="$DIST/test-coverlet"
done
shopt -u nocaseglob # enable casing

Expand All @@ -78,7 +78,7 @@ reportgenerator -reports:"**/*.opencover*.xml" -targetdir:"$DIST/coverage" -repo

# publish
echo "publishing $CS_PROJECT_FILE"
dotnet publish --configuration $RELEASE --output "$PROJECT_DIST" "$CS_PROJECT_FILE"
dotnet publish -c $RELEASE -o "$PROJECT_DIST" "$CS_PROJECT_FILE"

# copy deployment files over
if [ -d "deployment/" ]; then
Expand Down
13 changes: 0 additions & 13 deletions package-lock.json

This file was deleted.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
{
"name": "dotnet-build",
"version": "11.0.0",
"version": "7.2.0-frontliners",
"description": "[![logo](./logo.jpg)](https://frontliners.nl)",
"main": "index.js",
"scripts": {
"build": "docker build -t frontliners/dotnet-build .",
"tag": "docker tag frontliners/dotnet-build",
"push": "docker push frontliners/dotnet-build",
"publish": "DOCKER_PROD_TAG=$(cat package.json | grep version | head -1 | awk -F: '{ print $2}' | sed 's/[\",]//g' | tr -d '[[:space:]]') && docker build -t frontliners/dotnet-build . && docker tag frontliners/dotnet-build frontliners/dotnet-build:latest && docker tag frontliners/dotnet-build frontliners/dotnet-build:$DOCKER_PROD_TAG && docker push frontliners/dotnet-build:latest && docker push frontliners/dotnet-build:$DOCKER_PROD_TAG"
"publish": "DOCKER_PROD_TAG=$(cat package.json | grep version | head -1 | awk -F: '{ print $2}' | sed 's/[\",]//g' | tr -d '[[:space:]]') && docker build -t frontliners/dotnet-build . && docker tag frontliners/dotnet-build frontliners/dotnet-build:latest && docker tag frontliners/dotnet-build frontliners/dotnet-build:$DOCKER_PROD_TAG && docker push frontliners/dotnet-build:latest && docker push frontliners/dotnet-build:$DOCKER_PROD_TAG"
},
"repository": {
"type": "git",
Expand Down