Skip to content

Commit

Permalink
Logging (#82)
Browse files Browse the repository at this point in the history
* Remove logging

* Re-enable logging

* Logging credentials using key

* Changed 'docker tag' command

* Another change to the 'docker tag' command

* Revert to P5

* Explicitly load P5 SDK in dotnet setup

* Disable NLog in UI

* Trash commit to allow reversion to main...

* Repaired Blazor.csproj; First attempt at new container tagging

* Add additional logging

* Experiment - Remove docker tag

* Added addition docker images trace

* Experiment - Remove package specification

* Restore additional docker images trace

* Direct push to Azure repository

* Added podman image list

* Really add podman list

* Update podman images command

* Another podman update...

* YAPU

* YAPU #2

* YAPU #3

* Re-enable NLOG in UI

* Revert to 'no tag' in dotnet publish for WIP

* Revert to working publish, update configuration string name

* Change to environment variables

* Fix appname for DS

* Change internal nlog file location

* Connection string directly in UI nlog config file

* More NLOG configuration

* Correct azure log extension

* Correct environment syntax

* Completion of logging changes
  • Loading branch information
MarkStega authored Aug 1, 2023
1 parent 74d6c18 commit aba7478
Show file tree
Hide file tree
Showing 38 changed files with 1,146 additions and 908 deletions.
29 changes: 13 additions & 16 deletions .github/workflows/GithubActionsRelease.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,22 +15,23 @@ on:
env:
appNameDS: 'icebg.web.ds'
appNameUI: 'icebg.web.ui'
containerRegistry: 'cricebg.azurecr.io'

jobs:

############################################################################################################
# These jobs are used to gate actions. By creating these jobs we don't need to proliferate the repo checks
############################################################################################################
perform-deployment:
name: Perform deployment
deployment-allowed:
name: Deployment allowed
runs-on: ubuntu-latest
if: github.repository == 'MarkStega/ICEBG' && github.actor != 'dependabot[bot]'
if: github.repository == 'MarkStega/ICEBG'
steps:
- name: Nothing to see here
run: echo ""

skip-deployment:
name: Skip deployment
deployment-not-allowed:
name: Deployment not allowed
runs-on: ubuntu-latest
if: github.repository != 'MarkStega/ICEBG'
steps:
Expand All @@ -50,7 +51,7 @@ jobs:
############################################################################################################
set-unified-version:
name: Create the date based unifiedVersion
needs: [perform-deployment]
needs: [deployment-allowed,build-allowed]
runs-on: ubuntu-latest
outputs:
unifiedVersion: ${{ steps.setUnifiedVersion.outputs.LocalUnifiedVersion }}
Expand Down Expand Up @@ -91,11 +92,9 @@ jobs:
username: ${{ secrets.REGISTRY_USERNAME }}
password: ${{ secrets.REGISTRY_PASSWORD }}

- name: Publish, tag, and push DS image
- name: Publish tagged DS image
run: |
dotnet publish ICEBG.Web.DataServices/ICEBG.Web.DataServices.csproj --os linux --arch x64 --configuration Azure -p:PublishProfile=DefaultContainer -p:Version=${{ env.unifiedVersion }} -p:ContainerImageName=${{env.appNameDS}}
docker tag ${{env.appNameDS}}:${{ env.unifiedVersion }} ${{ secrets.REGISTRY_LOGIN_SERVER }}/${{env.appNameDS}}:${{ env.unifiedVersion }}
docker push ${{ secrets.REGISTRY_LOGIN_SERVER }}/${{env.appNameDS}}:${{ env.unifiedVersion }}
dotnet publish ICEBG.Web.DataServices/ICEBG.Web.DataServices.csproj --os linux --arch x64 --configuration Azure -p:PublishProfile=DefaultContainer -p:Version=${{ env.unifiedVersion }} -p:ContainerRegistry=${{env.containerRegistry}} -p:ContainerRepository=${{env.appNameUI}} -p:ContainerImageName=${{env.appNameDS}} -p:ContainerImageTag=${{ env.unifiedVersion }} --no-self-contained
############################################################################################################
# Build and deploy blazor UI image
Expand Down Expand Up @@ -128,18 +127,16 @@ jobs:
username: ${{ secrets.REGISTRY_USERNAME }}
password: ${{ secrets.REGISTRY_PASSWORD }}

- name: Publish, tag, and push UI image
- name: Publish tagged UI image
run: |
dotnet publish ICEBG.Web.UserInterface/ICEBG.Web.UserInterface.csproj --os linux --arch x64 --configuration Azure -p:PublishProfile=DefaultContainer -p:Version=${{ env.unifiedVersion }} -p:ContainerImageName=${{env.appNameUI}} --sc
docker tag ${{env.appNameUI}}:${{ env.unifiedVersion }} ${{ secrets.REGISTRY_LOGIN_SERVER }}/${{env.appNameUI}}:${{ env.unifiedVersion }}
docker push ${{ secrets.REGISTRY_LOGIN_SERVER }}/${{env.appNameUI}}:${{ env.unifiedVersion }}
dotnet publish ICEBG.Web.UserInterface/ICEBG.Web.UserInterface.csproj --os linux --arch x64 --configuration Azure -p:PublishProfile=DefaultContainer -p:Version=${{ env.unifiedVersion }} -p:ContainerRegistry=${{env.containerRegistry}} -p:ContainerRepository=${{env.appNameUI}} -p:ContainerImageName=${{env.appNameUI}} -p:ContainerImageTag=${{ env.unifiedVersion }} --self-contained
############################################################################################################
# Build blazor DS image
############################################################################################################
build-ds:
name: Build ICEBG DS
needs: [skip-deployment, build-allowed]
needs: [deployment-not-allowed, build-allowed]
runs-on: windows-latest

steps:
Expand Down Expand Up @@ -167,7 +164,7 @@ jobs:
############################################################################################################
build-ui:
name: Build ICEBG UI
needs: [skip-deployment, build-allowed]
needs: [deployment-not-allowed, build-allowed]
runs-on: windows-latest

steps:
Expand Down
39 changes: 14 additions & 25 deletions .github/workflows/GithubActionsWIP.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,26 +12,25 @@ on:
env:
appNameDS: 'icebg.web.ds.wip'
appNameUI: 'icebg.web.ui.wip'
blazorServerDockerFile: './ICEBG.Web.UserInterface/Dockerfile-Server'
blazorWebAssemblyDockerFile: './ICEBG.Web.UserInterface/Dockerfile-WebAssembly'
containerRegistry: 'cricebg.azurecr.io'

jobs:

############################################################################################################
# These jobs are used to gate actions. By creating these jobs we don't need to proliferate the repo checks
############################################################################################################
perform-deployment:
name: Perform deployment
deployment-allowed:
name: Deployment allowed
runs-on: ubuntu-latest
if: github.repository == 'MarkStega/ICEBG' && github.actor != 'dependabot[bot]'
if: github.repository == 'MarkStega/ICEBG'
steps:
- name: Nothing to see here
run: echo ""

skip-deployment:
name: Skip deployment
deployment-not-allowed:
name: Deployment not allowed
runs-on: ubuntu-latest
if: github.repository != 'MarkStega/ICEBG' || github.actor == 'dependabot[bot]'
if: github.repository != 'MarkStega/ICEBG'
steps:
- name: Nothing to see here
run: echo ""
Expand All @@ -49,7 +48,7 @@ jobs:
############################################################################################################
set-unified-version:
name: Create the date based UnifiedVersion
needs: [perform-deployment]
needs: [deployment-allowed,build-allowed]
runs-on: ubuntu-latest
outputs:
unifiedVersion: ${{ steps.setUnifiedVersion.outputs.LocalUnifiedVersion }}
Expand Down Expand Up @@ -88,12 +87,9 @@ jobs:
username: ${{ secrets.REGISTRY_USERNAME }}
password: ${{ secrets.REGISTRY_PASSWORD }}

- name: Publish, tag, and push DS image
- name: Publish tagged DS image
run: |
dotnet publish ICEBG.Web.DataServices/ICEBG.Web.DataServices.csproj --os linux --arch x64 --configuration Azure -p:PublishProfile=DefaultContainer -p:Version=${{ env.unifiedVersion }} -p:ContainerImageName=${{env.appNameDS}}
docker tag ${{env.appNameDS}}:${{ env.unifiedVersion }} ${{ secrets.REGISTRY_LOGIN_SERVER }}/${{env.appNameDS}}:${{ env.unifiedVersion }}
docker push ${{ secrets.REGISTRY_LOGIN_SERVER }}/${{env.appNameDS}}:${{ env.unifiedVersion }}
docker images
dotnet publish ICEBG.Web.DataServices/ICEBG.Web.DataServices.csproj --os linux --arch x64 --configuration Azure -p:PublishProfile=DefaultContainer -p:Version=${{ env.unifiedVersion }} -p:ContainerRegistry=${{env.containerRegistry}} -p:ContainerRepository=${{env.appNameDS}} -p:ContainerImageTag=${{ env.unifiedVersion }} --no-self-contained
############################################################################################################
# Build and deploy blazor UI image
Expand Down Expand Up @@ -126,23 +122,16 @@ jobs:
username: ${{ secrets.REGISTRY_USERNAME }}
password: ${{ secrets.REGISTRY_PASSWORD }}

- name: Publish, tag, and push UI image
- name: Publish tagged UI image
run: |
dotnet publish ICEBG.Web.UserInterface/ICEBG.Web.UserInterface.csproj --os linux --arch x64 --configuration Azure -p:PublishProfile=DefaultContainer -p:Version=${{ env.unifiedVersion }} -p:ContainerImageName=${{env.appNameUI}} --sc
docker tag ${{env.appNameUI}}:${{ env.unifiedVersion }} ${{ secrets.REGISTRY_LOGIN_SERVER }}/${{env.appNameUI}}:${{ env.unifiedVersion }}
docker push ${{ secrets.REGISTRY_LOGIN_SERVER }}/${{env.appNameUI}}:${{ env.unifiedVersion }}
docker images
# run: |
# docker build . --file ${{ env.blazorServerDockerFile }} --tag ${{ secrets.REGISTRY_LOGIN_SERVER }}/${{ env.appNameUI }}:${{ env.unifiedVersion }} --build-arg version=${{ env.unifiedVersion }}
# docker push ${{ secrets.REGISTRY_LOGIN_SERVER }}/${{ env.appNameUI }}:${{ env.unifiedVersion }}
dotnet publish ICEBG.Web.UserInterface/ICEBG.Web.UserInterface.csproj --os linux --arch x64 --configuration Azure -p:PublishProfile=DefaultContainer -p:Version=${{ env.unifiedVersion }} -p:ContainerRegistry=${{env.containerRegistry}} -p:ContainerRepository=${{env.appNameUI}} -p:ContainerImageTag=${{ env.unifiedVersion }} --self-contained
############################################################################################################
# Build blazor DS image
############################################################################################################
build-ds:
name: Build ICEBG DS
needs: [skip-deployment, build-allowed]
needs: [deployment-not-allowed, build-allowed]
runs-on: ubuntu-latest

steps:
Expand Down Expand Up @@ -170,7 +159,7 @@ jobs:
############################################################################################################
build-ui:
name: Build ICEBG UI
needs: [skip-deployment, build-allowed]
needs: [deployment-not-allowed, build-allowed]
runs-on: ubuntu-latest

steps:
Expand Down
Loading

0 comments on commit aba7478

Please sign in to comment.