This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def main(req: func.HttpRequest) -> func.HttpResponse: | |
skill_builder = SkillBuilder() | |
skill_builder.skill_id = os.environ["AlexaSkillID"] | |
skill_builder.add_request_handler(LaunchRequestHandler()) | |
skill_builder.add_request_handler(ReadTopFiveItems()) | |
skill_builder.add_request_handler(ReadItemsFromDate()) | |
skill_builder.add_request_handler(HelpIntentHandler()) | |
skill_builder.add_request_handler(CancelOrStopIntentHandler()) | |
skill_builder.add_request_handler(SessionEndedRequestHandler()) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class LaunchRequestHandler(AbstractRequestHandler): | |
"""Handler for LaunchRequest.""" | |
def can_handle(self, handler_input): | |
return ask_utils.is_request_type("LaunchRequest")(handler_input) | |
def handle(self, handler_input): | |
logging.info("Called Skill Handler for LaunchRequest Intent.") | |
speak_output = "Hi there! I'm the Azure news service and I can read you the latest Azure cloud news.\r\nYou can ask for the latest news by saying <break time='0.5s'/>'latest news', or ask for the top news items from a specific date by saying <break time='0.5s'/>'top news from'<break time='0.5s'/> and then the date, making sure to include the year." |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class ReadTopFiveItems(AbstractRequestHandler): | |
"""Handler for ReadTopFive Intent.""" | |
def can_handle(self, handler_input): | |
return ask_utils.is_intent_name("ReadTopFive")(handler_input) | |
def handle(self, handler_input): | |
logging.info("Called Skill Handler for ReadTopFive Intent.") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import logging | |
import azure.functions as func | |
import os | |
from azure.storage.blob import BlobClient, BlobSasPermissions, generate_blob_sas | |
from datetime import datetime, timedelta, timezone | |
from pptx import Presentation | |
from pptx.util import Pt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apiVersion: apps/v1 | |
kind: Deployment | |
metadata: | |
name: {{ include "mvcmusicstoreweb.fullname" . }} | |
labels: | |
{{- include "mvcmusicstoreweb.labels" . | nindent 4 }} | |
spec: | |
{{- if not .Values.autoscaling.enabled }} | |
replicas: {{ .Values.replicaCount }} | |
{{- end }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build Windows Container Image | |
on: | |
push: | |
branches: [ deploy-to-k8s ] | |
pull_request: | |
branches: [ deploy-to-k8s ] | |
workflow_dispatch: | |
env: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Default values for mvcmusicstoreweb. | |
# This is a YAML-formatted file. | |
# Declare variables to be passed into your templates. | |
replicaCount: 1 | |
image: | |
repository: your_repo.azurecr.io/mvcmusicstoreweb | |
pullPolicy: Always | |
# Overrides the image tag whose default is the chart appVersion. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apiVersion: v2 | |
name: mvcmusicstoreweb | |
description: MVC Music Store web application | |
# A chart can be either an 'application' or a 'library' chart. | |
# | |
# Application charts are a collection of templates that can be packaged into versioned archives | |
# to be deployed. | |
# | |
# Library charts provide useful utilities or functions for the chart developer. They're included as |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build Windows Container Image | |
on: | |
push: | |
branches: [ post-containerisation ] | |
pull_request: | |
branches: [ post-containerisation ] | |
workflow_dispatch: | |
env: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM mcr.microsoft.com/dotnet/framework/sdk:4.8 AS build | |
WORKDIR /app | |
# copy csproj and restore as distinct layers | |
COPY MvcMusicStore-Completed/*.sln . | |
COPY MvcMusicStore-Completed/MvcMusicStore/*.csproj ./MvcMusicStore/ | |
COPY MvcMusicStore-Completed/MvcMusicStore/*.config ./MvcMusicStore/ | |
RUN nuget restore | |
# copy everything else and build app |