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

Review Event Grid Reaction #134

Merged
merged 5 commits into from
Jan 3, 2025
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
7 changes: 3 additions & 4 deletions cli/service/resources/default-reaction-providers.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -62,13 +62,12 @@ spec:
config_schema:
type: object
properties:
EventGridUri:
eventGridUri:
type: string
EventGridKey:
eventGridKey:
type: string
required:
- EventGridUri
- EventGridKey
- eventGridUri
---
apiVersion: v1
kind: ReactionProvider
Expand Down
18 changes: 0 additions & 18 deletions reactions/azure/eventgrid-reaction/.dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,23 +3,5 @@
**/.env
**/.git
**/.gitignore
**/.project
**/.settings
**/.toolstarget
**/.vs
**/.vscode
**/*.*proj.user
**/*.dbmdl
**/*.jfm
**/azds.yaml
**/bin
**/charts
**/docker-compose*
**/Dockerfile*
**/node_modules
**/npm-debug.log
**/obj
**/secrets.dev.yaml
**/values.dev.yaml
LICENSE
README.md
1 change: 1 addition & 0 deletions reactions/azure/eventgrid-reaction/.gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
/appsettings.Development.json
.vs
35 changes: 12 additions & 23 deletions reactions/azure/eventgrid-reaction/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,26 +12,15 @@
# See the License for the specific language governing permissions and
# limitations under the License.

#See https://aka.ms/containerfastmode to understand how Visual Studio uses this Dockerfile to build your images for faster debugging.

FROM --platform=$TARGETPLATFORM mcr.microsoft.com/dotnet/aspnet@sha256:22414f335b79654fb42257326e7f17f18edf8f912578fc33a55c5dd609bd022e AS base
# mcr.microsoft.com/dotnet/aspnet:6.0
WORKDIR /app
EXPOSE 80

FROM --platform=$BUILDPLATFORM mcr.microsoft.com/dotnet/sdk@sha256:6df1177e48b55272316d08f19cb383483af82aca5cdc67a76c414bc200847624 AS build
# mcr.microsoft.com/dotnet/sdk:6.0
WORKDIR /src
COPY ["eventgrid-reaction.csproj", "."]
RUN dotnet restore "./eventgrid-reaction.csproj"
COPY . .
WORKDIR "/src/."
RUN dotnet build "eventgrid-reaction.csproj" -c Release -o /app/build

FROM build AS publish
RUN dotnet publish "eventgrid-reaction.csproj" -c Release -o /app/publish /p:UseAppHost=false

FROM base AS final
WORKDIR /app
COPY --from=publish /app/publish .
ENTRYPOINT ["dotnet", "eventgrid-reaction.dll"]

FROM mcr.microsoft.com/dotnet/sdk:8.0-cbl-mariner2.0 AS build
ARG BUILD_CONFIGURATION=Release
WORKDIR /src
COPY . .
RUN dotnet restore
RUN dotnet build -c $BUILD_CONFIGURATION -o /app/build

FROM mcr.microsoft.com/dotnet/aspnet:8.0-cbl-mariner2.0 AS final
WORKDIR /app
COPY --from=build /app/build .
ENTRYPOINT ["/app/eventgrid-reaction"]
9 changes: 7 additions & 2 deletions reactions/azure/eventgrid-reaction/Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
.PHONY: default docker-build kind-load
.PHONY: default docker-build kind-load generate-types

CLUSTER_NAME ?= kind
IMAGE_PREFIX ?= drasi-project
Expand All @@ -17,4 +17,9 @@ test:
@echo "No tests to run yet"

lint-check:
@echo "No lint checks to run yet"
@echo "No lint checks to run yet"

generate-types:
npm run clean --prefix ../../../typespec
npm run build ./output-unpacked --prefix ../../../typespec
quicktype --src-lang schema -l cs -o Models/Unpacked.generated.cs ../../../typespec/output-unpacked/_generated/@typespec/json-schema/*.yaml --framework SystemTextJson --namespace Drasi.Reactions.EventGrid.Models.Unpacked
53 changes: 0 additions & 53 deletions reactions/azure/eventgrid-reaction/Models/ChangeNotification.cs

This file was deleted.

Loading
Loading