Skip to content
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
19 changes: 3 additions & 16 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,9 @@ updates:
- dependency-name: "System.Threading.Channels"
update-types: ["version-update:semver-major"]

# The examples' own packages. They build Obvs from the repo, so its versions in Directory.Packages.props are theirs
# too, and they take the same ignores.
# The examples are built on the published Obvs packages, so keep them on its latest release. They pin their own
# versions, so this entry updates only theirs. It carried the root's ignores while the examples built Obvs from the
# repo, which made it update Directory.Packages.props too, and doesn't need them now.
- package-ecosystem: nuget
directory: /Examples
target-branch: v7
Expand All @@ -43,20 +44,6 @@ updates:
groups:
examples:
patterns: ["*"]
ignore:
- dependency-name: "Microsoft.CodeAnalysis.CSharp*"
- dependency-name: "Microsoft.AspNetCore.*"
update-types: ["version-update:semver-major"]
- dependency-name: "Microsoft.Bcl.*"
update-types: ["version-update:semver-major"]
- dependency-name: "Microsoft.Extensions.*"
update-types: ["version-update:semver-major"]
- dependency-name: "System.Diagnostics.DiagnosticSource"
update-types: ["version-update:semver-major"]
- dependency-name: "System.Text.Json"
update-types: ["version-update:semver-major"]
- dependency-name: "System.Threading.Channels"
update-types: ["version-update:semver-major"]

- package-ecosystem: github-actions
directory: /
Expand Down
4 changes: 3 additions & 1 deletion Examples/.dockerignore
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
.vs/
.vs/
**/bin/
**/obj/
3 changes: 1 addition & 2 deletions Examples/Client/Obvs.Example.Client.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,11 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.Extensions.Hosting" Version="10.0.14" />
<PackageReference Include="Obvs.ActiveMQ" Version="7.0.2" />
<PackageReference Include="OpenTelemetry.Exporter.Console" Version="1.19.1" />
<PackageReference Include="OpenTelemetry.Extensions.Hosting" Version="1.19.1" />
</ItemGroup>
<!-- Built from this repo until v7 is on NuGet; then these become PackageReferences to Obvs and Obvs.ActiveMQ 7.0.0 -->
<ItemGroup>
<ProjectReference Include="..\..\Obvs.ActiveMQ\Obvs.ActiveMQ.csproj" />
<ProjectReference Include="..\Messages\Obvs.Example.Messages.csproj" />
</ItemGroup>
</Project>
12 changes: 9 additions & 3 deletions Examples/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,8 +1,14 @@
# Built from the repo's root, as the examples reference Obvs's projects: docker compose up, from Examples/
# The service, on the published Obvs packages, built from Examples/: docker compose up, from Examples/
FROM mcr.microsoft.com/dotnet/sdk:10.0 AS build
WORKDIR /src
COPY . .
RUN dotnet publish Examples/Service.ActiveMQ -c Release -o /app
# Restore from the project files first, so changing the code doesn't download the packages again
COPY Directory.Packages.props .
COPY Messages/*.csproj Messages/
COPY Service.ActiveMQ/*.csproj Service.ActiveMQ/
RUN dotnet restore Service.ActiveMQ
COPY Messages/ Messages/
COPY Service.ActiveMQ/ Service.ActiveMQ/
RUN dotnet publish Service.ActiveMQ -c Release --no-restore -o /app

FROM mcr.microsoft.com/dotnet/runtime:10.0 AS runtime
WORKDIR /app
Expand Down
3 changes: 1 addition & 2 deletions Examples/Messages/Obvs.Example.Messages.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,8 @@
<TargetFramework>netstandard2.0</TargetFramework>
</PropertyGroup>

<!-- Built from this repo until v7 is on NuGet; then this becomes <PackageReference Include="Obvs" Version="7.0.0" /> -->
<ItemGroup>
<ProjectReference Include="..\..\Obvs\Obvs.csproj" />
<PackageReference Include="Obvs" Version="7.0.2" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,11 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.Extensions.Hosting" Version="10.0.14" />
<PackageReference Include="Obvs.ActiveMQ" Version="7.0.2" />
<PackageReference Include="OpenTelemetry.Exporter.Console" Version="1.19.1" />
<PackageReference Include="OpenTelemetry.Extensions.Hosting" Version="1.19.1" />
</ItemGroup>
<!-- Built from this repo until v7 is on NuGet; then these become PackageReferences to Obvs and Obvs.ActiveMQ 7.0.0 -->
<ItemGroup>
<ProjectReference Include="..\..\Obvs.ActiveMQ\Obvs.ActiveMQ.csproj" />
<ProjectReference Include="..\Messages\Obvs.Example.Messages.csproj" />
</ItemGroup>
</Project>
12 changes: 8 additions & 4 deletions Examples/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,18 +8,22 @@ services:
ports:
- "61616:61616"
- "8161:8161"
# Ready once it accepts connections: the service connects as it starts
healthcheck:
test: ["CMD", "bash", "-c", "echo > /dev/tcp/localhost/61616"]
interval: 2s
retries: 30
networks:
- obvs
obvssvc1:
build:
context: ..
dockerfile: Examples/Dockerfile
build: .
image: obvs.example.service.activemq:latest
environment:
- ACTIVEMQ_BROKER_URI=activemq:tcp://amq:61616?connectionTimeout=0
- OBVS_SERVICE_NAME=Obvs.Service1
depends_on:
- amq
amq:
condition: service_healthy
networks:
- obvs

Expand Down