Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

knox/fix php oryx build #225

Open
wants to merge 274 commits into
base: 3.0Migration
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
274 commits
Select commit Hold shift + click to select a range
dd4d1f0
Merge pull request #12 from Azure-App-Service/jennylaw-fixfunctions
JennyLawrance Feb 8, 2019
9b38786
Fixed a bug where .log/unknown file types were not handled in the dir…
sanchitmehta Feb 12, 2019
9cb0bee
Fix detectors link to the slot app
Feb 14, 2019
a082ca7
Refactor slot name handling
Feb 14, 2019
4c83910
Update python build to not use virtual environment
JennyLawrance Jan 8, 2019
3efccaf
Add virtual env for python
JennyLawrance Jan 9, 2019
953ed7b
Enable virtualEnv for python 2.7 builds
JennyLawrance Jan 9, 2019
2e2ee3c
Really remove virtual env based deployments for python
JennyLawrance Jan 9, 2019
9ce333e
Added Directory browser for Logs
sanchitmehta Jan 12, 2019
e87afe2
fix detector deeplink
JennyLawrance Jan 30, 2019
d870248
trial fix
Feb 5, 2019
08a54b5
Test fix 2
Feb 5, 2019
8022aa4
Fixup post-receive for kudulite migration when SCM_REPOSITORY_PATH is…
Feb 8, 2019
bded37f
Fixed a bug where .log/unknown file types were not handled in the dir…
sanchitmehta Feb 12, 2019
d14486c
Fix detectors link to the slot app
Feb 14, 2019
59da4d8
Refactor slot name handling
Feb 14, 2019
780e0f8
Ensure zip-deploy does build only when configured
JennyLawrance Feb 16, 2019
012af88
Merge pull request #15 from Azure-App-Service/Jan19-Release
JennyLawrance Feb 16, 2019
315de0b
Update python builds to minimize deployment failures'
JennyLawrance Mar 7, 2019
5860eef
Merge pull request #17 from Azure-App-Service/user/jennylaw/dev-march…
JennyLawrance Mar 7, 2019
004941f
Increasing deployments lock timeout to 20 minutes
sanchitmehta Mar 8, 2019
c6e024c
Merge pull request #18 from Azure-App-Service/dev
JennyLawrance Mar 8, 2019
bc07d1f
Adding dotnet support
JennyLawrance Mar 13, 2019
7ba5e9e
Test Commit for new build options
JennyLawrance Mar 29, 2019
357b583
Oryx build optimizations
JennyLawrance Apr 1, 2019
47e3235
Fix bug in source directory
JennyLawrance Apr 2, 2019
e3fbcca
Fix python builds to use virtualenv flags correctly
JennyLawrance Apr 2, 2019
8fdf974
Fix expressbuilder issue
JennyLawrance Apr 3, 2019
05a457f
Update ExpressBuilder.cs
sanchitmehta Apr 3, 2019
9244e65
Fixed the bug where kudu didn't handle symlinks in zip files for zip …
sanchitmehta Mar 22, 2019
04ed864
Added functionality to return the deployment log url at the end of a …
sanchitmehta Mar 22, 2019
636adac
Added functionality to switch between volatile logs and mounted dir logs
sanchitmehta Apr 3, 2019
f0e03ff
Update ExpressBuilder.cs
JennyLawrance Apr 4, 2019
6e26eb7
Minor fixes to the Kudu Ui.Added tail 10 lines to log stream startup
sanchitmehta Apr 9, 2019
f75e208
Merge pull request #26 from Azure-App-Service/user/sanmeht/uifixes
JennyLawrance Apr 12, 2019
17335d3
Increasing log stream timeout and new line fix
sanchitmehta Apr 17, 2019
9b6a517
Enable functions detector deeplink
Apr 26, 2019
98ef1a5
Adding dotnet support
JennyLawrance Mar 13, 2019
1a43f1d
Test Commit for new build options
JennyLawrance Mar 29, 2019
b845528
Oryx build optimizations
JennyLawrance Apr 1, 2019
2f8d34c
Fix bug in source directory
JennyLawrance Apr 2, 2019
4c8fe4e
Fix python builds to use virtualenv flags correctly
JennyLawrance Apr 2, 2019
c5c063d
Fix expressbuilder issue
JennyLawrance Apr 3, 2019
59a3422
Update ExpressBuilder.cs
sanchitmehta Apr 3, 2019
a90ad90
Fixed the bug where kudu didn't handle symlinks in zip files for zip …
sanchitmehta Mar 22, 2019
362c3e6
Added functionality to return the deployment log url at the end of a …
sanchitmehta Mar 22, 2019
cc38631
Added functionality to switch between volatile logs and mounted dir logs
sanchitmehta Apr 3, 2019
fcaab14
Update ExpressBuilder.cs
JennyLawrance Apr 4, 2019
85a6f06
Minor fixes to the Kudu Ui.Added tail 10 lines to log stream startup
sanchitmehta Apr 9, 2019
b405116
Increasing log stream timeout and new line fix
sanchitmehta Apr 17, 2019
30942e3
Enable functions detector deeplink
Apr 26, 2019
35c56c9
Add: support for .sh file in PostDeploymentActions
Apr 25, 2019
2b607d5
Add execution mode before running the script
Apr 26, 2019
c58fceb
Add logging for running powershell script in RemoteSigned
Apr 26, 2019
1eb7af8
Add support for function app build by oryx
ankitkumarr May 13, 2019
78d92d1
Merge pull request #33 from ankitkumarr/ankikuma-func-build
JennyLawrance May 13, 2019
104020a
Fix issue when redeploying using zipdeploy function app
ankitkumarr May 14, 2019
c77842c
Add: Url support for ZipDeploy
May 17, 2019
dab71f5
Use ReadAsStreamAsync to reduce thread blocking time
May 17, 2019
2f2a656
Change sitepackage.txt to packageversion.txt (fixes #36)
ankitkumarr May 17, 2019
ae0574e
Merge pull request #37 from ankitkumarr/ankikuma-fix-sitename
JennyLawrance May 17, 2019
5591efe
Updates for .NET core Builds
JennyLawrance May 20, 2019
66ec6a2
.NET core use temp directory for build
JennyLawrance May 20, 2019
dd77283
Merge pull request #38 from Azure-App-Service/user/jennylaw/netcore-c…
JennyLawrance May 20, 2019
c09a530
Fix issues with functionapp build
ankitkumarr May 21, 2019
fb45966
Enhance SimpleWebTokenHelper
May 21, 2019
d81afd7
Add: HostAssignmentContext
May 21, 2019
dde0ab8
Remove unnecessary SettingsKeys.cs
May 21, 2019
ee6fd45
Merge pull request #34 from ankitkumarr/ankikuma-fix-func-ku
JennyLawrance May 21, 2019
938fd58
Merge pull request #35 from Hazhzeng/pr-zipdeployurl
JennyLawrance May 21, 2019
df4e958
Merge pull request #39 from ankitkumarr/ankikuma-fix-func-build
JennyLawrance May 21, 2019
2a5a62e
Merge pull request #40 from Hazhzeng/hazeng-pr1-hostassignment
JennyLawrance May 21, 2019
e9c9352
Update function app express build artifacts
ankitkumarr May 22, 2019
388713e
Merge pull request #41 from ankitkumarr/ankikuma-update-func
JennyLawrance May 22, 2019
ec6c2a7
Fix .net core 1.0 and 2.0 builds with oryx
JennyLawrance May 23, 2019
ef740be
Merge pull request #44 from Azure-App-Service/user/jennylaw/fix-netco…
JennyLawrance May 23, 2019
c5aefe3
Add authorization and authentication
May 22, 2019
7811929
Rename Instance Controller to LinuxConsumptionInstanceAdmin Controller
May 30, 2019
c4b41b1
Fix: controller name
May 30, 2019
cc603b3
Add some comments to explain the /assign and /info endpoints
May 30, 2019
7a13f06
Remove PlaceholderMode setting in InitializeProcess
May 31, 2019
056bed3
Remove initialize process
May 31, 2019
fe913fb
Move extensions to KuduWebUtils
Jun 1, 2019
18b4e73
Squash Commit
May 22, 2019
7829504
Added VFS path to log stream, fixed line break problem with logstream
sanchitmehta Jun 4, 2019
9912ffd
Merge pull request #46 from Azure-App-Service/user/sanmeht/LogStreamVFS
JennyLawrance Jun 4, 2019
2814571
Update LogStreamManager.cs
sanchitmehta Jun 4, 2019
90cdfb3
Merge branch 'master' into dev
sanchitmehta Jun 4, 2019
dbfcc7a
Remove duplicated volatileLogsPath (#49)
Jun 6, 2019
1614aff
Update Node default version (#54)
ankitkumarr Jun 10, 2019
6608e88
[functionapp] Disable unnecessary endpoints in Linux Consumption (#52)
Jun 13, 2019
3e0f397
[functionapp] Enable server side build in OryxBuilder (#45)
Jun 14, 2019
e188011
Refactor WEBSITE_INSTANCE_ID (#56)
Jun 14, 2019
0b9950d
Do not overwrite user settings in Linux Consumption (#58)
Jun 19, 2019
0bd7153
Randomized WebSSHProxy port for WebSSH
sanchitmehta Jun 20, 2019
529e969
add php oryx build support
patricklee2 Jun 20, 2019
259adbf
Added benv to dotnet version for KuduConsole
sanchitmehta Jun 21, 2019
e69e4b1
Merge pull request #62 from Azure-App-Service/user/sanmeht/SyncOryxDo…
JennyLawrance Jun 21, 2019
0f5025b
Merge pull request #61 from Azure-App-Service/user/sanmeht/SwiftVnetW…
JennyLawrance Jun 21, 2019
990cfa6
Merge pull request #59 from patricklee2/php
JennyLawrance Jun 21, 2019
b7e4daf
Added benv to kudu command env (#63)
sanchitmehta Jun 21, 2019
373a931
[functionapp] Logging generator for linux containers (#53)
maiqbal11 Jun 27, 2019
f47dcde
Support squashfs in KuduLite oryx build (#57)
Jun 27, 2019
70cf701
Add kudu log in Linux Consumption middleware (#66)
Jul 1, 2019
53ad589
Updated Oryx option names (#65)
dorfire Jul 3, 2019
03c076c
Fix zip issue for Function App, reduce logs, reduce compression (#67)…
ankitkumarr Jul 18, 2019
85affad
whitelist favicon.ico path (#68)
Hazhzeng Jul 18, 2019
2094963
User/t puvasu/scan AntiVirus scan capabilities (#55)
ppvasude Jul 23, 2019
4bed802
Added test/plain mime type for VFS Based log files (#75)
sanchitmehta Jul 29, 2019
b94cac9
Added more tests on Oryx Arguments (#77)
Hazhzeng Jul 31, 2019
0219196
Enable oryx build for other languages in Linux Consumption (#76)
Hazhzeng Jul 31, 2019
6397fa6
Bug Fixes (#82)
ppvasude Aug 6, 2019
63df304
Added checkModified as a param to override manifest file checking (#83)
ppvasude Aug 8, 2019
992596e
Add a silent try catch while printing previous log tail (#87)
sanchitmehta Aug 19, 2019
6d1af0e
Added console event generator for kudu (#85)
sanchitmehta Aug 19, 2019
f05beec
Fixed the bug where symlinks couldn't be created for zip extraction +…
sanchitmehta Aug 19, 2019
795ab0e
ANT84 Linux Consumption Remote Build Patch (#88)
Hazhzeng Sep 13, 2019
4e179c7
Using Log4Net to generate kudu event logs
sanchitmehta Sep 20, 2019
8f464ae
Added lts support for Oryx on NODE. Made compressing python packages …
sanchitmehta Sep 20, 2019
5eabe58
Changed the log path in Log4Net config
sanchitmehta Sep 20, 2019
05dc596
Added Express Build support for NETCore. Added a filter to avoid exce…
sanchitmehta Sep 20, 2019
2b56c65
Modified python compress arguments
sanchitmehta Sep 20, 2019
bd22d65
Added debug arguments for oryx build
sanchitmehta Sep 20, 2019
ce6324b
Added a fix for NETCore express build scenario + Removing Oryx Manife…
sanchitmehta Sep 21, 2019
538cfdf
test
sanchitmehta Sep 18, 2019
26efa36
test
sanchitmehta Sep 18, 2019
fbaf9a8
test
sanchitmehta Sep 19, 2019
e16a484
test
sanchitmehta Sep 19, 2019
9a4374f
test'
sanchitmehta Sep 19, 2019
5374c47
test
sanchitmehta Sep 19, 2019
c49726b
test
sanchitmehta Sep 19, 2019
e3a0845
TesT
sanchitmehta Sep 19, 2019
d826e90
test
sanchitmehta Sep 19, 2019
1d5479f
tesT
sanchitmehta Sep 19, 2019
f0f35ea
test
sanchitmehta Sep 19, 2019
e664b4d
test
sanchitmehta Sep 22, 2019
e180266
test
sanchitmehta Sep 22, 2019
c833c3b
test'
sanchitmehta Sep 22, 2019
ececdd4
test
sanchitmehta Sep 22, 2019
9cdd3d7
test'
sanchitmehta Sep 22, 2019
07a0d84
test'
sanchitmehta Sep 22, 2019
4d3eeab
test
sanchitmehta Sep 22, 2019
1e867a0
Test
sanchitmehta Sep 23, 2019
3a9485d
test
sanchitmehta Sep 23, 2019
01d4918
test
sanchitmehta Sep 23, 2019
b2cec8a
test
sanchitmehta Sep 23, 2019
dd0dc8f
tesT
sanchitmehta Sep 23, 2019
13d4271
test
sanchitmehta Sep 24, 2019
e668df7
test
sanchitmehta Sep 24, 2019
156f9e4
TEsT
sanchitmehta Sep 24, 2019
52c3dcc
test
sanchitmehta Sep 24, 2019
c216097
Test
sanchitmehta Sep 24, 2019
c32153e
test
sanchitmehta Sep 24, 2019
230dc6c
test
sanchitmehta Sep 24, 2019
06387bc
test'
sanchitmehta Sep 24, 2019
80b26a8
test
sanchitmehta Sep 24, 2019
a914ecc
test
sanchitmehta Sep 24, 2019
24a49ec
test
sanchitmehta Sep 24, 2019
09d42b5
test'
sanchitmehta Sep 24, 2019
7d60e90
test
sanchitmehta Sep 24, 2019
781a914
test'
sanchitmehta Sep 24, 2019
9695668
test
sanchitmehta Sep 24, 2019
6e3375b
test
sanchitmehta Oct 11, 2019
36c6ae4
test
sanchitmehta Oct 11, 2019
83efe29
test'
sanchitmehta Oct 11, 2019
fa30fc2
test'
sanchitmehta Oct 11, 2019
b4c0894
test
sanchitmehta Oct 11, 2019
7f078a9
test2
sanchitmehta Oct 11, 2019
92e58e0
test'
sanchitmehta Oct 11, 2019
2f78eef
test
sanchitmehta Oct 11, 2019
760a2b6
test
sanchitmehta Oct 11, 2019
65af6d0
test
sanchitmehta Oct 11, 2019
bfd7650
test
sanchitmehta Oct 11, 2019
6cf850f
test
sanchitmehta Oct 11, 2019
dcd580f
test
sanchitmehta Oct 11, 2019
91088dd
test
sanchitmehta Oct 11, 2019
f50f1f5
test
sanchitmehta Oct 11, 2019
cd9bd6f
test
sanchitmehta Oct 11, 2019
8ca3a44
test
sanchitmehta Oct 11, 2019
e7f2d21
test
sanchitmehta Oct 11, 2019
22fa909
test
sanchitmehta Oct 11, 2019
0150fd1
Test
sanchitmehta Oct 11, 2019
082566b
test
sanchitmehta Oct 11, 2019
410a4c6
test
sanchitmehta Oct 11, 2019
38bfd65
TEST
sanchitmehta Oct 11, 2019
76f753e
test
sanchitmehta Oct 11, 2019
0127f7c
test
sanchitmehta Oct 11, 2019
a977c74
tes
sanchitmehta Oct 11, 2019
46209fb
tes
sanchitmehta Oct 11, 2019
bc775ad
test
sanchitmehta Oct 14, 2019
59800dc
test
sanchitmehta Oct 14, 2019
8ca373c
test
sanchitmehta Oct 14, 2019
65b5e28
Added Basic Auth + Cache
sanchitmehta Dec 2, 2019
5777d71
Minor fixes
sanchitmehta Dec 2, 2019
171e34d
Added host based app name config
sanchitmehta Dec 3, 2019
3780457
Dynamic Environment support
sanchitmehta Dec 3, 2019
c7212ee
Added support for zip deploy
sanchitmehta Dec 5, 2019
74610fb
Increasing Cache Timeout
sanchitmehta Dec 5, 2019
191e607
Fixes to Deployment Status File
sanchitmehta Dec 5, 2019
0270fd2
Added restart triggers for K8 Pods
sanchitmehta Dec 5, 2019
329bf2a
Some tracing
sanchitmehta Dec 5, 2019
0ed099e
Modified basic builder
sanchitmehta Dec 5, 2019
0816c6b
Express Build changes
sanchitmehta Dec 5, 2019
0bd7f8e
Adding a default app for testing in KubeMiddleware
sanchitmehta Dec 5, 2019
f6da0fb
Fixed Zip Deploy support
sanchitmehta Dec 6, 2019
60ef9a0
debugging
sanchitmehta Dec 6, 2019
125c3cd
test
sanchitmehta Dec 6, 2019
d447af9
remove oryx env zip
sanchitmehta Dec 6, 2019
11984f7
basic builder bug fix
sanchitmehta Dec 6, 2019
56373f6
basic builder
sanchitmehta Dec 6, 2019
860fab6
Removing extra log lines
sanchitmehta Dec 6, 2019
f5c8e48
Test
sanchitmehta Dec 6, 2019
b87c67f
SCM Build setting reinforced
sanchitmehta Dec 6, 2019
ca714c9
K8SE Custom object support
sanchitmehta Feb 3, 2020
ceb8339
Migrated to buildctl for K8SE Operations
sanchitmehta Feb 3, 2020
18e3f18
Fixing git deployments
sanchitmehta Feb 26, 2020
06fc670
Sanmeht/k8seslots (#111)
sanchitmehta Mar 19, 2020
36cd4c4
Update "triggers" information for the function apps (#112)
SatishRanjan Apr 3, 2020
6d9a031
Passing function app triggers string from KuduLite to buildctl comman…
SatishRanjan Apr 9, 2020
1d20b32
[K8SE] Add BetaMetadata options for 'feature/k8se' (#136)
sanchitmehta Sep 30, 2020
b08f508
Fix Null Ref Exception + Base64 Encode Patch (#149)
sanchitmehta Nov 5, 2020
c8a6e99
SyncTrigger API for the function app (#152)
SatishRanjan Nov 30, 2020
f328c6d
Added support for KEDA Durable triggers
cgillum Mar 18, 2021
29966b9
Add query and targetValue
cgillum Mar 18, 2021
a1c16b0
PR feedback
cgillum Mar 18, 2021
53222ff
PR feedback
cgillum Mar 18, 2021
25bb9a5
Merge pull request #191 from cgillum/feature/k8se-durable-mssql
JennyLawrance Mar 23, 2021
cae963b
fix bldctl issue (#187)
xwang971 Mar 23, 2021
64d80a7
Update KEDA transformation to match core-tools (#192)
ahmelsayed Mar 31, 2021
f14b10b
only return valid keda triggers (#194)
ahmelsayed Apr 13, 2021
3950b21
Updates for Durable SQL v0.7.0-alpha changes (#197)
cgillum Apr 19, 2021
6facc9f
Support KEDA queue scale trigger for Logic App workflow app (#196)
Apr 19, 2021
6ba128f
add http trigger as valid keda trigger type
divyagandhisethi Apr 21, 2021
bec1505
Merge pull request #198 from divyagandhisethi/feature/k8se
pragnagopa Apr 21, 2021
97b2a5b
Refactor AppType header (#201)
sanchitmehta Apr 26, 2021
8ce8727
[Functions]Binding Expression Transformation for AppSettings (#199)
TsuyoshiUshio May 7, 2021
545dc5d
Merge from master (#204)
May 7, 2021
17ce521
OneDeployment API code (#200)
SatishRanjan May 7, 2021
a17a854
Logic app scaler bugfix and zipdeploy k8se deploy try add instead of …
May 13, 2021
96aae86
Fix: [Functions][Kubernetes]SyncTrigger issue (#208)
TsuyoshiUshio May 19, 2021
7a3eef6
Include extensions section from host.joson to create scale triggers (…
TsuyoshiUshio May 21, 2021
bda83a9
Fix Kafka Trigger Metadata (#210)
TsuyoshiUshio May 21, 2021
d92a89d
SSH Fixes + Remove References to Unused Routes (#211)
sanchitmehta May 24, 2021
632fd9a
Fix sync triggers (#212)
ahmelsayed May 24, 2021
1300017
Fix DefaultValueHandling in sync triggers (#213)
ahmelsayed May 24, 2021
45644b1
Migrate netcoreapp3.1 and ILogger (#214)
TsuyoshiUshio Jun 21, 2021
b012ad4
fixing feature/k8se branch's GetArticfactURLFromARMJSON to read packa…
SatishRanjan Jul 7, 2021
f48eee9
Merge pull request #218 from Azure-App-Service/satishra/feature-k8se-…
SatishRanjan Jul 8, 2021
53fc5c8
Fix the incorrect repository folder for oryx build
LaylaLiu Sep 3, 2021
0004745
Fix test case
LaylaLiu Oct 9, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 25 additions & 0 deletions .github/workflows/pr-validation.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Pull Request Validation for feature/k8se

on:
push:
branches: [ feature/k8se ]
pull_request:
branches: [ feature/k8se ]

jobs:
build:

runs-on: windows-latest

steps:
- uses: actions/checkout@v2
- name: Setup .NET
uses: actions/setup-dotnet@v1
with:
dotnet-version: 3.1.x
- name: Restore dependencies
run: dotnet restore
- name: Build
run: dotnet build --no-restore
- name: Test
run: dotnet test --no-build --verbosity normal
45 changes: 42 additions & 3 deletions Common/Constants.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,20 @@ namespace Kudu
{
public static class Constants
{
//Scan functionality files
public const string ScanLockFile = "scan.lock";
public static string ScanStatusFile = "status.json";
public static string ScanLogFile = "scan_log.log";
public static string ScanFolderName = "Scan_";
public static string MaxScans = "2";
public static string ScanDir = "/home/site/wwwroot";
public static string ScriptPath = "/custom_scripts/daily_scan_script.sh";
public static string ScanCommand = ScriptPath+" "+ScanDir;
public static string ScanTimeOutMillSec = "1200000"; // 20 mins
public static string ScanManifest = "modified_times.json";
public static string AggregrateScanResults = "aggregrate_scans.log";
public static string TempScanFile = "temp_scan_monitor";

public const string WebRoot = "wwwroot";
public const string MappedSite = "/_app";
public const string RepositoryPath = "repository";
Expand Down Expand Up @@ -84,6 +98,8 @@ public static TimeSpan MaxAllowedExecutionTime
public const string LogicAppJson = "logicapp.json";
public const string LogicAppUrlKey = "LOGICAPP_URL";

public const string AppSettingsRegex = "%.*?%";

public const string SiteExtensionProvisioningStateCreated = "Created";
public const string SiteExtensionProvisioningStateAccepted = "Accepted";
public const string SiteExtensionProvisioningStateSucceeded = "Succeeded";
Expand All @@ -105,6 +121,8 @@ public static TimeSpan MaxAllowedExecutionTime
public const string SiteAuthEncryptionKey = "WEBSITE_AUTH_ENCRYPTION_KEY";
public const string HttpHost = "HTTP_HOST";
public const string WebSiteSwapSlotName = "WEBSITE_SWAP_SLOTNAME";
public const string AzureWebsiteInstanceId = "WEBSITE_INSTANCE_ID";
public const string ContainerName = "CONTAINER_NAME";

public const string Function = "function";
public const string Functions = "functions";
Expand All @@ -116,6 +134,7 @@ public static TimeSpan MaxAllowedExecutionTime
public const string FunctionsPortal = "FunctionsPortal";
public const string FunctionKeyNewFormat = "~0.7";
public const string FunctionRunTimeVersion = "FUNCTIONS_EXTENSION_VERSION";
public const string ScmRunFromPackage = "SCM_RUN_FROM_PACKAGE";
public const string WebSiteSku = "WEBSITE_SKU";
public const string WebSiteElasticScaleEnabled = "WEBSITE_ELASTIC_SCALING_ENABLED";
public const string DynamicSku = "Dynamic";
Expand All @@ -124,11 +143,31 @@ public static TimeSpan MaxAllowedExecutionTime
public const string HubName = "HubName";
public const string DurableTaskStorageConnection = "connection";
public const string DurableTaskStorageConnectionName = "azureStorageConnectionStringName";
public const string DurableTaskSqlConnectionName = "connectionStringName";
public const string DurableTaskStorageProvider = "storageProvider";
public const string DurableTaskMicrosoftSqlProviderType = "mssql";
public const string MicrosoftSqlScaler = "mssql";
public const string AzureQueueScaler = "azure-queue";
public const string DurableTask = "durableTask";
public const string WorkflowAppKind = "workflowApp";
public const string WorkflowExtensionName = "workflow";
public const string WorkflowSettingsName = "Settings";
public const string Extensions = "extensions";
public const string SitePackages = "SitePackages";
public const string SiteVersionTxt = "siteversion.txt";
public const string PackageNameTxt = "packagename.txt";
public const string KuduBuild = "1.0.0.5";
public const string KuduBuild = "1.0.0.7";

public const string WebSSHReverseProxyPortEnvVar = "KUDU_WEBSSH_PORT";
public const string WebSSHReverseProxyDefaultPort = "3000";

public const string LinuxLogEventStreamName = "MS_KUDU_LOGS";
public const string WebSiteHomeStampName = "WEBSITE_HOME_STAMPNAME";
public const string WebSiteStampDeploymentId = "WEBSITE_STAMP_DEPLOYMENT_ID";
public const string IsK8SEEnvironment = "K8SE_BUILD_SERVICE";

public const string OneDeploy = "OneDeploy";
public const string ArtifactStagingDirectoryName = "extracted";

public const string K8SEAppTypeDefault = "functionapp,kubernetes,linux";
}
}
}
9 changes: 9 additions & 0 deletions Kudu.Console/JavaScriptSerializer.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
namespace Kudu.Console
{
internal class JavaScriptSerializer
{
public JavaScriptSerializer()
{
}
}
}
3 changes: 2 additions & 1 deletion Kudu.Console/Kudu.Console.csproj
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
<Project Sdk="Microsoft.NET.Sdk.Web">

<PropertyGroup>
<TargetFramework>netcoreapp2.2</TargetFramework>
<TargetFramework>netcoreapp3.1</TargetFramework>
<TieredCompilation>true</TieredCompilation>
<AssemblyName>kudu</AssemblyName>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="KubernetesClient" Version="1.5.25" />
<PackageReference Include="XmlSettings" Version="0.1.3" />
</ItemGroup>

Expand Down
46 changes: 35 additions & 11 deletions Kudu.Console/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,23 @@
using Kudu.Core.Tracing;
using System.Reflection;
using XmlSettings;
using k8s;
using IRepository = Kudu.Core.SourceControl.IRepository;
using log4net;
using log4net.Config;

namespace Kudu.Console
{
internal class Program
{

private static IEnvironment env;
private static IDeploymentSettingsManager settingsManager;
private static string appRoot;

private static int Main(string[] args)
{
var logRepository = LogManager.GetRepository(Assembly.GetEntryAssembly());
XmlConfigurator.Configure(logRepository, new FileInfo("log4net.config"));
// Turn flag on in app.config to wait for debugger on launch
if (ConfigurationManager.AppSettings["WaitForDebuggerOnStart"] == "true")
{
Expand All @@ -55,14 +64,14 @@ private static int Main(string[] args)
System.Console.Error.NewLine = "\n";
System.Console.Out.NewLine = "\n";

string appRoot = args[0];
appRoot = args[0];
string wapTargets = args[1];
string deployer = args.Length == 2 ? null : args[2];
string requestId = System.Environment.GetEnvironmentVariable(Constants.RequestIdHeader);

IEnvironment env = GetEnvironment(appRoot, requestId);
env = GetEnvironment(appRoot, requestId);
ISettings settings = new XmlSettings.Settings(GetSettingsPath(env));
IDeploymentSettingsManager settingsManager = new DeploymentSettingsManager(settings);
settingsManager = new DeploymentSettingsManager(settings);

// Setup the trace
TraceLevel level = settingsManager.GetTraceLevel();
Expand All @@ -74,7 +83,7 @@ private static int Main(string[] args)
string deploymentLockPath = Path.Combine(lockPath, Constants.DeploymentLockFile);

IOperationLock deploymentLock = DeploymentLockFile.GetInstance(deploymentLockPath, traceFactory);

if (deploymentLock.IsHeld)
{
return PerformDeploy(appRoot, wapTargets, deployer, lockPath, env, settingsManager, level, tracer, traceFactory, deploymentLock);
Expand Down Expand Up @@ -117,7 +126,6 @@ private static int PerformDeploy(

// Adjust repo path
env.RepositoryPath = Path.Combine(env.SiteRootPath, settingsManager.GetRepositoryPath());

string statusLockPath = Path.Combine(lockPath, Constants.StatusLockFile);
string hooksLockPath = Path.Combine(lockPath, Constants.HooksLockFile);

Expand All @@ -126,7 +134,7 @@ private static int PerformDeploy(
IOperationLock hooksLock = new LockFile(hooksLockPath, traceFactory);

IBuildPropertyProvider buildPropertyProvider = new BuildPropertyProvider();
ISiteBuilderFactory builderFactory = new SiteBuilderFactory(buildPropertyProvider, env);
ISiteBuilderFactory builderFactory = new SiteBuilderFactory(buildPropertyProvider, env, null);
var logger = new ConsoleLogger();

IRepository gitRepository;
Expand All @@ -139,11 +147,16 @@ private static int PerformDeploy(
gitRepository = new GitExeRepository(env, settingsManager, traceFactory);
}

env.CurrId = gitRepository.GetChangeSet(settingsManager.GetBranch()).Id;

IServerConfiguration serverConfiguration = new ServerConfiguration();

IAnalytics analytics = new Analytics(settingsManager, serverConfiguration, traceFactory);

IWebHooksManager hooksManager = new WebHooksManager(tracer, env, hooksLock);

IDeploymentStatusManager deploymentStatusManager = new DeploymentStatusManager(env, analytics, statusLock);

IDeploymentManager deploymentManager = new DeploymentManager(builderFactory,
env,
traceFactory,
Expand All @@ -152,7 +165,8 @@ private static int PerformDeploy(
deploymentStatusManager,
deploymentLock,
GetLogger(env, level, logger),
hooksManager);
hooksManager,
null); // K8 todo

var step = tracer.Step(XmlTracer.ExecutingExternalProcessTrace, new Dictionary<string, string>
{
Expand Down Expand Up @@ -180,7 +194,7 @@ private static int PerformDeploy(
{
string branch = settingsManager.GetBranch();
ChangeSet changeSet = gitRepository.GetChangeSet(branch);
IDeploymentStatusFile statusFile = deploymentStatusManager.Open(changeSet.Id);
IDeploymentStatusFile statusFile = deploymentStatusManager.Open(changeSet.Id, env);
if (statusFile != null && statusFile.Status == DeployStatus.Success)
{
PostDeploymentHelper.PerformAutoSwap(env.RequestId,
Expand All @@ -191,11 +205,18 @@ private static int PerformDeploy(
}
catch (Exception e)
{
System.Console.WriteLine(e.InnerException);
tracer.TraceError(e);
System.Console.Error.WriteLine(e.GetBaseException().Message);
System.Console.Error.WriteLine(Resources.Log_DeploymentError);
return 1;
}
finally
{
System.Console.WriteLine("Deployment Logs : '"+
env.AppBaseUrlPrefix+ "/newui/jsonviewer?view_url=/api/deployments/" +
gitRepository.GetChangeSet(settingsManager.GetBranch()).Id+"/log'");
}
}

if (logger.HasErrors)
Expand Down Expand Up @@ -250,6 +271,7 @@ private static string GetSettingsPath(IEnvironment environment)
private static IEnvironment GetEnvironment(string siteRoot, string requestId)
{
string root = Path.GetFullPath(Path.Combine(siteRoot, ".."));
string appName = root.Replace("/home/apps/","");

// CORE TODO : test by setting SCM_REPOSITORY_PATH
// REVIEW: this looks wrong because it ignores SCM_REPOSITORY_PATH
Expand All @@ -267,12 +289,14 @@ private static IEnvironment GetEnvironment(string siteRoot, string requestId)
}

// CORE TODO Handing in a null IHttpContextAccessor (and KuduConsoleFullPath) again
return new Kudu.Core.Environment(root,
var env= new Kudu.Core.Environment(root,
EnvironmentHelper.NormalizeBinPath(binPath),
repositoryPath,
requestId,
Path.Combine(AppContext.BaseDirectory, "KuduConsole", "kudu.dll"),
null);
null,
appName);
return env;
}
}
}
27 changes: 27 additions & 0 deletions Kudu.Console/Properties/launchSettings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
{
"iisSettings": {
"windowsAuthentication": false,
"anonymousAuthentication": true,
"iisExpress": {
"applicationUrl": "http://localhost:7668/",
"sslPort": 0
}
},
"profiles": {
"IIS Express": {
"commandName": "IISExpress",
"launchBrowser": true,
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
}
},
"Kudu.Console": {
"commandName": "Project",
"launchBrowser": true,
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
},
"applicationUrl": "http://localhost:7669/"
}
}
}
19 changes: 19 additions & 0 deletions Kudu.Contracts/Deployment/ArtifactType.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
using System;
using System.Collections.Generic;
using System.Text;

namespace Kudu.Contracts.Deployment
{
public enum ArtifactType
{
Unknown,
War,
Jar,
Ear,
Lib,
Static,
Startup,
Script,
Zip,
}
}
16 changes: 16 additions & 0 deletions Kudu.Contracts/Deployment/BuildMetadata.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
using Newtonsoft.Json;

namespace Kudu.Contracts.Deployment
{
public class BuildMetadata
{
[JsonProperty(PropertyName = "appName")]
public string AppName;

[JsonProperty(PropertyName = "buildVersion")]
public string BuildVersion;

[JsonProperty(PropertyName = "appSubPath")]
public string AppSubPath;
}
}
Loading