diff --git a/.github/workflows/development.yaml b/.github/workflows/development.yaml
index bed8719..e0d21c3 100644
--- a/.github/workflows/development.yaml
+++ b/.github/workflows/development.yaml
@@ -11,12 +11,57 @@ on:
jobs:
build-and-publish:
runs-on: ubuntu-latest
-
+ permissions:
+ contents: read
+ checks: write
+
steps:
# Step 1: Checkout the repository
- name: Checkout code
uses: actions/checkout@v2
+ # Step 2: Set up .NET environment
+ - name: Set up .NET
+ uses: actions/setup-dotnet@v3
+ with:
+ dotnet-version: '8.0'
+
+ # Step 4: Restore dependencies
+ - name: Restore dependencies for Unit Tests
+ run: dotnet restore SystemAdmin-UnitTests/SystemAdmin-UnitTests.csproj
+
+ # Step 5: Run Unit Tests
+ - name: Run Unit Tests
+ run: dotnet test SystemAdmin-UnitTests/SystemAdmin-UnitTests.csproj --logger "trx;LogFileName=unit-test-results.trx" --results-directory ./TestResults --verbosity normal
+
+ # Step 6: Restore Dependencies for Functional Tests
+ - name: Restore dependencies for Functional Tests
+ run: dotnet restore SystemAdmin-FunctionalTests/SystemAdmin-FunctionalTests.csproj
+
+ # Step 7: Run Functional Tests
+ - name: Run Functional Tests
+ run: dotnet test SystemAdmin-FunctionalTests/SystemAdmin-FunctionalTests.csproj --logger "trx;LogFileName=functional-test-results.trx" --results-directory ./TestResults --verbosity normal
+
+ # Step 8: List Test Result Files
+ - name: List Test Result Files
+ run: ls -R ./TestResults
+
+ # Step 9: Upload Test Results with Test Reporter
+ - name: Upload Test Results
+ uses: dorny/test-reporter@v1
+ with:
+ name: Unit and Functional Tests
+ path: ./TestResults/*.trx
+ reporter: dotnet-trx
+
+ # Step 10: Extract the Version tag from the Docker File
+ - name: Extract Version Tag
+ id: extract_version
+ run: |
+ VERSION=$(grep 'LABEL version=' SystemAdmin/Dockerfile | sed 's/.*"\(.*\)"/\1/')
+ echo "VERSION=$VERSION"
+ echo "VERSION=$VERSION" >> $GITHUB_ENV
+
# Step 2: Login to Docker Hub
- name: Log in to Docker Hub
uses: docker/login-action@v2
@@ -27,11 +72,16 @@ jobs:
# Step 3: Build the Docker image
- name: Build Docker image
run: |
- docker build -t ${{ secrets.DOCKER_HUB_USERNAME }}/systemadmin:dev -f ./Dockerfile .
+ echo "VERSION=$VERSION"
+ echo "VERSION from GITHUB_ENV is: ${{ env.VERSION }}"
+ docker build --build-arg AZURE_DEVOPS_PAT=${{ secrets.AZURE_DEVOPS_PAT }} -t ${{ secrets.DOCKER_HUB_USERNAME }}/systemadmin:dev -t ${{ secrets.DOCKER_HUB_USERNAME }}/systemadmin:${{ env.VERSION }} -f ./Dockerfile .
+
# Step 4: Push Docker image to Docker Hub
- name: Push Docker image to Docker Hub
run: |
docker push ${{ secrets.DOCKER_HUB_USERNAME }}/systemadmin:dev
+ docker push ${{ secrets.DOCKER_HUB_USERNAME }}/systemadmin:${{ env.VERSION }}
+
# Step 5: Trigger Azure Release Pipeline
- name: Trigger Azure DevOps Pipeline
uses: Azure/pipelines@v1.2
@@ -39,5 +89,6 @@ jobs:
azure-devops-project-url: ${{ secrets.AZURE_DEVOPS_PROJECT_URL }}
azure-pipeline-name: 'thattonBL.GlobalIntegrationUI'
azure-devops-token: ${{ secrets.AZURE_DEVOPS_PAT }}
+ azure-pipeline-variables: '{"DOCKER_IMAGE_VERSION": "${{ env.VERSION }}"}'
- uses: actions/checkout@v2
diff --git a/.github/workflows/docker-image.yml b/.github/workflows/docker-image.yml
index 34f700e..a6ed995 100644
--- a/.github/workflows/docker-image.yml
+++ b/.github/workflows/docker-image.yml
@@ -11,12 +11,64 @@ on:
jobs:
build-and-publish:
runs-on: ubuntu-latest
-
+ permissions:
+ contents: read
+ checks: write
+
steps:
# Step 1: Checkout the repository
- name: Checkout code
uses: actions/checkout@v2
+ # Step 2: Set up .NET environment
+ - name: Set up .NET
+ uses: actions/setup-dotnet@v3
+ with:
+ dotnet-version: '8.0'
+
+ # Step 3: Authenticate with Azure Artifacts
+ - name: Authenticate with Azure Artifacts
+ run: |
+ echo ${{ secrets.AZURE_DEVOPS_PAT }} | dotnet nuget add source --store-password-in-clear-text \
+ --name azure-artifacts https://pkgs.dev.azure.com/BritishLibrary-AppDev/Gateway/_packaging/Gateway_Nuget_Feed/nuget/v3/index.json \
+ --username GitHubActions --password ${{ secrets.AZURE_DEVOPS_PAT }}
+
+ # Step 4: Restore dependencies
+ - name: Restore dependencies for Unit Tests
+ run: dotnet restore SystemAdmin-UnitTests/SystemAdmin-UnitTests.csproj
+
+ # Step 5: Run Unit Tests
+ - name: Run Unit Tests
+ run: dotnet test SystemAdmin-UnitTests/SystemAdmin-UnitTests.csproj --logger "trx;LogFileName=unit-test-results.trx" --results-directory ./TestResults --verbosity normal
+
+ # Step 6: Restore Dependencies for Functional Tests
+ - name: Restore dependencies for Functional Tests
+ run: dotnet restore SystemAdmin-FunctionalTests/SystemAdmin-FunctionalTests.csproj
+
+ # Step 7: Run Functional Tests
+ - name: Run Functional Tests
+ run: dotnet test SystemAdmin-FunctionalTests/SystemAdmin-FunctionalTests.csproj --logger "trx;LogFileName=functional-test-results.trx" --results-directory ./TestResults --verbosity normal
+
+ # Step 8: List Test Result Files
+ - name: List Test Result Files
+ run: ls -R ./TestResults
+
+ # Step 9: Upload Test Results with Test Reporter
+ - name: Upload Test Results
+ uses: dorny/test-reporter@v1
+ with:
+ name: Unit and Functional Tests
+ path: ./TestResults/*.trx
+ reporter: dotnet-trx
+
+ # Step 10: Extract the Version tag from the Docker File
+ - name: Extract Version Tag
+ id: extract_version
+ run: |
+ VERSION=$(grep 'LABEL version=' SystemAdmin/Dockerfile | sed 's/.*"\(.*\)"/\1/')
+ echo "VERSION=$VERSION"
+ echo "VERSION=$VERSION" >> $GITHUB_ENV
+
# Step 2: Login to Docker Hub
- name: Log in to Docker Hub
uses: docker/login-action@v2
@@ -27,11 +79,16 @@ jobs:
# Step 3: Build the Docker image
- name: Build Docker image
run: |
- docker build -t ${{ secrets.DOCKER_HUB_USERNAME }}/systemadmin:latest -f ./Dockerfile .
+ echo "VERSION=$VERSION"
+ echo "VERSION from GITHUB_ENV is: ${{ env.VERSION }}"
+ docker build --build-arg AZURE_DEVOPS_PAT=${{ secrets.AZURE_DEVOPS_PAT }} -t ${{ secrets.DOCKER_HUB_USERNAME }}/systemadmin:latest -t ${{ secrets.DOCKER_HUB_USERNAME }}/systemadmin:${{ env.VERSION }} -f ./Dockerfile .
+
# Step 4: Push Docker image to Docker Hub
- name: Push Docker image to Docker Hub
run: |
docker push ${{ secrets.DOCKER_HUB_USERNAME }}/systemadmin:latest
+ docker push ${{ secrets.DOCKER_HUB_USERNAME }}/gatewaygrpcservice:${{ env.VERSION }}
+
# Step 5: Trigger Azure Release Pipeline
- name: Trigger Azure DevOps Pipeline
uses: Azure/pipelines@v1.2
@@ -39,5 +96,6 @@ jobs:
azure-devops-project-url: ${{ secrets.AZURE_DEVOPS_PROJECT_URL }}
azure-pipeline-name: 'thattonBL.GlobalIntegrationUI'
azure-devops-token: ${{ secrets.AZURE_DEVOPS_PAT }}
-
+ azure-pipeline-variables: '{"DOCKER_IMAGE_VERSION": "${{ env.VERSION }}"}'
+
- uses: actions/checkout@v2
diff --git a/SystemAdmin-FunctionalTests/SystemAdmin-FunctionalTests.csproj b/SystemAdmin-FunctionalTests/SystemAdmin-FunctionalTests.csproj
new file mode 100644
index 0000000..fce43f8
--- /dev/null
+++ b/SystemAdmin-FunctionalTests/SystemAdmin-FunctionalTests.csproj
@@ -0,0 +1,24 @@
+
+
+
+ net8.0
+ SystemAdmin_FunctionalTests
+ enable
+ enable
+
+ false
+ true
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/SystemAdmin-FunctionalTests/UnitTest1.cs b/SystemAdmin-FunctionalTests/UnitTest1.cs
new file mode 100644
index 0000000..2e2698e
--- /dev/null
+++ b/SystemAdmin-FunctionalTests/UnitTest1.cs
@@ -0,0 +1,12 @@
+namespace SystemAdmin_FunctionalTests
+{
+ public class UnitTest1
+ {
+ [Fact]
+ public void PlaceholderTest()
+ {
+ var myString = "Someone needs to write some blooming functional tests for this...";
+ Assert.True(myString.Length > 2);
+ }
+ }
+}
\ No newline at end of file
diff --git a/SystemAdmin-UnitTests/SystemAdmin-UnitTests.csproj b/SystemAdmin-UnitTests/SystemAdmin-UnitTests.csproj
new file mode 100644
index 0000000..011c829
--- /dev/null
+++ b/SystemAdmin-UnitTests/SystemAdmin-UnitTests.csproj
@@ -0,0 +1,24 @@
+
+
+
+ net8.0
+ SystemAdmin_UnitTests
+ enable
+ enable
+
+ false
+ true
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/SystemAdmin-UnitTests/UnitTest1.cs b/SystemAdmin-UnitTests/UnitTest1.cs
new file mode 100644
index 0000000..2073616
--- /dev/null
+++ b/SystemAdmin-UnitTests/UnitTest1.cs
@@ -0,0 +1,12 @@
+namespace SystemAdmin_UnitTests
+{
+ public class UnitTest1
+ {
+ [Fact]
+ public void PlaceholderTest()
+ {
+ var myString = "Someone needs to write some blooming unit tests for this...";
+ Assert.True(myString.Length > 2);
+ }
+ }
+}
\ No newline at end of file
diff --git a/SystemAdmin.sln b/SystemAdmin.sln
index 43b59f0..55a64ff 100644
--- a/SystemAdmin.sln
+++ b/SystemAdmin.sln
@@ -3,7 +3,11 @@ Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17
VisualStudioVersion = 17.9.34902.65
MinimumVisualStudioVersion = 10.0.40219.1
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SystemAdmin", "SystemAdmin.csproj", "{6D0D51F4-E72E-456E-88FD-E4B96BC0B4B5}"
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "SystemAdmin-FunctionalTests", "SystemAdmin-FunctionalTests\SystemAdmin-FunctionalTests.csproj", "{0B503B40-279B-4055-AE9E-7F89C60C1593}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "SystemAdmin-UnitTests", "SystemAdmin-UnitTests\SystemAdmin-UnitTests.csproj", "{A2DCAED5-9363-4A65-9A17-4B56A506BBFD}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "SystemAdmin", "SystemAdmin\SystemAdmin.csproj", "{7768F08C-D6D9-4C62-818A-CCAD7F992851}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
@@ -11,10 +15,18 @@ Global
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
- {6D0D51F4-E72E-456E-88FD-E4B96BC0B4B5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {6D0D51F4-E72E-456E-88FD-E4B96BC0B4B5}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {6D0D51F4-E72E-456E-88FD-E4B96BC0B4B5}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {6D0D51F4-E72E-456E-88FD-E4B96BC0B4B5}.Release|Any CPU.Build.0 = Release|Any CPU
+ {0B503B40-279B-4055-AE9E-7F89C60C1593}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {0B503B40-279B-4055-AE9E-7F89C60C1593}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {0B503B40-279B-4055-AE9E-7F89C60C1593}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {0B503B40-279B-4055-AE9E-7F89C60C1593}.Release|Any CPU.Build.0 = Release|Any CPU
+ {A2DCAED5-9363-4A65-9A17-4B56A506BBFD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {A2DCAED5-9363-4A65-9A17-4B56A506BBFD}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {A2DCAED5-9363-4A65-9A17-4B56A506BBFD}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {A2DCAED5-9363-4A65-9A17-4B56A506BBFD}.Release|Any CPU.Build.0 = Release|Any CPU
+ {7768F08C-D6D9-4C62-818A-CCAD7F992851}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {7768F08C-D6D9-4C62-818A-CCAD7F992851}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {7768F08C-D6D9-4C62-818A-CCAD7F992851}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {7768F08C-D6D9-4C62-818A-CCAD7F992851}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
diff --git a/SystemAdmin/.dockerignore b/SystemAdmin/.dockerignore
new file mode 100644
index 0000000..fe1152b
--- /dev/null
+++ b/SystemAdmin/.dockerignore
@@ -0,0 +1,30 @@
+**/.classpath
+**/.dockerignore
+**/.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
+!**/.gitignore
+!.git/HEAD
+!.git/config
+!.git/packed-refs
+!.git/refs/heads/**
\ No newline at end of file
diff --git a/Controllers/HomeController.cs b/SystemAdmin/Controllers/HomeController.cs
similarity index 100%
rename from Controllers/HomeController.cs
rename to SystemAdmin/Controllers/HomeController.cs
diff --git a/Controllers/StatusController.cs b/SystemAdmin/Controllers/StatusController.cs
similarity index 100%
rename from Controllers/StatusController.cs
rename to SystemAdmin/Controllers/StatusController.cs
diff --git a/Dockerfile b/SystemAdmin/Dockerfile
similarity index 97%
rename from Dockerfile
rename to SystemAdmin/Dockerfile
index 632f658..0656924 100644
--- a/Dockerfile
+++ b/SystemAdmin/Dockerfile
@@ -22,4 +22,5 @@ RUN dotnet publish "./SystemAdmin.csproj" -c $BUILD_CONFIGURATION -o /app/publis
FROM base AS final
WORKDIR /app
COPY --from=publish /app/publish .
+LABEL version="1.0.0"
ENTRYPOINT ["dotnet", "SystemAdmin.dll"]
\ No newline at end of file
diff --git a/Models/ErrorViewModel.cs b/SystemAdmin/Models/ErrorViewModel.cs
similarity index 100%
rename from Models/ErrorViewModel.cs
rename to SystemAdmin/Models/ErrorViewModel.cs
diff --git a/Models/StatusModel.cs b/SystemAdmin/Models/StatusModel.cs
similarity index 100%
rename from Models/StatusModel.cs
rename to SystemAdmin/Models/StatusModel.cs
diff --git a/Program.cs b/SystemAdmin/Program.cs
similarity index 100%
rename from Program.cs
rename to SystemAdmin/Program.cs
diff --git a/SystemAdmin/Properties/launchSettings.json b/SystemAdmin/Properties/launchSettings.json
new file mode 100644
index 0000000..abcce38
--- /dev/null
+++ b/SystemAdmin/Properties/launchSettings.json
@@ -0,0 +1,12 @@
+{
+ "profiles": {
+ "SystemAdmin": {
+ "commandName": "Project",
+ "launchBrowser": true,
+ "environmentVariables": {
+ "ASPNETCORE_ENVIRONMENT": "Development"
+ },
+ "applicationUrl": "https://localhost:49908;http://localhost:49909"
+ }
+ }
+}
\ No newline at end of file
diff --git a/SystemAdmin.csproj b/SystemAdmin/SystemAdmin.csproj
similarity index 100%
rename from SystemAdmin.csproj
rename to SystemAdmin/SystemAdmin.csproj
diff --git a/Views/Home/Index.cshtml b/SystemAdmin/Views/Home/Index.cshtml
similarity index 100%
rename from Views/Home/Index.cshtml
rename to SystemAdmin/Views/Home/Index.cshtml
diff --git a/Views/Home/Privacy.cshtml b/SystemAdmin/Views/Home/Privacy.cshtml
similarity index 100%
rename from Views/Home/Privacy.cshtml
rename to SystemAdmin/Views/Home/Privacy.cshtml
diff --git a/Views/Shared/Error.cshtml b/SystemAdmin/Views/Shared/Error.cshtml
similarity index 100%
rename from Views/Shared/Error.cshtml
rename to SystemAdmin/Views/Shared/Error.cshtml
diff --git a/Views/Shared/_Layout.cshtml b/SystemAdmin/Views/Shared/_Layout.cshtml
similarity index 100%
rename from Views/Shared/_Layout.cshtml
rename to SystemAdmin/Views/Shared/_Layout.cshtml
diff --git a/Views/Shared/_Layout.cshtml.css b/SystemAdmin/Views/Shared/_Layout.cshtml.css
similarity index 100%
rename from Views/Shared/_Layout.cshtml.css
rename to SystemAdmin/Views/Shared/_Layout.cshtml.css
diff --git a/Views/Shared/_ValidationScriptsPartial.cshtml b/SystemAdmin/Views/Shared/_ValidationScriptsPartial.cshtml
similarity index 100%
rename from Views/Shared/_ValidationScriptsPartial.cshtml
rename to SystemAdmin/Views/Shared/_ValidationScriptsPartial.cshtml
diff --git a/Views/Status/Index.cshtml b/SystemAdmin/Views/Status/Index.cshtml
similarity index 100%
rename from Views/Status/Index.cshtml
rename to SystemAdmin/Views/Status/Index.cshtml
diff --git a/Views/_ViewImports.cshtml b/SystemAdmin/Views/_ViewImports.cshtml
similarity index 100%
rename from Views/_ViewImports.cshtml
rename to SystemAdmin/Views/_ViewImports.cshtml
diff --git a/Views/_ViewStart.cshtml b/SystemAdmin/Views/_ViewStart.cshtml
similarity index 100%
rename from Views/_ViewStart.cshtml
rename to SystemAdmin/Views/_ViewStart.cshtml
diff --git a/appsettings.Development.json b/SystemAdmin/appsettings.Development.json
similarity index 72%
rename from appsettings.Development.json
rename to SystemAdmin/appsettings.Development.json
index a2a6128..70979ba 100644
--- a/appsettings.Development.json
+++ b/SystemAdmin/appsettings.Development.json
@@ -6,6 +6,6 @@
}
},
"Urls": {
- "BaseUrl": "http://host.docker.internal:59283"
+ "BaseUrl": "https://localhost:59284"
}
}
diff --git a/appsettings.json b/SystemAdmin/appsettings.json
similarity index 100%
rename from appsettings.json
rename to SystemAdmin/appsettings.json
diff --git a/wwwroot/css/jquery-ui.min.css b/SystemAdmin/wwwroot/css/jquery-ui.min.css
similarity index 100%
rename from wwwroot/css/jquery-ui.min.css
rename to SystemAdmin/wwwroot/css/jquery-ui.min.css
diff --git a/wwwroot/css/site.css b/SystemAdmin/wwwroot/css/site.css
similarity index 100%
rename from wwwroot/css/site.css
rename to SystemAdmin/wwwroot/css/site.css
diff --git a/wwwroot/favicon.ico b/SystemAdmin/wwwroot/favicon.ico
similarity index 100%
rename from wwwroot/favicon.ico
rename to SystemAdmin/wwwroot/favicon.ico
diff --git a/wwwroot/images/building-33.jpeg b/SystemAdmin/wwwroot/images/building-33.jpeg
similarity index 100%
rename from wwwroot/images/building-33.jpeg
rename to SystemAdmin/wwwroot/images/building-33.jpeg
diff --git a/wwwroot/js/site.js b/SystemAdmin/wwwroot/js/site.js
similarity index 100%
rename from wwwroot/js/site.js
rename to SystemAdmin/wwwroot/js/site.js
diff --git a/wwwroot/lib/bootstrap/LICENSE b/SystemAdmin/wwwroot/lib/bootstrap/LICENSE
similarity index 100%
rename from wwwroot/lib/bootstrap/LICENSE
rename to SystemAdmin/wwwroot/lib/bootstrap/LICENSE
diff --git a/wwwroot/lib/bootstrap/dist/css/bootstrap-grid.css b/SystemAdmin/wwwroot/lib/bootstrap/dist/css/bootstrap-grid.css
similarity index 100%
rename from wwwroot/lib/bootstrap/dist/css/bootstrap-grid.css
rename to SystemAdmin/wwwroot/lib/bootstrap/dist/css/bootstrap-grid.css
diff --git a/wwwroot/lib/bootstrap/dist/css/bootstrap-grid.css.map b/SystemAdmin/wwwroot/lib/bootstrap/dist/css/bootstrap-grid.css.map
similarity index 100%
rename from wwwroot/lib/bootstrap/dist/css/bootstrap-grid.css.map
rename to SystemAdmin/wwwroot/lib/bootstrap/dist/css/bootstrap-grid.css.map
diff --git a/wwwroot/lib/bootstrap/dist/css/bootstrap-grid.min.css b/SystemAdmin/wwwroot/lib/bootstrap/dist/css/bootstrap-grid.min.css
similarity index 100%
rename from wwwroot/lib/bootstrap/dist/css/bootstrap-grid.min.css
rename to SystemAdmin/wwwroot/lib/bootstrap/dist/css/bootstrap-grid.min.css
diff --git a/wwwroot/lib/bootstrap/dist/css/bootstrap-grid.min.css.map b/SystemAdmin/wwwroot/lib/bootstrap/dist/css/bootstrap-grid.min.css.map
similarity index 100%
rename from wwwroot/lib/bootstrap/dist/css/bootstrap-grid.min.css.map
rename to SystemAdmin/wwwroot/lib/bootstrap/dist/css/bootstrap-grid.min.css.map
diff --git a/wwwroot/lib/bootstrap/dist/css/bootstrap-grid.rtl.css b/SystemAdmin/wwwroot/lib/bootstrap/dist/css/bootstrap-grid.rtl.css
similarity index 100%
rename from wwwroot/lib/bootstrap/dist/css/bootstrap-grid.rtl.css
rename to SystemAdmin/wwwroot/lib/bootstrap/dist/css/bootstrap-grid.rtl.css
diff --git a/wwwroot/lib/bootstrap/dist/css/bootstrap-grid.rtl.css.map b/SystemAdmin/wwwroot/lib/bootstrap/dist/css/bootstrap-grid.rtl.css.map
similarity index 100%
rename from wwwroot/lib/bootstrap/dist/css/bootstrap-grid.rtl.css.map
rename to SystemAdmin/wwwroot/lib/bootstrap/dist/css/bootstrap-grid.rtl.css.map
diff --git a/wwwroot/lib/bootstrap/dist/css/bootstrap-grid.rtl.min.css b/SystemAdmin/wwwroot/lib/bootstrap/dist/css/bootstrap-grid.rtl.min.css
similarity index 100%
rename from wwwroot/lib/bootstrap/dist/css/bootstrap-grid.rtl.min.css
rename to SystemAdmin/wwwroot/lib/bootstrap/dist/css/bootstrap-grid.rtl.min.css
diff --git a/wwwroot/lib/bootstrap/dist/css/bootstrap-grid.rtl.min.css.map b/SystemAdmin/wwwroot/lib/bootstrap/dist/css/bootstrap-grid.rtl.min.css.map
similarity index 100%
rename from wwwroot/lib/bootstrap/dist/css/bootstrap-grid.rtl.min.css.map
rename to SystemAdmin/wwwroot/lib/bootstrap/dist/css/bootstrap-grid.rtl.min.css.map
diff --git a/wwwroot/lib/bootstrap/dist/css/bootstrap-reboot.css b/SystemAdmin/wwwroot/lib/bootstrap/dist/css/bootstrap-reboot.css
similarity index 100%
rename from wwwroot/lib/bootstrap/dist/css/bootstrap-reboot.css
rename to SystemAdmin/wwwroot/lib/bootstrap/dist/css/bootstrap-reboot.css
diff --git a/wwwroot/lib/bootstrap/dist/css/bootstrap-reboot.css.map b/SystemAdmin/wwwroot/lib/bootstrap/dist/css/bootstrap-reboot.css.map
similarity index 100%
rename from wwwroot/lib/bootstrap/dist/css/bootstrap-reboot.css.map
rename to SystemAdmin/wwwroot/lib/bootstrap/dist/css/bootstrap-reboot.css.map
diff --git a/wwwroot/lib/bootstrap/dist/css/bootstrap-reboot.min.css b/SystemAdmin/wwwroot/lib/bootstrap/dist/css/bootstrap-reboot.min.css
similarity index 100%
rename from wwwroot/lib/bootstrap/dist/css/bootstrap-reboot.min.css
rename to SystemAdmin/wwwroot/lib/bootstrap/dist/css/bootstrap-reboot.min.css
diff --git a/wwwroot/lib/bootstrap/dist/css/bootstrap-reboot.min.css.map b/SystemAdmin/wwwroot/lib/bootstrap/dist/css/bootstrap-reboot.min.css.map
similarity index 100%
rename from wwwroot/lib/bootstrap/dist/css/bootstrap-reboot.min.css.map
rename to SystemAdmin/wwwroot/lib/bootstrap/dist/css/bootstrap-reboot.min.css.map
diff --git a/wwwroot/lib/bootstrap/dist/css/bootstrap-reboot.rtl.css b/SystemAdmin/wwwroot/lib/bootstrap/dist/css/bootstrap-reboot.rtl.css
similarity index 100%
rename from wwwroot/lib/bootstrap/dist/css/bootstrap-reboot.rtl.css
rename to SystemAdmin/wwwroot/lib/bootstrap/dist/css/bootstrap-reboot.rtl.css
diff --git a/wwwroot/lib/bootstrap/dist/css/bootstrap-reboot.rtl.css.map b/SystemAdmin/wwwroot/lib/bootstrap/dist/css/bootstrap-reboot.rtl.css.map
similarity index 100%
rename from wwwroot/lib/bootstrap/dist/css/bootstrap-reboot.rtl.css.map
rename to SystemAdmin/wwwroot/lib/bootstrap/dist/css/bootstrap-reboot.rtl.css.map
diff --git a/wwwroot/lib/bootstrap/dist/css/bootstrap-reboot.rtl.min.css b/SystemAdmin/wwwroot/lib/bootstrap/dist/css/bootstrap-reboot.rtl.min.css
similarity index 100%
rename from wwwroot/lib/bootstrap/dist/css/bootstrap-reboot.rtl.min.css
rename to SystemAdmin/wwwroot/lib/bootstrap/dist/css/bootstrap-reboot.rtl.min.css
diff --git a/wwwroot/lib/bootstrap/dist/css/bootstrap-reboot.rtl.min.css.map b/SystemAdmin/wwwroot/lib/bootstrap/dist/css/bootstrap-reboot.rtl.min.css.map
similarity index 100%
rename from wwwroot/lib/bootstrap/dist/css/bootstrap-reboot.rtl.min.css.map
rename to SystemAdmin/wwwroot/lib/bootstrap/dist/css/bootstrap-reboot.rtl.min.css.map
diff --git a/wwwroot/lib/bootstrap/dist/css/bootstrap-utilities.css b/SystemAdmin/wwwroot/lib/bootstrap/dist/css/bootstrap-utilities.css
similarity index 100%
rename from wwwroot/lib/bootstrap/dist/css/bootstrap-utilities.css
rename to SystemAdmin/wwwroot/lib/bootstrap/dist/css/bootstrap-utilities.css
diff --git a/wwwroot/lib/bootstrap/dist/css/bootstrap-utilities.css.map b/SystemAdmin/wwwroot/lib/bootstrap/dist/css/bootstrap-utilities.css.map
similarity index 100%
rename from wwwroot/lib/bootstrap/dist/css/bootstrap-utilities.css.map
rename to SystemAdmin/wwwroot/lib/bootstrap/dist/css/bootstrap-utilities.css.map
diff --git a/wwwroot/lib/bootstrap/dist/css/bootstrap-utilities.min.css b/SystemAdmin/wwwroot/lib/bootstrap/dist/css/bootstrap-utilities.min.css
similarity index 100%
rename from wwwroot/lib/bootstrap/dist/css/bootstrap-utilities.min.css
rename to SystemAdmin/wwwroot/lib/bootstrap/dist/css/bootstrap-utilities.min.css
diff --git a/wwwroot/lib/bootstrap/dist/css/bootstrap-utilities.min.css.map b/SystemAdmin/wwwroot/lib/bootstrap/dist/css/bootstrap-utilities.min.css.map
similarity index 100%
rename from wwwroot/lib/bootstrap/dist/css/bootstrap-utilities.min.css.map
rename to SystemAdmin/wwwroot/lib/bootstrap/dist/css/bootstrap-utilities.min.css.map
diff --git a/wwwroot/lib/bootstrap/dist/css/bootstrap-utilities.rtl.css b/SystemAdmin/wwwroot/lib/bootstrap/dist/css/bootstrap-utilities.rtl.css
similarity index 100%
rename from wwwroot/lib/bootstrap/dist/css/bootstrap-utilities.rtl.css
rename to SystemAdmin/wwwroot/lib/bootstrap/dist/css/bootstrap-utilities.rtl.css
diff --git a/wwwroot/lib/bootstrap/dist/css/bootstrap-utilities.rtl.css.map b/SystemAdmin/wwwroot/lib/bootstrap/dist/css/bootstrap-utilities.rtl.css.map
similarity index 100%
rename from wwwroot/lib/bootstrap/dist/css/bootstrap-utilities.rtl.css.map
rename to SystemAdmin/wwwroot/lib/bootstrap/dist/css/bootstrap-utilities.rtl.css.map
diff --git a/wwwroot/lib/bootstrap/dist/css/bootstrap-utilities.rtl.min.css b/SystemAdmin/wwwroot/lib/bootstrap/dist/css/bootstrap-utilities.rtl.min.css
similarity index 100%
rename from wwwroot/lib/bootstrap/dist/css/bootstrap-utilities.rtl.min.css
rename to SystemAdmin/wwwroot/lib/bootstrap/dist/css/bootstrap-utilities.rtl.min.css
diff --git a/wwwroot/lib/bootstrap/dist/css/bootstrap-utilities.rtl.min.css.map b/SystemAdmin/wwwroot/lib/bootstrap/dist/css/bootstrap-utilities.rtl.min.css.map
similarity index 100%
rename from wwwroot/lib/bootstrap/dist/css/bootstrap-utilities.rtl.min.css.map
rename to SystemAdmin/wwwroot/lib/bootstrap/dist/css/bootstrap-utilities.rtl.min.css.map
diff --git a/wwwroot/lib/bootstrap/dist/css/bootstrap.css b/SystemAdmin/wwwroot/lib/bootstrap/dist/css/bootstrap.css
similarity index 100%
rename from wwwroot/lib/bootstrap/dist/css/bootstrap.css
rename to SystemAdmin/wwwroot/lib/bootstrap/dist/css/bootstrap.css
diff --git a/wwwroot/lib/bootstrap/dist/css/bootstrap.css.map b/SystemAdmin/wwwroot/lib/bootstrap/dist/css/bootstrap.css.map
similarity index 100%
rename from wwwroot/lib/bootstrap/dist/css/bootstrap.css.map
rename to SystemAdmin/wwwroot/lib/bootstrap/dist/css/bootstrap.css.map
diff --git a/wwwroot/lib/bootstrap/dist/css/bootstrap.min.css b/SystemAdmin/wwwroot/lib/bootstrap/dist/css/bootstrap.min.css
similarity index 100%
rename from wwwroot/lib/bootstrap/dist/css/bootstrap.min.css
rename to SystemAdmin/wwwroot/lib/bootstrap/dist/css/bootstrap.min.css
diff --git a/wwwroot/lib/bootstrap/dist/css/bootstrap.min.css.map b/SystemAdmin/wwwroot/lib/bootstrap/dist/css/bootstrap.min.css.map
similarity index 100%
rename from wwwroot/lib/bootstrap/dist/css/bootstrap.min.css.map
rename to SystemAdmin/wwwroot/lib/bootstrap/dist/css/bootstrap.min.css.map
diff --git a/wwwroot/lib/bootstrap/dist/css/bootstrap.rtl.css b/SystemAdmin/wwwroot/lib/bootstrap/dist/css/bootstrap.rtl.css
similarity index 100%
rename from wwwroot/lib/bootstrap/dist/css/bootstrap.rtl.css
rename to SystemAdmin/wwwroot/lib/bootstrap/dist/css/bootstrap.rtl.css
diff --git a/wwwroot/lib/bootstrap/dist/css/bootstrap.rtl.css.map b/SystemAdmin/wwwroot/lib/bootstrap/dist/css/bootstrap.rtl.css.map
similarity index 100%
rename from wwwroot/lib/bootstrap/dist/css/bootstrap.rtl.css.map
rename to SystemAdmin/wwwroot/lib/bootstrap/dist/css/bootstrap.rtl.css.map
diff --git a/wwwroot/lib/bootstrap/dist/css/bootstrap.rtl.min.css b/SystemAdmin/wwwroot/lib/bootstrap/dist/css/bootstrap.rtl.min.css
similarity index 100%
rename from wwwroot/lib/bootstrap/dist/css/bootstrap.rtl.min.css
rename to SystemAdmin/wwwroot/lib/bootstrap/dist/css/bootstrap.rtl.min.css
diff --git a/wwwroot/lib/bootstrap/dist/css/bootstrap.rtl.min.css.map b/SystemAdmin/wwwroot/lib/bootstrap/dist/css/bootstrap.rtl.min.css.map
similarity index 100%
rename from wwwroot/lib/bootstrap/dist/css/bootstrap.rtl.min.css.map
rename to SystemAdmin/wwwroot/lib/bootstrap/dist/css/bootstrap.rtl.min.css.map
diff --git a/wwwroot/lib/bootstrap/dist/js/bootstrap.bundle.js b/SystemAdmin/wwwroot/lib/bootstrap/dist/js/bootstrap.bundle.js
similarity index 100%
rename from wwwroot/lib/bootstrap/dist/js/bootstrap.bundle.js
rename to SystemAdmin/wwwroot/lib/bootstrap/dist/js/bootstrap.bundle.js
diff --git a/wwwroot/lib/bootstrap/dist/js/bootstrap.bundle.js.map b/SystemAdmin/wwwroot/lib/bootstrap/dist/js/bootstrap.bundle.js.map
similarity index 100%
rename from wwwroot/lib/bootstrap/dist/js/bootstrap.bundle.js.map
rename to SystemAdmin/wwwroot/lib/bootstrap/dist/js/bootstrap.bundle.js.map
diff --git a/wwwroot/lib/bootstrap/dist/js/bootstrap.bundle.min.js b/SystemAdmin/wwwroot/lib/bootstrap/dist/js/bootstrap.bundle.min.js
similarity index 100%
rename from wwwroot/lib/bootstrap/dist/js/bootstrap.bundle.min.js
rename to SystemAdmin/wwwroot/lib/bootstrap/dist/js/bootstrap.bundle.min.js
diff --git a/wwwroot/lib/bootstrap/dist/js/bootstrap.bundle.min.js.map b/SystemAdmin/wwwroot/lib/bootstrap/dist/js/bootstrap.bundle.min.js.map
similarity index 100%
rename from wwwroot/lib/bootstrap/dist/js/bootstrap.bundle.min.js.map
rename to SystemAdmin/wwwroot/lib/bootstrap/dist/js/bootstrap.bundle.min.js.map
diff --git a/wwwroot/lib/bootstrap/dist/js/bootstrap.esm.js b/SystemAdmin/wwwroot/lib/bootstrap/dist/js/bootstrap.esm.js
similarity index 100%
rename from wwwroot/lib/bootstrap/dist/js/bootstrap.esm.js
rename to SystemAdmin/wwwroot/lib/bootstrap/dist/js/bootstrap.esm.js
diff --git a/wwwroot/lib/bootstrap/dist/js/bootstrap.esm.js.map b/SystemAdmin/wwwroot/lib/bootstrap/dist/js/bootstrap.esm.js.map
similarity index 100%
rename from wwwroot/lib/bootstrap/dist/js/bootstrap.esm.js.map
rename to SystemAdmin/wwwroot/lib/bootstrap/dist/js/bootstrap.esm.js.map
diff --git a/wwwroot/lib/bootstrap/dist/js/bootstrap.esm.min.js b/SystemAdmin/wwwroot/lib/bootstrap/dist/js/bootstrap.esm.min.js
similarity index 100%
rename from wwwroot/lib/bootstrap/dist/js/bootstrap.esm.min.js
rename to SystemAdmin/wwwroot/lib/bootstrap/dist/js/bootstrap.esm.min.js
diff --git a/wwwroot/lib/bootstrap/dist/js/bootstrap.esm.min.js.map b/SystemAdmin/wwwroot/lib/bootstrap/dist/js/bootstrap.esm.min.js.map
similarity index 100%
rename from wwwroot/lib/bootstrap/dist/js/bootstrap.esm.min.js.map
rename to SystemAdmin/wwwroot/lib/bootstrap/dist/js/bootstrap.esm.min.js.map
diff --git a/wwwroot/lib/bootstrap/dist/js/bootstrap.js b/SystemAdmin/wwwroot/lib/bootstrap/dist/js/bootstrap.js
similarity index 100%
rename from wwwroot/lib/bootstrap/dist/js/bootstrap.js
rename to SystemAdmin/wwwroot/lib/bootstrap/dist/js/bootstrap.js
diff --git a/wwwroot/lib/bootstrap/dist/js/bootstrap.js.map b/SystemAdmin/wwwroot/lib/bootstrap/dist/js/bootstrap.js.map
similarity index 100%
rename from wwwroot/lib/bootstrap/dist/js/bootstrap.js.map
rename to SystemAdmin/wwwroot/lib/bootstrap/dist/js/bootstrap.js.map
diff --git a/wwwroot/lib/bootstrap/dist/js/bootstrap.min.js b/SystemAdmin/wwwroot/lib/bootstrap/dist/js/bootstrap.min.js
similarity index 100%
rename from wwwroot/lib/bootstrap/dist/js/bootstrap.min.js
rename to SystemAdmin/wwwroot/lib/bootstrap/dist/js/bootstrap.min.js
diff --git a/wwwroot/lib/bootstrap/dist/js/bootstrap.min.js.map b/SystemAdmin/wwwroot/lib/bootstrap/dist/js/bootstrap.min.js.map
similarity index 100%
rename from wwwroot/lib/bootstrap/dist/js/bootstrap.min.js.map
rename to SystemAdmin/wwwroot/lib/bootstrap/dist/js/bootstrap.min.js.map
diff --git a/wwwroot/lib/jquery-validation-unobtrusive/LICENSE.txt b/SystemAdmin/wwwroot/lib/jquery-validation-unobtrusive/LICENSE.txt
similarity index 100%
rename from wwwroot/lib/jquery-validation-unobtrusive/LICENSE.txt
rename to SystemAdmin/wwwroot/lib/jquery-validation-unobtrusive/LICENSE.txt
diff --git a/wwwroot/lib/jquery-validation-unobtrusive/jquery.validate.unobtrusive.js b/SystemAdmin/wwwroot/lib/jquery-validation-unobtrusive/jquery.validate.unobtrusive.js
similarity index 100%
rename from wwwroot/lib/jquery-validation-unobtrusive/jquery.validate.unobtrusive.js
rename to SystemAdmin/wwwroot/lib/jquery-validation-unobtrusive/jquery.validate.unobtrusive.js
diff --git a/wwwroot/lib/jquery-validation-unobtrusive/jquery.validate.unobtrusive.min.js b/SystemAdmin/wwwroot/lib/jquery-validation-unobtrusive/jquery.validate.unobtrusive.min.js
similarity index 100%
rename from wwwroot/lib/jquery-validation-unobtrusive/jquery.validate.unobtrusive.min.js
rename to SystemAdmin/wwwroot/lib/jquery-validation-unobtrusive/jquery.validate.unobtrusive.min.js
diff --git a/wwwroot/lib/jquery-validation/LICENSE.md b/SystemAdmin/wwwroot/lib/jquery-validation/LICENSE.md
similarity index 100%
rename from wwwroot/lib/jquery-validation/LICENSE.md
rename to SystemAdmin/wwwroot/lib/jquery-validation/LICENSE.md
diff --git a/wwwroot/lib/jquery-validation/dist/additional-methods.js b/SystemAdmin/wwwroot/lib/jquery-validation/dist/additional-methods.js
similarity index 100%
rename from wwwroot/lib/jquery-validation/dist/additional-methods.js
rename to SystemAdmin/wwwroot/lib/jquery-validation/dist/additional-methods.js
diff --git a/wwwroot/lib/jquery-validation/dist/additional-methods.min.js b/SystemAdmin/wwwroot/lib/jquery-validation/dist/additional-methods.min.js
similarity index 100%
rename from wwwroot/lib/jquery-validation/dist/additional-methods.min.js
rename to SystemAdmin/wwwroot/lib/jquery-validation/dist/additional-methods.min.js
diff --git a/wwwroot/lib/jquery-validation/dist/jquery.validate.js b/SystemAdmin/wwwroot/lib/jquery-validation/dist/jquery.validate.js
similarity index 100%
rename from wwwroot/lib/jquery-validation/dist/jquery.validate.js
rename to SystemAdmin/wwwroot/lib/jquery-validation/dist/jquery.validate.js
diff --git a/wwwroot/lib/jquery-validation/dist/jquery.validate.min.js b/SystemAdmin/wwwroot/lib/jquery-validation/dist/jquery.validate.min.js
similarity index 100%
rename from wwwroot/lib/jquery-validation/dist/jquery.validate.min.js
rename to SystemAdmin/wwwroot/lib/jquery-validation/dist/jquery.validate.min.js
diff --git a/wwwroot/lib/jquery/LICENSE.txt b/SystemAdmin/wwwroot/lib/jquery/LICENSE.txt
similarity index 100%
rename from wwwroot/lib/jquery/LICENSE.txt
rename to SystemAdmin/wwwroot/lib/jquery/LICENSE.txt
diff --git a/wwwroot/lib/jquery/dist/jquery.js b/SystemAdmin/wwwroot/lib/jquery/dist/jquery.js
similarity index 100%
rename from wwwroot/lib/jquery/dist/jquery.js
rename to SystemAdmin/wwwroot/lib/jquery/dist/jquery.js
diff --git a/wwwroot/lib/jquery/dist/jquery.min.js b/SystemAdmin/wwwroot/lib/jquery/dist/jquery.min.js
similarity index 100%
rename from wwwroot/lib/jquery/dist/jquery.min.js
rename to SystemAdmin/wwwroot/lib/jquery/dist/jquery.min.js
diff --git a/wwwroot/lib/jquery/dist/jquery.min.map b/SystemAdmin/wwwroot/lib/jquery/dist/jquery.min.map
similarity index 100%
rename from wwwroot/lib/jquery/dist/jquery.min.map
rename to SystemAdmin/wwwroot/lib/jquery/dist/jquery.min.map
diff --git a/wwwroot/lib/jstree/jsTree.min.js b/SystemAdmin/wwwroot/lib/jstree/jsTree.min.js
similarity index 100%
rename from wwwroot/lib/jstree/jsTree.min.js
rename to SystemAdmin/wwwroot/lib/jstree/jsTree.min.js
diff --git a/wwwroot/lib/signalr/signalr.js b/SystemAdmin/wwwroot/lib/signalr/signalr.js
similarity index 100%
rename from wwwroot/lib/signalr/signalr.js
rename to SystemAdmin/wwwroot/lib/signalr/signalr.js
diff --git a/wwwroot/lib/test.js b/SystemAdmin/wwwroot/lib/test.js
similarity index 100%
rename from wwwroot/lib/test.js
rename to SystemAdmin/wwwroot/lib/test.js
diff --git a/azure-pipelines.yml b/azure-pipelines.yml
index f8ba2aa..9acd07b 100644
--- a/azure-pipelines.yml
+++ b/azure-pipelines.yml
@@ -6,7 +6,7 @@ pool:
variables:
AZURE_CONTAINER_APP_NAME: 'gateway-global-integration-ui-iac'
RESOURCE_GROUP: 'Gateway-Resources-IAC'
- DOCKER_IMAGE: 'attonbomb/systemadmin:latest' # Replace with your Docker Hub image path
+ DOCKER_IMAGE: 'attonbomb/systemadmin' # Replace with your Docker Hub image path
AZURE_SUBSCRIPTION: 'Gateway-Resources-IAC-MI-Conn-2'
steps:
@@ -18,7 +18,7 @@ steps:
# Set the Azure subscription based on the branch
- script: |
echo "Determining Azure subscription..."
- if [ "$(Build.SourceBranchName)" = "development" ]; then
+ if [ "$(Build.SourceBranchName)" == "development" ]; then
echo "##vso[task.setvariable variable=AZURE_SUBSCRIPTION]Dev-Gateway-Resources-MS"
echo "##vso[task.setvariable variable=DOCKER_IMAGE]attonbomb/systemadmin:dev"
else
@@ -32,15 +32,37 @@ steps:
scriptType: 'bash'
scriptLocation: 'inlineScript'
inlineScript: |
+
echo "Updating Azure Container App with the latest image"
+ echo "Updating Azure Container App. The latest image version is ======= $(DOCKER_IMAGE_VERSION)"
+
az config set extension.use_dynamic_install=yes_without_prompt
# Update the Azure Container App to pull the latest image
az containerapp update \
- --name gateway-global-integration-ui-iac
- --resource-group Gateway-IAC-Resources
- --image $(DOCKER_IMAGE)
+ --name $(AZURE_CONTAINER_APP_NAME) \
+ --resource-group $(RESOURCE_GROUP) \
+ --image $(DOCKER_IMAGE):$(DOCKER_IMAGE_VERSION) \
--registry-server hub.docker.com
+ # Get the active revision
+ REVISION_NAME=$(az containerapp revision list \
+ --name $(AZURE_CONTAINER_APP_NAME) \
+ --resource-group $(RESOURCE_GROUP) \
+ --query "[?properties.active].name" -o tsv)
+
+ echo "Active Revision: $REVISION_NAME"
+
+ # Restart to update live deployment if we have an active revision
+ if [ -n "$REVISION_NAME" ]; then
+ az containerapp revision restart \
+ --name $(AZURE_CONTAINER_APP_NAME) \
+ --resource-group $(RESOURCE_GROUP) \
+ --revision $REVISION_NAME
+ else
+ echo "No active revision found"
+ exit 1
+ fi
+
echo "Global Integration API Container App updated successfully"