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

WIP: scaffold with init #2561

Closed
wants to merge 107 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
107 commits
Select commit Hold shift + click to select a range
65266ef
Add app types
weikanglim Jan 26, 2023
726e0ac
Rename resources
weikanglim Jan 26, 2023
a3028dc
Merge remote-tracking branch 'upstream/main' into weilim/init-scaffold
weikanglim Jan 26, 2023
baf2112
add core lib
weikanglim Jan 26, 2023
6b2a041
fix output
weikanglim Jan 26, 2023
b3784e0
Allow plain initialization
weikanglim Jan 26, 2023
af885c7
Project config changes (cherry-pick ready).
weikanglim Jan 30, 2023
27bd4d7
Add apphint
weikanglim Jan 30, 2023
6c4f2e0
Fix api bicep
weikanglim Jan 30, 2023
1eeb6d7
Use apphint
weikanglim Jan 30, 2023
05377db
Complete appdetect
weikanglim Feb 1, 2023
28440b5
refinements
weikanglim Feb 8, 2023
292f0c9
Restructure detection
weikanglim Feb 9, 2023
e41c473
cleaning up
weikanglim Feb 9, 2023
5a23216
add cli command
weikanglim Feb 9, 2023
ffae916
rework template matching
weikanglim Feb 9, 2023
e7d55ff
switch to js
weikanglim Feb 9, 2023
b50597f
update config
weikanglim Feb 9, 2023
25246c4
fallback back to prompt
weikanglim Feb 9, 2023
28ee60f
Use JavaScript instead of nodejs
weikanglim Feb 21, 2023
01c79ea
add react handling
weikanglim Feb 21, 2023
2c89262
Clean up UI
weikanglim Feb 21, 2023
8ae52ae
Merge remote-tracking branch 'upstream/main' into weilim/init-scaffold
weikanglim Feb 24, 2023
49f7842
Commit go.sum after tidy
weikanglim Feb 24, 2023
f486376
document characteristics
weikanglim Feb 24, 2023
15973be
moving towards a goal
weikanglim Feb 25, 2023
9027637
Fix for api-web
weikanglim Feb 27, 2023
439897b
Remove db
weikanglim Feb 27, 2023
a022e09
Make KV template deployable
weikanglim Mar 2, 2023
f90e7ee
Make db templating
weikanglim Mar 2, 2023
7f7815a
merge api-db -> api
weikanglim Mar 2, 2023
72777e5
make api-web happen similarly
weikanglim Mar 2, 2023
56d75df
Add generation
weikanglim Mar 6, 2023
a1fded6
Merge remote-tracking branch 'upstream/main' into weilim/init-scaffold
weikanglim Mar 6, 2023
0920750
Update cspell
weikanglim Mar 6, 2023
5496b72
Fix lint
weikanglim Mar 6, 2023
1781ca0
connection-string support
weikanglim Mar 21, 2023
f756e2b
Merge upstream/main
weikanglim Jun 19, 2023
1d26ad9
Uptake changes
weikanglim Jun 19, 2023
355e7fc
fixup comments
weikanglim Jun 22, 2023
f4abfc3
add tests
weikanglim Jun 22, 2023
a0ab52a
add live tests, fix issues found
weikanglim Jun 23, 2023
52fb02a
adjust case-sensitivity
weikanglim Jun 23, 2023
773019a
add comment
weikanglim Jun 23, 2023
da8cbc5
cleanup detector_live_test
weikanglim Jun 23, 2023
1296e14
Merge main
weikanglim Jul 18, 2023
5f94b49
WIP: somewhat working example
weikanglim Jul 18, 2023
079b873
[appdetect] add database detection for python and js
weikanglim Jul 20, 2023
964ca74
[scaffold] add db support (deployment not passing)
weikanglim Jul 20, 2023
e3bf971
[ui]: fix spinner display
weikanglim Jul 21, 2023
fa25f10
fix db connection string passthrough
weikanglim Jul 21, 2023
2eebd43
add firewall rule
weikanglim Jul 21, 2023
e1ba389
add frontend support
weikanglim Jul 21, 2023
157df29
cors support
weikanglim Jul 21, 2023
3770ce3
use azd's fetch
weikanglim Jul 22, 2023
516f752
simplify generation - use template definitions
weikanglim Jul 22, 2023
95f0774
fix follow-up
weikanglim Jul 22, 2023
b53b887
fix firewall
weikanglim Jul 22, 2023
9b83330
remolve old files
weikanglim Jul 22, 2023
ee68346
comment out docker for now
weikanglim Jul 24, 2023
f5b6978
removing more old files
weikanglim Jul 24, 2023
8f38f13
address lint and test
weikanglim Jul 24, 2023
7aef105
update functional test
weikanglim Jul 24, 2023
8acabeb
play nice with existing init logic
weikanglim Jul 24, 2023
7154439
fix: file.Close()
weikanglim Jul 24, 2023
705858b
fix remainder tests
weikanglim Jul 24, 2023
60ed682
fix asker
weikanglim Jul 24, 2023
ac07de3
basic troubleshooting flow
weikanglim Jul 31, 2023
fb5709b
support add troubleshooting
weikanglim Jul 31, 2023
fb6df30
complete troubleshooting
weikanglim Jul 31, 2023
aac9a1e
refactor prompt and language mapping
weikanglim Aug 1, 2023
af2af27
formatting and basic readme
weikanglim Aug 1, 2023
1ecada3
add summary template WIP
weikanglim Aug 2, 2023
24bf723
buildpack: add support
weikanglim Aug 2, 2023
443ea1e
fix long-line lint
weikanglim Aug 2, 2023
931f40f
refactor and use stable imageName
weikanglim Aug 2, 2023
ad88c12
bicep: fix safe indexing
weikanglim Aug 3, 2023
928a550
fix follow-up in `up`
weikanglim Aug 5, 2023
f4bc4ae
fix docker path being incorrect
weikanglim Aug 5, 2023
5675767
ux: input hint
weikanglim Aug 5, 2023
d8fcf06
ux cleanup
weikanglim Aug 5, 2023
862376b
switch to private builder
weikanglim Aug 5, 2023
fa19ea3
fix application of ports
weikanglim Aug 7, 2023
490e377
update next-steps.md
weikanglim Aug 7, 2023
aaae215
ux: generating summary separation
weikanglim Aug 8, 2023
62d18f0
Merge main
weikanglim Aug 8, 2023
6979642
Add .gitignore
weikanglim Aug 8, 2023
7e5f5f6
rename var
weikanglim Aug 8, 2023
d113cb4
allow empty db name
weikanglim Aug 8, 2023
28ee255
add troubleshooting info
weikanglim Aug 8, 2023
45fec21
make loading more clear
weikanglim Aug 9, 2023
16c20ff
fix hint text styling
weikanglim Aug 9, 2023
6256577
experiment: no environment defaulting
weikanglim Aug 9, 2023
24188bb
clean output
weikanglim Aug 9, 2023
82fefff
remove modify file path
weikanglim Aug 9, 2023
2836881
check for allowedOrigins
weikanglim Aug 9, 2023
d377b8f
fix lll
weikanglim Aug 9, 2023
28f8b88
fix cspell
weikanglim Aug 9, 2023
6c099d9
Handle upper-case names
weikanglim Aug 10, 2023
f5dc8e8
temp: use paketo
weikanglim Aug 11, 2023
7b94651
use paketo
weikanglim Aug 11, 2023
6bdb86e
merge main
weikanglim Aug 11, 2023
4f504a2
fix lint
weikanglim Aug 11, 2023
135dffa
remove buildpack flag
weikanglim Aug 11, 2023
0ad5b69
add more name handling and tests
weikanglim Aug 15, 2023
ab8c6d4
small ux updates
weikanglim Aug 21, 2023
410abb8
prompt changes
weikanglim Aug 21, 2023
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
1 change: 1 addition & 0 deletions .vscode/cspell-github-user-aliases.txt
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,5 @@ pbnj
sethvargo
stretchr
theckman
bmatcuk
tonybaloney
27 changes: 27 additions & 0 deletions cli/azd/.vscode/cspell-azd-dictionary.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ alphafeatures
apimanagement
apims
appconfiguration
appdb
appdetect
appinsights
appinsightsexporter
appinsightsstorage
Expand All @@ -30,15 +32,19 @@ azfile
azruntime
azsdk
AZURECLI
azuredb
azureedge
azurestaticapps
azuresql
azuretools
azureutil
azureyaml
Backticks
bicept
BOOLSLICE
BUILDID
BUILDNUMBER
buildpack
buildpacks
byoi
cflags
Expand All @@ -58,6 +64,7 @@ devel
discarder
docf
dockerproject
doublestar
dskip
eastus
endregion
Expand All @@ -70,6 +77,7 @@ executil
funcapp
functestapp
functionapp
frontends
go-imath
GOARCH
GOCOVERDIR
Expand All @@ -81,6 +89,8 @@ hotspot
iidfile
ineffassign
javac
jsont
jquery
jmes
keychain
LASTEXITCODE
Expand All @@ -92,6 +102,8 @@ microsoftonline
mockarmresources
mockazcli
mvnw
mysqldb
mysqlclient
nobanner
nodeapp
nolint
Expand All @@ -107,11 +119,15 @@ otlp
otlpconfig
otlptrace
otlptracehttp
missingkey
pflag
postgre
preinit
proxying
psycopg
pulumi
pyapp
pyproject
pyvenv
reauthentication
relogin
Expand All @@ -127,6 +143,7 @@ setenvs
snapshotter
springapp
sstore
sqlserver
staticcheck
staticwebapp
stdouttrace
Expand All @@ -147,7 +164,17 @@ unmarshalling
unsetenvs
unsets
utsname
vuejs
westus2
wireinject
yacspin
zerr
weilimtest
capps
wsgi
gunicorn
logfile
Procfile
frwk
paketo
paketobuildpacks
57 changes: 57 additions & 0 deletions cli/azd/appdetect/main.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
package main

import (
"flag"
"fmt"
"os"

"github.com/azure/azure-dev/cli/azd/internal/appdetect"
)

var repoDirectory string
var directory string
var projectDirectory string

func init() {
flag.StringVar(&repoDirectory, "repo", "", "Path to repository to detect")
flag.StringVar(&directory, "dir", "", "Directory containing projects to detect")
flag.StringVar(&projectDirectory, "proj", "", "Specific project directory to detect")

}

func main() {
flag.Parse()

if repoDirectory == "" && directory == "" && projectDirectory == "" {
fmt.Println("must set one of 'repo', 'proj', or 'dir'")
os.Exit(1)
}

var projects []appdetect.Project
var err error

if repoDirectory != "" {
projects, err = appdetect.Detect(repoDirectory)
}

if directory != "" {
projects, err = appdetect.DetectUnder(directory)
}

if projectDirectory != "" {
var project *appdetect.Project
project, err = appdetect.DetectDirectory(projectDirectory)

if err == nil && project != nil {
projects = append(projects, *project)
}
}

if err != nil {
fmt.Println(err)
os.Exit(1)
}

fmt.Println("Projects detected:")
fmt.Printf("%v\n", projects)
}
2 changes: 2 additions & 0 deletions cli/azd/cmd/container.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ import (
"github.com/azure/azure-dev/cli/azd/pkg/tools/kubectl"
"github.com/azure/azure-dev/cli/azd/pkg/tools/maven"
"github.com/azure/azure-dev/cli/azd/pkg/tools/npm"
"github.com/azure/azure-dev/cli/azd/pkg/tools/pack"
"github.com/azure/azure-dev/cli/azd/pkg/tools/python"
"github.com/azure/azure-dev/cli/azd/pkg/tools/swa"
"github.com/azure/azure-dev/cli/azd/pkg/tools/terraform"
Expand Down Expand Up @@ -313,6 +314,7 @@ func registerCommonDependencies(container *ioc.NestedContainer) {
container.RegisterSingleton(maven.NewMavenCli)
container.RegisterSingleton(npm.NewNpmCli)
container.RegisterSingleton(python.NewPythonCli)
container.RegisterSingleton(pack.NewPackCli)
container.RegisterSingleton(swa.NewSwaCli)
container.RegisterSingleton(terraform.NewTerraformCli)

Expand Down
Loading