From ab2bd0b22c4a466d96be90c2ff5a4623e90c9ecf Mon Sep 17 00:00:00 2001
From: Recolic K <bensl@microsoft.com>
Date: Wed, 26 May 2021 16:45:49 +0800
Subject: [PATCH] bug fix

---
 Azure-Deployment-Builder/guest-build.sh   | 14 +++++++++-----
 Azure-Deployment-Builder/host-daemon.fish |  4 +++-
 2 files changed, 12 insertions(+), 6 deletions(-)

diff --git a/Azure-Deployment-Builder/guest-build.sh b/Azure-Deployment-Builder/guest-build.sh
index c7169d9..a96e4d6 100755
--- a/Azure-Deployment-Builder/guest-build.sh
+++ b/Azure-Deployment-Builder/guest-build.sh
@@ -8,13 +8,16 @@ cd /buildroot/repo || exit $?
 #######################################
 echo START sync
 
-dotnet nuget add source "https://msazure.pkgs.visualstudio.com/_packaging/Official/nuget/v3/index.json" --name MSAZ --username "$nuget_uname" --password "$nuget_pswd" --store-password-in-clear-text &&
-dotnet nuget add source "https://o365exchange.pkgs.visualstudio.com/_packaging/Common/nuget/v3/index.json" --name O365Core --username "$nuget_uname" --password "$nuget_pswd" --store-password-in-clear-text &&
-dotnet nuget add source "https://skype.pkgs.visualstudio.com/DefaultCollection/_packaging/csc/nuget/v3/index.json" --name Skype --username "$nuget_uname" --password "$nuget_pswd" --store-password-in-clear-text &&
-dotnet nuget add source "https://o365exchange.pkgs.visualstudio.com/959adb23-f323-4d52-8203-ff34e5cbeefa/_packaging/M365FleetAGC/nuget/v3/index.json" --name M365FleetAGC --username "$nuget_uname" --password "$nuget_pswd" --store-password-in-clear-text &&
+dotnet nuget add source "https://msazure.pkgs.visualstudio.com/one/_packaging/azure-deployment-builder-Consumption/nuget/v3/index.json" --name MSAZ --username "$nuget_uname" --password "$nuget_pswd" --store-password-in-clear-text &&
 openxt sync --local-repo-dir ~/nuget-local-repo --project-dir src/Microsoft/Azure/Workflows/M365FleetAGC ||
 exit $?
 
+# The noob Microsoft.Azure.Cosmos.Table packager set the version to 0.0.0.0. Fuck you. 
+echo START hotfix
+nuget-download-package Microsoft.Azure.Cosmos.Table 1.0.6 ~/nuget-test-repo &&
+rm -rf ~/nuget-test-repo/microsoft.azure.cosmos.table/2.0.0-preview ||
+exit $?
+
 #######################################
 echo START build
 
@@ -30,7 +33,8 @@ echo START pack
 
 rm -f ~/build-output/net472/*.pdb &&
 cp Workflows/*.xaml ~/build-output/net472/ &&
-zip build-output.zip ~/build-output/net472/** ||
+zip output.zip ~/build-output/net472/** &&
+cp output.zip /buildroot/output.zip || 
 exit $?
 
 echo DONE
diff --git a/Azure-Deployment-Builder/host-daemon.fish b/Azure-Deployment-Builder/host-daemon.fish
index dc5c407..9dfc756 100644
--- a/Azure-Deployment-Builder/host-daemon.fish
+++ b/Azure-Deployment-Builder/host-daemon.fish
@@ -7,6 +7,7 @@ set devops_uname bensl
 set devops_pswd (cat /home/recolic/scripts/ms-passwords/devops-password)
 # Using GNU grep, allow basic regex. (I assume nobody place SPACE and origin/ in his branch name. )
 set triggers master M365FleetAGC 'u/recolic/.*'
+set webroot /var/www/html/externci
 
 set tmpf /tmp/ms-externci-azdeploymentbuilder
 test $devops_pswd = "" ; and echo "Please set devops_password" ; and exit 1
@@ -14,6 +15,7 @@ test $devops_pswd = "" ; and echo "Please set devops_password" ; and exit 1
 function dobuild
     set build_tag $args[1]
     sudo docker run -ti --rm -v (pwd)/..:/buildroot recolic/openxt bash /buildroot/guest-build.sh $devops_uname $devops_pswd
+    and mv ../output.zip $webroot/AzDB.$build_tag.zip
 end
 
 test -d repo
@@ -42,7 +44,7 @@ while true
         end
     end
 
-    sleep 10m
+    sleep 60
 end
 
 
-- 
GitLab