Skip to content
Merged
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
14 changes: 7 additions & 7 deletions 11.0/aspnet/Dockerfile.rhel9
Original file line number Diff line number Diff line change
@@ -1,24 +1,24 @@
FROM ubi9/dotnet-100-runtime
FROM ubi9/dotnet-110-runtime

# ASPNET_VERSION must be set to the full framework versions, unless IS_CI is set to true.
ARG ASPNET_VERSION=10.0
ARG ASPNET_VERSION=11.0
ARG IS_CI
ARG DOTNET_TARBALL

# Like Microsoft images, provide the ASP.NET shared framework version.
ENV ASPNET_VERSION=$ASPNET_VERSION

ARG _SUMMARY="ASP.NET Core 10 Runtime"
ARG _DESCRIPTION="Base image for running ASP.NET Core 10.0 applications"
ARG _DESCRIPTION="Base image for running ASP.NET Core 11.0 applications"
LABEL \
# Labels consumed by Red Hat build pipeline, container catalog and OpenShift
name="ubi9/dotnet-100-aspnet" \
name="ubi9/dotnet-110-aspnet" \
summary="$_SUMMARY" \
description="$_DESCRIPTION" \
com.redhat.component="dotnet-100-aspnet-container" \
com.redhat.component="dotnet-110-aspnet-container" \
io.k8s.display-name="$_SUMMARY" \
io.k8s.description="$_DESCRIPTION" \
io.openshift.tags="runtime,dotnet,aspnet,aspnetcore,dotnet-100,dotnet-100-aspnet" \
io.openshift.tags="runtime,dotnet,aspnet,aspnetcore,dotnet-110,dotnet-110-aspnet" \
aspnet_version="$ASPNET_VERSION" \
# UBI EULA
com.redhat.license_terms="https://www.redhat.com/en/about/red-hat-end-user-license-agreements#UBI"
Expand All @@ -30,7 +30,7 @@ ENV HOME=
# Install packages:
# - aspnetcore-runtime-*: provides the ASP.NET Core shared framework.
RUN [ -n "${DOTNET_TARBALL}" ] || ( \
INSTALL_PKGS="aspnetcore-runtime-10.0" && \
INSTALL_PKGS="aspnetcore-runtime-11.0" && \
microdnf install -y --setopt=tsflags=nodocs --setopt=install_weak_deps=0 $INSTALL_PKGS && \
# yum cache files may still exist (and quite large in size)
rm -rf /var/cache/yum/* )
Expand Down
2 changes: 1 addition & 1 deletion 11.0/aspnet/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ To containerize a .NET application, you can use the .NET (10+) SDK's `PublishCon
For example:

```
dotnet publish /p:ContainerBaseImage=registry.access.redhat.com/ubi9/dotnet-100-aspnet /t:PublishContainer -v detailed
dotnet publish /p:ContainerBaseImage=registry.access.redhat.com/ubi9/dotnet-110-aspnet /t:PublishContainer -v detailed
```

Repository organization
Expand Down
Binary file modified 11.0/aspnet/test/aspnet-hello-world/app.tar.gz

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Is there something we can/should do to assert/verify that this is not malicous and generated by a known by a known set of commands?

Binary file not shown.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<Project Sdk="Microsoft.NET.Sdk.Web">
<PropertyGroup>
<TargetFramework>net10.0</TargetFramework>
<TargetFramework>net11.0</TargetFramework>
</PropertyGroup>
</Project>
4 changes: 2 additions & 2 deletions 11.0/aspnet/test/aspnet-hello-world/build-project.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@

rm -rf bin obj

dotnet publish -f net10.0 -c Release
dotnet publish -f net11.0 -c Release

tar -czvf app.tar.gz -C bin/Release/net10.0/publish .
tar -czvf app.tar.gz -C bin/Release/net11.0/publish .
4 changes: 2 additions & 2 deletions 11.0/aspnet/test/run
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,13 @@ STOP_ON_ERROR=${STOP_ON_ERROR:-true}

IMAGE_OS=${IMAGE_OS:-RHEL9}

IMAGE_NAME=${IMAGE_NAME:-localhost/ubi9/dotnet-100-aspnet}
IMAGE_NAME=${IMAGE_NAME:-localhost/ubi9/dotnet-110-aspnet}
OPENSHIFT_ONLY=${OPENSHIFT_ONLY:-false}

test_dir="$(readlink -f "$(dirname "${BASH_SOURCE[0]}")")"
source "${test_dir}/testcommon"

dotnet_version_series="10.0"
dotnet_version_series="11.0"

test_envvars() {
test_start
Expand Down
16 changes: 8 additions & 8 deletions 11.0/build/Dockerfile.rhel9
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
FROM ubi9/dotnet-100-aspnet
# This image provides a .NET 10.0 environment you can use to run your .NET
FROM ubi9/dotnet-110-aspnet
# This image provides a .NET 11.0 environment you can use to run your .NET
# applications.

# DOTNET_SDK_VERSION must be set to the full SDK version, unless IS_CI is set to true.
ARG DOTNET_SDK_VERSION=10.0
ARG DOTNET_SDK_VERSION=11.0
ARG IS_CI
ARG DOTNET_TARBALL

Expand All @@ -29,16 +29,16 @@ ENV \
DOTNET_SDK_VERSION=$DOTNET_SDK_VERSION

ARG _SUMMARY=".NET 10 SDK"
ARG _DESCRIPTION="SDK for building .NET 10.0 applications"
ARG _DESCRIPTION="SDK for building .NET 11.0 applications"
LABEL \
# Labels consumed by Red Hat build pipeline, container catalog and OpenShift
name="ubi9/dotnet-100" \
name="ubi9/dotnet-110" \
summary="$_SUMMARY" \
description="$_DESCRIPTION" \
com.redhat.component="dotnet-100-container" \
com.redhat.component="dotnet-110-container" \
io.k8s.display-name="$_SUMMARY" \
io.k8s.description="$_DESCRIPTION" \
io.openshift.tags="builder,dotnet,aspnet,aspnetcore,dotnet-100,dotnet-100-sdk" \
io.openshift.tags="builder,dotnet,aspnet,aspnetcore,dotnet-110,dotnet-110-sdk" \
dotnet_sdk_version="$DOTNET_SDK_VERSION" \
# S2I
io.openshift.s2i.scripts-url=image:///usr/libexec/s2i \
Expand All @@ -62,7 +62,7 @@ COPY ./s2i/bin/ /usr/libexec/s2i
# - procps-ng: provides 'pidof' which is needed by the 'odo' Devfile to find the running 'dotnet' process.
# - findutils: provides 'find' which is used by the 'fix-permissions' script.
RUN [ -n "${DOTNET_TARBALL}" ] || ( \
INSTALL_PKGS="dotnet-sdk-10.0 procps-ng findutils" && \
INSTALL_PKGS="dotnet-sdk-11.0 procps-ng findutils" && \
microdnf install -y --setopt=tsflags=nodocs --setopt=install_weak_deps=0 $INSTALL_PKGS && \
microdnf clean all -y && \
# yum cache files may still exist (and quite large in size)
Expand Down
2 changes: 1 addition & 1 deletion 11.0/build/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ using standalone [S2I](https://github.com/openshift/source-to-image) and then ru
resulting image with `docker`/`podman` execute:

```
$ sudo s2i build git://github.com/redhat-developer/s2i-dotnetcore --context-dir=10.0/build/test/asp-net-hello-world ubi9/dotnet-100 dotnet-sample-app
$ sudo s2i build git://github.com/redhat-developer/s2i-dotnetcore --context-dir=11.0/build/test/asp-net-hello-world ubi9/dotnet-110 dotnet-sample-app
$ sudo docker run -p 8080:8080 dotnet-sample-app
```

Expand Down
4 changes: 2 additions & 2 deletions 11.0/build/s2i/bin/assemble
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ if [ "$BUILD_TYPE" == "source" ]; then
echo "---> Restoring test project ($TEST_PROJECT) dependencies..."
dotnet restore "$TEST_PROJECT" $RESTORE_OPTIONS $VERBOSITY_OPTION
echo "---> Running test project: $TEST_PROJECT..."
dotnet test "$TEST_PROJECT" -c "$DOTNET_TEST_CONFIGURATION" -f net10.0 $VERBOSITY_OPTION --no-restore
dotnet test "$TEST_PROJECT" -c "$DOTNET_TEST_CONFIGURATION" -f net11.0 $VERBOSITY_OPTION --no-restore
done

# publish application
Expand All @@ -202,7 +202,7 @@ if [ "$BUILD_TYPE" == "source" ]; then
echo "---> Restoring application dependencies..."
dotnet restore "$DOTNET_STARTUP_PROJECT" $RESTORE_OPTIONS $VERBOSITY_OPTION
echo "---> Publishing application..."
dotnet publish "$DOTNET_STARTUP_PROJECT" -f net10.0 -c "$DOTNET_CONFIGURATION" $VERBOSITY_OPTION \
dotnet publish "$DOTNET_STARTUP_PROJECT" -f net11.0 -c "$DOTNET_CONFIGURATION" $VERBOSITY_OPTION \
$DOTNET_PUBLISH_OPTIONS -o "$DOTNET_APP_PATH"
else
# binary build: move pre-compiled application
Expand Down
4 changes: 2 additions & 2 deletions 11.0/build/s2i/bin/usage
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
#!/bin/sh

NAMESPACE=ubi9
IMAGE=${NAMESPACE}/dotnet-100
IMAGE=${NAMESPACE}/dotnet-110

cat <<EOF
This is a S2I .Net ${DISTRO} base image:
To use it, install S2I: https://github.com/openshift/source-to-image

Sample invocation:

sudo s2i build https://github.com/redhat-developer/s2i-dotnetcore-ex.git --context-dir=app --ref=dotnet-10.0 ${IMAGE} dotnet-sample-app
sudo s2i build https://github.com/redhat-developer/s2i-dotnetcore-ex.git --context-dir=app --ref=dotnet-11.0 ${IMAGE} dotnet-sample-app

You can then run the resulting image via:
sudo docker run -p 8080:8080 dotnet-sample-app
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk.Web">

<PropertyGroup>
<TargetFramework>net10.0</TargetFramework>
<TargetFramework>net11.0</TargetFramework>
<DebugType>portable</DebugType>
<OutputType>Exe</OutputType>
<AssemblyName>SampleApp</AssemblyName>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net10.0</TargetFramework>
<TargetFramework>net11.0</TargetFramework>
<DebugType>portable</DebugType>
</PropertyGroup>

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net10.0</TargetFramework>
<TargetFramework>net11.0</TargetFramework>
<IsPackable>false</IsPackable>
</PropertyGroup>

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net10.0</TargetFramework>
<TargetFramework>net11.0</TargetFramework>
</PropertyGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk.Web">

<PropertyGroup>
<TargetFramework>net10.0</TargetFramework>
<TargetFramework>net11.0</TargetFramework>
<DebugType>portable</DebugType>
<OutputType>Exe</OutputType>
<AssemblyName>SampleApp</AssemblyName>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net10.0</TargetFramework>
<TargetFramework>net11.0</TargetFramework>
<DebugType>portable</DebugType>
</PropertyGroup>

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net10.0</TargetFramework>
<TargetFramework>net11.0</TargetFramework>
<IsPackable>false</IsPackable>
</PropertyGroup>

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net10.0</TargetFramework>
<TargetFramework>net11.0</TargetFramework>
</PropertyGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk.Web">

<PropertyGroup>
<TargetFramework>net10.0</TargetFramework>
<TargetFramework>net11.0</TargetFramework>
<DebugType>portable</DebugType>
<OutputType>Exe</OutputType>
</PropertyGroup>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net10.0</TargetFramework>
<TargetFramework>net11.0</TargetFramework>
<DebugType>portable</DebugType>
<OutputType>Exe</OutputType>
</PropertyGroup>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net10.0</TargetFramework>
<TargetFramework>net11.0</TargetFramework>
<DebugType>portable</DebugType>
<OutputType>Exe</OutputType>
</PropertyGroup>
Expand Down
2 changes: 1 addition & 1 deletion 11.0/build/test/helloworld-fs/helloworld.fsproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net10.0</TargetFramework>
<TargetFramework>net11.0</TargetFramework>
</PropertyGroup>

<ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion 11.0/build/test/helloworld-vb/helloworld.vbproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net10.0</TargetFramework>
<TargetFramework>net11.0</TargetFramework>
</PropertyGroup>

</Project>
2 changes: 1 addition & 1 deletion 11.0/build/test/helloworld/helloworld.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net10.0</TargetFramework>
<TargetFramework>net11.0</TargetFramework>
<DebugType>portable</DebugType>
<OutputType>Exe</OutputType>
</PropertyGroup>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk.Web">

<PropertyGroup>
<TargetFrameworks>net451;net10.0</TargetFrameworks>
<TargetFrameworks>net451;net11.0</TargetFrameworks>
<OutputType>Exe</OutputType>
</PropertyGroup>

Expand Down
2 changes: 1 addition & 1 deletion 11.0/build/test/msbuild-exec-task/console.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net10.0</TargetFramework>
<TargetFramework>net11.0</TargetFramework>
<DebugType>portable</DebugType>
<OutputType>Exe</OutputType>
</PropertyGroup>
Expand Down
4 changes: 2 additions & 2 deletions 11.0/build/test/precompiled/console.runtimeconfig.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{
"runtimeOptions": {
"tfm": "net10.0",
"tfm": "net11.0",
"framework": {
"name": "Microsoft.NETCore.App",
"version": "10.0.0-preview.6.25358.103"
"version": "11.0.0-preview.5.26302.115"
}
}
}
4 changes: 2 additions & 2 deletions 11.0/build/test/precompiled/world2/console.runtimeconfig.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{
"runtimeOptions": {
"tfm": "net10.0",
"tfm": "net11.0",
"framework": {
"name": "Microsoft.NETCore.App",
"version": "10.0.0-preview.6.25358.103"
"version": "11.0.0-preview.5.26302.115"
}
}
}
6 changes: 3 additions & 3 deletions 11.0/build/test/qotd/qotd.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net10.0</TargetFramework>
<TargetFramework>net11.0</TargetFramework>
<DebugType>portable</DebugType>
<OutputType>Exe</OutputType>
</PropertyGroup>
Expand All @@ -13,8 +13,8 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.Extensions.Configuration" Version="1.1.1" />
<PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="1.1.1" />
<PackageReference Include="Microsoft.Extensions.Configuration" Version="10.0.*" />
<PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="10.0.*" />
</ItemGroup>

</Project>
10 changes: 5 additions & 5 deletions 11.0/build/test/run
Original file line number Diff line number Diff line change
Expand Up @@ -31,14 +31,14 @@ STOP_ON_ERROR=${STOP_ON_ERROR:-true}

IMAGE_OS=${IMAGE_OS:-RHEL8}

IMAGE_NAME=${IMAGE_NAME:-localhost/ubi9/dotnet-100}
IMAGE_NAME=${IMAGE_NAME:-localhost/ubi9/dotnet-110}
# Infer runtime image from SDK image when it is not explicitly set
OPENSHIFT_ONLY=${OPENSHIFT_ONLY:-false}

test_dir="$(readlink -f "$(dirname "${BASH_SOURCE[0]}")")"
source "${test_dir}/testcommon"

dotnet_version_series="10.0"
dotnet_version_series="11.0"

sample_app_url="https://github.com/redhat-developer/s2i-dotnetcore-ex.git"

Expand Down Expand Up @@ -317,7 +317,7 @@ test_config_1() {
assert_contains "${s2i_build}" "test1/bin/Debug"
assert_contains "${s2i_build}" "test2/bin/Debug"
# DOTNET_ASSEMBLY_NAME=SampleApp
assert_contains "${s2i_build}" "/opt/app-root/src/src/app/bin/Debug/net10.0/SampleApp.dll"
assert_contains "${s2i_build}" "/opt/app-root/src/src/app/bin/Debug/net11.0/SampleApp.dll"
# DOTNET_RESTORE_SOURCES=https://api.nuget.org/v3/index.json https://f.feedz.io/redhat-dotnet/s2i-ci/nuget/index.json
assert_contains "${s2i_build}" 'Restored /opt/app-root/src/src/app/app.csproj \([^)]+\)\.' # Includes S2iDotNetCoreDummy from feedz.io.
# DOTNET_PACK=true
Expand Down Expand Up @@ -416,12 +416,12 @@ test_imagestream_sample() {
# test the sample app defined with the imagestreams:
# "sampleRepo": "https://github.com/redhat-developer/s2i-dotnetcore-ex.git",
# "sampleContextDir": "app",
# "sampleRef": "dotnet-10.0"
# "sampleRef": "dotnet-11.0"

# build image
local image=$(s2i_image_tag sample)
docker_rmi ${tag}
local s2i_build=$(s2i_build_core ${image} --pull-policy=always --context-dir=app --ref=dotnet-10.0 https://github.com/redhat-developer/s2i-dotnetcore-ex.git 2>&1)
local s2i_build=$(s2i_build_core ${image} --pull-policy=always --context-dir=app --ref=dotnet-11.0 https://github.com/redhat-developer/s2i-dotnetcore-ex.git 2>&1)
# start container
local container=$(docker_run_d ${image})
local url=$(container_url ${container})
Expand Down
Loading