Skip to content

Commit

Permalink
Remove .NET 6 and .NET 7-specific content (#154)
Browse files Browse the repository at this point in the history
* Remove .NET 6 and .NET 7-specific content.

* Update GH actions (#155)

* Remove .NET 6 and .NET 7-specific content.

* Add permission to read contents

* Add pages write permission

* Comment out preview release

* Add id-token: write & update to newest action versions
  • Loading branch information
simonkurtz-MSFT authored Nov 4, 2024
1 parent e11804e commit ea27bb8
Show file tree
Hide file tree
Showing 21 changed files with 33 additions and 366 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/infra-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ jobs:
if : ${{ github.event.inputs.teardown != 'true' }}
name: Lint bicep files
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Perform linting
run: az bicep build --f bicep/main.bicep

Expand All @@ -46,7 +46,7 @@ jobs:
name: Create RG and Validate bicep template
needs: [ lint ]
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Azure login
uses: azure/login@v1
with:
Expand Down
21 changes: 13 additions & 8 deletions .github/workflows/preview-docs.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
name: Build and Preview Workshop Docs

permissions:
contents: write
pages: write
id-token: write

on:
pull_request:
branches:
Expand Down Expand Up @@ -38,14 +43,14 @@ jobs:
run: |
echo "GIT_PYTHON_REFRESH=quiet"
make build-docs-website
- name: Release preview to branch
if: "! github.event.pull_request.head.repo.fork "
uses: rossjrw/pr-preview-action@v1
with:
source-dir: ./dist/
preview-branch: gh-pages
umbrella-dir: pr-preview
action: auto
# - name: Release preview to branch
# if: "! github.event.pull_request.head.repo.fork "
# uses: rossjrw/pr-preview-action@v1
# with:
# source-dir: ./dist/
# preview-branch: gh-pages
# umbrella-dir: pr-preview
# action: auto
publish-preview-docs:
if: "! github.event.pull_request.head.repo.fork "
name: Preview
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/publish-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ jobs:
with:
ref: gh-pages
- name: Setup Pages
uses: actions/configure-pages@v3
uses: actions/configure-pages@v5
- name: Upload artifact
uses: actions/upload-pages-artifact@v1
uses: actions/upload-pages-artifact@v3
with:
path: '.'
- name: Deploy to GitHub Pages
Expand Down
2 changes: 1 addition & 1 deletion docs/aca/00-workshop-intro/4-prerequisites.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ The workshop is divided into separate modules. Each module will guide you throug
Make sure you have your development environment set up and configured.

1. An Azure account with an active subscription - [Create an account for free](https://azure.microsoft.com/free/?ref=microsoft.com&utm_source=microsoft.com&utm_medium=docs&utm_campaign=visualstudio){target=_blank}
1. dotnet 6.0 or a higher version - [Install](https://dotnet.microsoft.com/en-us/download){target=_blank}
1. .NET 8 or a higher version - [Install](https://dotnet.microsoft.com/en-us/download){target=_blank}
1. PowerShell 7.0 or higher version (For Windows Users only!) - [Install](https://learn.microsoft.com/en-us/powershell/scripting/install/installing-powershell-on-windows?view=powershell-7.4#installing-the-msi-package){target=_blank}
1. Docker Desktop - [Install](https://docs.docker.com/desktop/install/windows-install/){target=_blank}
1. Visual Studio Code - [Install](https://code.visualstudio.com/){target=_blank}
Expand Down
6 changes: 0 additions & 6 deletions docs/aca/01-deploy-api-to-aca/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,12 +42,6 @@ In this module, we will accomplish three objectives:

As our workshop takes advantage of microservices, the use case for minimal APIs is given. However, in order to make the workshop a bit more demonstrable, we will, for now, stick with controller-based APIs.

=== ".NET 7 or below"

```shell
dotnet new webapi -o TasksTracker.TasksManager.Backend.Api
```

=== ".NET 8 or above"

```shell
Expand Down
56 changes: 4 additions & 52 deletions docs/aca/03-aca-dapr-integration/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,11 +68,7 @@ You are now ready to run the applications locally using the Dapr sidecar in a se

#### 2.2 Test `{{ apps.backend }}` Locally

=== ".NET 6 or below"

--8<-- "snippets/dapr-run-backend-api.md:basic-dotnet6"

=== ".NET 7 or above"
=== ".NET 8 or above"

--8<-- "snippets/dapr-run-backend-api.md:basic"

Expand Down Expand Up @@ -131,23 +127,7 @@ You are now ready to run the applications locally using the Dapr sidecar in a se

- Install Dapr SDK for .NET Core in the Frontend Web APP, so we can use the service discovery and service invocation offered by Dapr Sidecar. To do so, add below nuget package to the project.

=== ".NET 6"
=== "TasksTracker.WebPortal.Frontend.Ui.csproj"

```xml
<ItemGroup>
<PackageReference Include="Dapr.AspNetCore" Version="{{ dapr.version }}" />
</ItemGroup>
```

=== ".NET 7"
=== "TasksTracker.WebPortal.Frontend.Ui.csproj"

```xml hl_lines="9-11"
--8<-- "docs/aca/03-aca-dapr-integration/Frontend.Ui-dotnet7.csproj"
```

=== ".NET 8"
=== ".NET 8 or above"
=== "TasksTracker.WebPortal.Frontend.Ui.csproj"

```xml hl_lines="9-11"
Expand All @@ -156,29 +136,7 @@ You are now ready to run the applications locally using the Dapr sidecar in a se

- Next, open the file `Programs.cs` of the Frontend Web App and register the DaprClient as the highlighted below.

=== ".NET 6"
=== "Program.cs"

```csharp hl_lines="11"
namespace TasksTracker.WebPortal.Frontend.Ui
{
public class Program
{
public static void Main(string[] args)
{
var builder = WebApplication.CreateBuilder(args);
// Add services to the container.
builder.Services.AddRazorPages();
// Code removed for brevity
builder.Services.AddDaprClient();
var app = builder.Build();
// Code removed for brevity
}
}
}
```

=== ".NET 7 or above"
=== ".NET 8 or above"
=== "Program.cs"

```csharp hl_lines="6"
Expand Down Expand Up @@ -230,13 +188,7 @@ We are ready now to verify the changes on the Frontend Web App and test locally.

- In each of the two terminals previously opened, run the frontend UI and backend API respectively.

=== ".NET 6 or below"

--8<-- "snippets/dapr-run-frontend-webapp.md:basic-dotnet6"

--8<-- "snippets/dapr-run-backend-api.md:basic-dotnet6"

=== ".NET 7 or above"
=== ".NET 8 or above"

--8<-- "snippets/dapr-run-frontend-webapp.md:basic"

Expand Down
15 changes: 0 additions & 15 deletions docs/aca/04-aca-dapr-stateapi/Backend.Api-dotnet7.csproj

This file was deleted.

28 changes: 2 additions & 26 deletions docs/aca/04-aca-dapr-stateapi/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,7 @@ Dapr's state management API allows you to save, read, and query key/value pairs

To try out the State Management APIs, run the Backend API from VS Code by running the following command.

=== ".NET 6 or below"

--8<-- "snippets/dapr-run-backend-api.md:basic-dotnet6"

=== ".NET 7 or above"
=== ".NET 8 or above"

--8<-- "snippets/dapr-run-backend-api.md:basic"

Expand Down Expand Up @@ -125,22 +121,6 @@ Whereas in the previous section we demonstrated using Dapr State Store without c

Similar to what we have done in the Frontend Web App, we need to use Dapr Client SDK to manage the state store. Update the below file with the added Dapr package reference:

=== ".NET 6"
=== "TasksTracker.TasksManager.Backend.Api.csproj"

```xml
<ItemGroup>
<PackageReference Include="Dapr.AspNetCore" Version="{{ dapr.version }}" />
</ItemGroup>
```

=== ".NET 7"
=== "TasksTracker.TasksManager.Backend.Api.csproj"

```xml hl_lines="10"
--8<-- "docs/aca/04-aca-dapr-stateapi/Backend.Api-dotnet7.csproj"
```

=== ".NET 8"
=== "TasksTracker.TasksManager.Backend.Api.csproj"

Expand Down Expand Up @@ -315,11 +295,7 @@ This will instruct dapr to load the local projects components located at **./com
If you have been using the dapr cli commands instead of the aforementioned debugging then you will need to execute the backend api with the resources-path property as follows.
=== ".NET 6 or below"
--8<-- "snippets/dapr-run-backend-api.md:dapr-components-dotnet6"
=== ".NET 7 or above"
=== ".NET 8 or above"
--8<-- "snippets/dapr-run-backend-api.md:dapr-components"
Expand Down
15 changes: 0 additions & 15 deletions docs/aca/05-aca-dapr-pubsubapi/Backend.Svc-dotnet7.csproj

This file was deleted.

19 changes: 0 additions & 19 deletions docs/aca/05-aca-dapr-pubsubapi/Program-dotnet6.cs

This file was deleted.

56 changes: 5 additions & 51 deletions docs/aca/05-aca-dapr-pubsubapi/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,11 +50,7 @@ However, we want to have more control and provide our own component file, so let

To try out the Pub/Sub API, run the Backend API from VS Code by running the below command or using the Run and Debug tasks we have created in the [appendix](../30-appendix/01-run-debug-dapr-app-vscode.md).

=== ".NET 6 or below"

--8<-- "snippets/dapr-run-backend-api.md:dapr-components-dotnet6"

=== ".NET 7 or above"
=== ".NET 8 or above"

--8<-- "snippets/dapr-run-backend-api.md:dapr-components"

Expand Down Expand Up @@ -102,12 +98,6 @@ Now we will add a new ASP.NET Core Web API project named **TasksTracker.Processo

As our workshop takes advantage of microservices, the use case for minimal APIs is given. However, in order to make the workshop a bit more demonstrable, we will, for now, stick with controller-based APIs.

=== ".NET 7 or below"

```shell
dotnet new webapi -o TasksTracker.Processor.Backend.Svc
```

=== ".NET 8 or above"

```shell
Expand Down Expand Up @@ -135,25 +125,7 @@ Now we will add the model which will be used to deserialize the published messag

Now we will install Dapr SDK to be able to subscribe to the service broker topic in a programmatic way. Add the highlighted NuGet package to the file shown below:

=== ".NET 6"

=== "TasksTracker.Processor.Backend.Svc.csproj"

```xml
<ItemGroup>
<PackageReference Include="Dapr.AspNetCore" Version="{{ dapr.version }}" />
</ItemGroup>
```

=== ".NET 7"

=== "TasksTracker.Processor.Backend.Svc.csproj"

```xml hl_lines="10"
--8<-- "docs/aca/05-aca-dapr-pubsubapi/Backend.Svc-dotnet7.csproj"
```

=== ".NET 8"
=== ".NET 8 or above"

=== "TasksTracker.Processor.Backend.Svc.csproj"

Expand Down Expand Up @@ -211,15 +183,7 @@ In our case, a sample response will be as follows:

Update below file in **TasksTracker.Processor.Backend.Svc** project.

=== ".NET 6"

=== "Program.cs"

```csharp hl_lines="9 13 15"
--8<-- "docs/aca/05-aca-dapr-pubsubapi/Program-dotnet6.cs"
```

=== ".NET 7 or above"
=== ".NET 8 or above"

=== "Program.cs"

Expand Down Expand Up @@ -257,12 +221,7 @@ To do so, run the below commands in two separate PowerShell console, ensure you
--8<-- "snippets/restore-variables.md:7:11"
=== ".NET 6 or below"
--8<-- "snippets/dapr-run-backend-api.md:dapr-components-dotnet6"
--8<-- "snippets/dapr-run-backend-service.md:dapr-components-dotnet6"
=== ".NET 7 or above"
=== ".NET 8 or above"
--8<-- "snippets/dapr-run-backend-api.md:dapr-components"
--8<-- "snippets/dapr-run-backend-service.md:dapr-components"
Expand Down Expand Up @@ -418,12 +377,7 @@ With all those bits in place, we are ready to run the publisher service `Backend
!!! note
Ensure you are on the right root folder of each respective project.
=== ".NET 6 or below"
--8<-- "snippets/dapr-run-backend-api.md:dapr-components-dotnet6"
--8<-- "snippets/dapr-run-backend-service.md:dapr-components-dotnet6"
=== ".NET 7 or above"
=== ".NET 8 or above"
--8<-- "snippets/dapr-run-backend-api.md:dapr-components"
--8<-- "snippets/dapr-run-backend-service.md:dapr-components"
Expand Down
8 changes: 1 addition & 7 deletions docs/aca/06-aca-dapr-bindingsapi/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -212,13 +212,7 @@ Now we are ready to give it an end-to-end test on our dev machines. To do so, ru

--8<-- "snippets/restore-variables.md:7:11"

=== ".NET 6 or below"

--8<-- "snippets/dapr-run-frontend-webapp.md:basic-dotnet6"
--8<-- "snippets/dapr-run-backend-api.md:dapr-components-dotnet6"
--8<-- "snippets/dapr-run-backend-service.md:dapr-components-dotnet6"

=== ".NET 7 or above"
=== ".NET 8 or above"

--8<-- "snippets/dapr-run-frontend-webapp.md:basic"
--8<-- "snippets/dapr-run-backend-api.md:dapr-components"
Expand Down
Loading

0 comments on commit ea27bb8

Please sign in to comment.