Skip to content

Commit

Permalink
Build and Deploy Microsoft Teams container (#33)
Browse files Browse the repository at this point in the history
### Summary & Motivation
Update the CalendarAssistant pipeline to automate the build and
deployment of the Microsoft Teams application. This enhancement enables
streamlined deployment into Azure Container Apps.

### Atomic Changes
- Build and Deploy Microsoft Teams container

### Checklist

- [x] I have added a Label to the pull-request
- [x] I have added tests, and done manual regression tests
- [x] I have updated the documentation, if necessary
  • Loading branch information
BlueBasher authored Sep 27, 2024
1 parent 464bedc commit aa5dac1
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 1 deletion.
27 changes: 27 additions & 0 deletions .github/workflows/calendar-assistant.yml
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,19 @@ jobs:
name: calendar-assistant-api
path: application/calendar-assistant/Api/publish/**/*

- name: Publish MicrosoftTeams build
if: github.ref == 'refs/heads/main'
working-directory: application/calendar-assistant
run: |
dotnet publish ./MicrosoftTeams/CalendarAssistant.MicrosoftTeams.csproj --no-restore --configuration Release --output ./MicrosoftTeams/publish /p:Version=${{ steps.generate_version.outputs.version }}
- name: Save MicrosoftTeams artifacts
if: github.ref == 'refs/heads/main'
uses: actions/upload-artifact@v4
with:
name: calendar-assistant-microsoft-teams
path: application/calendar-assistant/MicrosoftTeams/publish/**/*

- name: Publish Worker build
if: github.ref == 'refs/heads/main'
working-directory: application/calendar-assistant
Expand Down Expand Up @@ -221,6 +234,20 @@ jobs:
docker_context: ./application/calendar-assistant
docker_file: ./Api/Dockerfile

microsoft-teams-deploy:
name: Deploy MicrosoftTeams
if: github.ref == 'refs/heads/main'
needs: [build-and-test]
uses: ./.github/workflows/_deploy-container.yml
secrets: inherit
with:
image_name: calendar-assistant-microsoft-teams
version: ${{ needs.build-and-test.outputs.version }}
artifacts_name: calendar-assistant-microsoft-teams
artifacts_path: application/calendar-assistant/MicrosoftTeams/publish
docker_context: ./application/calendar-assistant
docker_file: ./MicrosoftTeams/Dockerfile

workers-deploy:
name: Deploy Workers
if: github.ref == 'refs/heads/main'
Expand Down
11 changes: 11 additions & 0 deletions application/calendar-assistant/MicrosoftTeams/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
FROM mcr.microsoft.com/dotnet/aspnet:8.0-alpine

RUN apk add --no-cache icu-libs
ENV DOTNET_SYSTEM_GLOBALIZATION_INVARIANT=false

WORKDIR /app
COPY ./MicrosoftTeams/publish .

USER app

ENTRYPOINT ["dotnet", "Moment42.CalendarAssistant.MicrosoftTeams.dll"]
2 changes: 1 addition & 1 deletion cloud-infrastructure/cluster/calendar-assistant.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ module calendarAssistantMicrosoftTeams '../modules/container-app.bicep' = {
name: '${resourceGroupName}-calendar-assistant-microsoft-teams-container-app'
scope: clusterResourceGroup
params: {
name: 'calendar-assistant-microsoft-teams'
name: 'calendar-assistant-ms-teams'
location: location
tags: tags
resourceGroupName: resourceGroupName
Expand Down

0 comments on commit aa5dac1

Please sign in to comment.