Editing Deployment Scripts
This commit is contained in:
Родитель
a5b965bd35
Коммит
040d2bcb73
|
@ -43,25 +43,25 @@ jobs:
|
|||
ParseEnvFile("$env:ENVIRONMENT_NAME")
|
||||
working-directory: ./solution/Deployment
|
||||
|
||||
- name: test env variable 0
|
||||
run: echo "${{ env.AdsOpts_Location }}" # This will output 'yellow'
|
||||
- name: test that the AdsOpts variables have been set
|
||||
run: echo "${{ env.AdsOpts_CD_Location }}"
|
||||
|
||||
#Azure Function App Build
|
||||
- name: Restore dependencies for Function App
|
||||
if: ${{env.TOGGLE_BUILD_FUNCTIONS==true}}
|
||||
if: ${{env.AdsOpts_CI_BuildFunctionApp=="True"}}
|
||||
run: dotnet restore
|
||||
working-directory: ./solution/FunctionApp
|
||||
- name: Publish functions
|
||||
if: ${{env.TOGGLE_BUILD_FUNCTIONS==true}}
|
||||
if: ${{env.AdsOpts_CI_BuildFunctionApp=="True"}}
|
||||
run: dotnet publish --no-restore --configuration Release --output './deploy'
|
||||
working-directory: ./solution/FunctionApp
|
||||
- run: echo "starting Zip"
|
||||
- name: zip functions
|
||||
if: ${{env.TOGGLE_BUILD_FUNCTIONS==true}}
|
||||
if: ${{env.AdsOpts_CI_BuildFunctionApp=="True"}}
|
||||
run: zip -r ../publish.zip *
|
||||
working-directory: ./solution/FunctionApp/deploy
|
||||
- name: Package functions
|
||||
if: ${{env.TOGGLE_BUILD_FUNCTIONS==true}}
|
||||
if: ${{env.AdsOpts_CI_BuildFunctionApp=="True"}}
|
||||
uses: actions/upload-artifact@v2.2.3
|
||||
with:
|
||||
name: Azure Functions Package
|
||||
|
@ -69,20 +69,20 @@ jobs:
|
|||
|
||||
#Web App Build
|
||||
- name: Restore dependencies for Web App
|
||||
if: ${{env.TOGGLE_BUILD_WEBAPP==true}}
|
||||
if: ${{env.AdsOpts_CI_BuildWebApp=="True"}}
|
||||
run: dotnet restore
|
||||
working-directory: ./solution/WebApplication
|
||||
- name: Publish Web App
|
||||
if: ${{env.TOGGLE_BUILD_WEBAPP==true}}
|
||||
if: ${{env.AdsOpts_CI_BuildWebApp=="True"}}
|
||||
run: dotnet publish --no-restore --configuration Release --output './deploy'
|
||||
working-directory: ./solution/WebApplication
|
||||
- run: echo "starting Zip"
|
||||
- name: zip web app
|
||||
if: ${{env.TOGGLE_BUILD_WEBAPP==true}}
|
||||
if: ${{env.AdsOpts_CI_BuildWebApp=="True"}}
|
||||
run: zip -r ../publish.zip *
|
||||
working-directory: ./solution/WebApplication/deploy
|
||||
- name: Package Web App
|
||||
if: ${{env.TOGGLE_BUILD_WEBAPP==true}}
|
||||
if: ${{env.AdsOpts_CI_BuilWebApp=="True"}}
|
||||
uses: actions/upload-artifact@v2.2.3
|
||||
with:
|
||||
name: Web App Package
|
||||
|
@ -90,8 +90,8 @@ jobs:
|
|||
|
||||
- name: Set Env Variable Test
|
||||
shell: pwsh
|
||||
run: echo "action_state=yellow" | Out-File -FilePath $Env:GITHUB_ENV -Encoding utf8 -Append
|
||||
run: echo "AdsOpts_CD_Location=yellow" | Out-File -FilePath $Env:GITHUB_ENV -Encoding utf8 -Append
|
||||
|
||||
- name: test env variable
|
||||
run: echo "${{ env.action_state }}" # This will output 'yellow'
|
||||
run: echo "${{ env.AdsOpts_CD_Location }}" # This will output 'yellow'
|
||||
|
||||
|
|
|
@ -15,8 +15,11 @@ function ParseEnvFragment([string]$Json, [string]$NamePrefix)
|
|||
$Value = $p.Value
|
||||
if($p.TypeNameOfValue -ne "System.Management.Automation.PSCustomObject")
|
||||
{
|
||||
#Push Variables to the GitHub Actions Compatible Store
|
||||
Write-Host "Writing $Name to env file"
|
||||
echo "$Name=$Value" | Out-File -FilePath $Env:GITHUB_ENV -Encoding utf8 -Append
|
||||
#Also Push Variables to the Session Env Variables for local testing
|
||||
[Environment]::SetEnvironmentVariable($Name, "$Value")
|
||||
}
|
||||
else {
|
||||
Write-Host "Further Parsing of $Name required"
|
||||
|
@ -36,4 +39,7 @@ function ParseEnvFile ($EnvFile)
|
|||
|
||||
$Json = Get-Content -Path "./environments/$($EnvFile).json" | Out-String
|
||||
ParseEnvFragment -Json $Json -NamePrefix ""
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -1,40 +1,37 @@
|
|||
{
|
||||
"AdsOpts":
|
||||
{
|
||||
"Location":"australiaeast",
|
||||
"ServiceNames":
|
||||
{
|
||||
"Subscription" : "Jorampon Internal Consumption",
|
||||
"ResourceGroupName" : "AdsTest",
|
||||
"AADUser":"jorampon@microsoft.com",
|
||||
"ServicePrincipal_Deployment":"AdsGoFastDeploymentSP",
|
||||
"ServicePrincipalNameAFDownstream":"AdsGoFastDeployTestSP",
|
||||
"ServicePrincipalNameWebAuth":"adsgofastwebappauth",
|
||||
"ServicePrincipalNameAFAuth":"adsgofastwebappauth"
|
||||
{
|
||||
"AdsOpts": {
|
||||
"CI": {
|
||||
"BuildFunctionApp": false,
|
||||
"BuildWebApp": false,
|
||||
"BuildAdsGoFastDatabase": false
|
||||
},
|
||||
"FolderPaths":
|
||||
{
|
||||
"ArmTemplates":"./arm"
|
||||
},
|
||||
|
||||
"AzureLoginOptions":
|
||||
{
|
||||
"UseInteractiveAzCliLogin":true
|
||||
},
|
||||
|
||||
"EnviroInstalls":
|
||||
{
|
||||
"PerformLocalInstalls":true,
|
||||
"PerformLocalInstallsAzCli":false,
|
||||
"PerformLocalInstallsAzCliAddToPath":true
|
||||
},
|
||||
"ArmOptions":
|
||||
{
|
||||
"PerformDeployment":false,
|
||||
"PerformDeploymentStorageLogging":false,
|
||||
"PerformDeploymentAppService":false
|
||||
"CD": {
|
||||
"Location": "australiaeast",
|
||||
"ServiceNames": {
|
||||
"Subscription": "Jorampon Internal Consumption",
|
||||
"ResourceGroupName": "AdsTest",
|
||||
"AADUser": "jorampon@microsoft.com",
|
||||
"ServicePrincipal_Deployment": "AdsGoFastDeploymentSP",
|
||||
"ServicePrincipalNameAFDownstream": "AdsGoFastDeployTestSP",
|
||||
"ServicePrincipalNameWebAuth": "adsgofastwebappauth",
|
||||
"ServicePrincipalNameAFAuth": "adsgofastwebappauth"
|
||||
},
|
||||
"FolderPaths": {
|
||||
"ArmTemplates": "./arm"
|
||||
},
|
||||
"AzureLoginOptions": {
|
||||
"UseInteractiveAzCliLogin": true
|
||||
},
|
||||
"EnviroInstalls": {
|
||||
"PerformLocalInstalls": true,
|
||||
"PerformLocalInstallsAzCli": false,
|
||||
"PerformLocalInstallsAzCliAddToPath": true
|
||||
},
|
||||
"ArmOptions": {
|
||||
"PerformDeployment": false,
|
||||
"PerformDeploymentStorageLogging": false,
|
||||
"PerformDeploymentAppService": false
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
|
@ -30,3 +30,79 @@ AdsOpts_EnviroInstalls_PerformLocalInstallsAzCliAddToPath=True
|
|||
AdsOpts_ArmOptions_PerformDeployment=False
|
||||
AdsOpts_ArmOptions_PerformDeploymentStorageLogging=False
|
||||
AdsOpts_ArmOptions_PerformDeploymentAppService=False
|
||||
AdsOpts_CI_BuildFunctionApp=False
|
||||
AdsOpts_CI_BuildWebApp=False
|
||||
AdsOpts_CI_BuildAdsGoFastDatabase=False
|
||||
AdsOpts_CD_Location=australiaeast
|
||||
AdsOpts_CD_ServiceNames_Subscription=Jorampon Internal Consumption
|
||||
AdsOpts_CD_ServiceNames_ResourceGroupName=AdsTest
|
||||
AdsOpts_CD_ServiceNames_AADUser=jorampon@microsoft.com
|
||||
AdsOpts_CD_ServiceNames_ServicePrincipal_Deployment=AdsGoFastDeploymentSP
|
||||
AdsOpts_CD_ServiceNames_ServicePrincipalNameAFDownstream=AdsGoFastDeployTestSP
|
||||
AdsOpts_CD_ServiceNames_ServicePrincipalNameWebAuth=adsgofastwebappauth
|
||||
AdsOpts_CD_ServiceNames_ServicePrincipalNameAFAuth=adsgofastwebappauth
|
||||
AdsOpts_CD_FolderPaths_ArmTemplates=./arm
|
||||
AdsOpts_CD_AzureLoginOptions_UseInteractiveAzCliLogin=True
|
||||
AdsOpts_CD_EnviroInstalls_PerformLocalInstalls=True
|
||||
AdsOpts_CD_EnviroInstalls_PerformLocalInstallsAzCli=False
|
||||
AdsOpts_CD_EnviroInstalls_PerformLocalInstallsAzCliAddToPath=True
|
||||
AdsOpts_CD_ArmOptions_PerformDeployment=False
|
||||
AdsOpts_CD_ArmOptions_PerformDeploymentStorageLogging=False
|
||||
AdsOpts_CD_ArmOptions_PerformDeploymentAppService=False
|
||||
AdsOpts_CI_BuildFunctionApp=False
|
||||
AdsOpts_CI_BuildWebApp=False
|
||||
AdsOpts_CI_BuildAdsGoFastDatabase=False
|
||||
AdsOpts_CD_Location=australiaeast
|
||||
AdsOpts_CD_ServiceNames_Subscription=Jorampon Internal Consumption
|
||||
AdsOpts_CD_ServiceNames_ResourceGroupName=AdsTest
|
||||
AdsOpts_CD_ServiceNames_AADUser=jorampon@microsoft.com
|
||||
AdsOpts_CD_ServiceNames_ServicePrincipal_Deployment=AdsGoFastDeploymentSP
|
||||
AdsOpts_CD_ServiceNames_ServicePrincipalNameAFDownstream=AdsGoFastDeployTestSP
|
||||
AdsOpts_CD_ServiceNames_ServicePrincipalNameWebAuth=adsgofastwebappauth
|
||||
AdsOpts_CD_ServiceNames_ServicePrincipalNameAFAuth=adsgofastwebappauth
|
||||
AdsOpts_CD_FolderPaths_ArmTemplates=./arm
|
||||
AdsOpts_CD_AzureLoginOptions_UseInteractiveAzCliLogin=True
|
||||
AdsOpts_CD_EnviroInstalls_PerformLocalInstalls=True
|
||||
AdsOpts_CD_EnviroInstalls_PerformLocalInstallsAzCli=False
|
||||
AdsOpts_CD_EnviroInstalls_PerformLocalInstallsAzCliAddToPath=True
|
||||
AdsOpts_CD_ArmOptions_PerformDeployment=False
|
||||
AdsOpts_CD_ArmOptions_PerformDeploymentStorageLogging=False
|
||||
AdsOpts_CD_ArmOptions_PerformDeploymentAppService=False
|
||||
AdsOpts_CI_BuildFunctionApp=False
|
||||
AdsOpts_CI_BuildWebApp=False
|
||||
AdsOpts_CI_BuildAdsGoFastDatabase=False
|
||||
AdsOpts_CD_Location=australiaeast
|
||||
AdsOpts_CD_ServiceNames_Subscription=Jorampon Internal Consumption
|
||||
AdsOpts_CD_ServiceNames_ResourceGroupName=AdsTest
|
||||
AdsOpts_CD_ServiceNames_AADUser=jorampon@microsoft.com
|
||||
AdsOpts_CD_ServiceNames_ServicePrincipal_Deployment=AdsGoFastDeploymentSP
|
||||
AdsOpts_CD_ServiceNames_ServicePrincipalNameAFDownstream=AdsGoFastDeployTestSP
|
||||
AdsOpts_CD_ServiceNames_ServicePrincipalNameWebAuth=adsgofastwebappauth
|
||||
AdsOpts_CD_ServiceNames_ServicePrincipalNameAFAuth=adsgofastwebappauth
|
||||
AdsOpts_CD_FolderPaths_ArmTemplates=./arm
|
||||
AdsOpts_CD_AzureLoginOptions_UseInteractiveAzCliLogin=True
|
||||
AdsOpts_CD_EnviroInstalls_PerformLocalInstalls=True
|
||||
AdsOpts_CD_EnviroInstalls_PerformLocalInstallsAzCli=False
|
||||
AdsOpts_CD_EnviroInstalls_PerformLocalInstallsAzCliAddToPath=True
|
||||
AdsOpts_CD_ArmOptions_PerformDeployment=False
|
||||
AdsOpts_CD_ArmOptions_PerformDeploymentStorageLogging=False
|
||||
AdsOpts_CD_ArmOptions_PerformDeploymentAppService=False
|
||||
AdsOpts_CI_BuildFunctionApp=False
|
||||
AdsOpts_CI_BuildWebApp=False
|
||||
AdsOpts_CI_BuildAdsGoFastDatabase=False
|
||||
AdsOpts_CD_Location=australiaeast
|
||||
AdsOpts_CD_ServiceNames_Subscription=Jorampon Internal Consumption
|
||||
AdsOpts_CD_ServiceNames_ResourceGroupName=AdsTest
|
||||
AdsOpts_CD_ServiceNames_AADUser=jorampon@microsoft.com
|
||||
AdsOpts_CD_ServiceNames_ServicePrincipal_Deployment=AdsGoFastDeploymentSP
|
||||
AdsOpts_CD_ServiceNames_ServicePrincipalNameAFDownstream=AdsGoFastDeployTestSP
|
||||
AdsOpts_CD_ServiceNames_ServicePrincipalNameWebAuth=adsgofastwebappauth
|
||||
AdsOpts_CD_ServiceNames_ServicePrincipalNameAFAuth=adsgofastwebappauth
|
||||
AdsOpts_CD_FolderPaths_ArmTemplates=./arm
|
||||
AdsOpts_CD_AzureLoginOptions_UseInteractiveAzCliLogin=True
|
||||
AdsOpts_CD_EnviroInstalls_PerformLocalInstalls=True
|
||||
AdsOpts_CD_EnviroInstalls_PerformLocalInstallsAzCli=False
|
||||
AdsOpts_CD_EnviroInstalls_PerformLocalInstallsAzCliAddToPath=True
|
||||
AdsOpts_CD_ArmOptions_PerformDeployment=False
|
||||
AdsOpts_CD_ArmOptions_PerformDeploymentStorageLogging=False
|
||||
AdsOpts_CD_ArmOptions_PerformDeploymentAppService=False
|
||||
|
|
Загрузка…
Ссылка в новой задаче