diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 00000000000..ff6c89b8ce8 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,2 @@ +*.go text eol=lf +*.txt text eol=lf \ No newline at end of file diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS new file mode 100644 index 00000000000..03d968fbe26 --- /dev/null +++ b/.github/CODEOWNERS @@ -0,0 +1,10 @@ +# https://docs.github.com/en/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/about-code-owners#codeowners-syntax + +* @jongio @ellismg +/cli/ @ellismg @wbreza @vhvb1989 @hemarina @jongio @weikanglim +/ext/ @karolz-ms @ellismg @jongio +/generators/repo/ @wbreza @ellismg @danieljurek +/.github/ @danieljurek @ellismg +/eng/ @danieljurek @ellismg +/schemas/ @jongio @karolz-ms @ellismg +/templates/ @jongio @wbreza diff --git a/.github/ISSUE_TEMPLATE/issue_report.md b/.github/ISSUE_TEMPLATE/issue_report.md new file mode 100644 index 00000000000..79f3e3d7f3b --- /dev/null +++ b/.github/ISSUE_TEMPLATE/issue_report.md @@ -0,0 +1,30 @@ +--- +name: Issue report +about: Create a report to help us improve +title: '[Issue]' +labels: '' +assignees: '' + +--- + +- [ ] Make sure you've installed the latest version using [instructions in the wiki](../wiki/install) + +**Output from `azd version`** +Run `azd version` and copy and paste the output here: + +**Describe the bug** +Description of issue you're seeing... + +**To Reproduce** +Steps to reproduce the behavior... + +**Expected behavior** +A clear and concise description of what you expected to happen. + +**Environment** +Information on your environment: + * Language name and version + * IDE and version : [e.g. Visual Studio 16.3] + +**Additional context** +Add any other context about the problem here. diff --git a/.github/workflows/ISSUE_TEMPLATE/issue.yml b/.github/workflows/ISSUE_TEMPLATE/issue.yml new file mode 100644 index 00000000000..29b200d9f89 --- /dev/null +++ b/.github/workflows/ISSUE_TEMPLATE/issue.yml @@ -0,0 +1,51 @@ +name: Issue report +description: Create a report to help us improve +title: "[Issue]" + +body: + - type: textarea + id: background + attributes: + label: Describe the bug + description: Please provide the description of issue you're seeing. + placeholder: Description + validations: + required: true + - type: textarea + id: expected-behavior + attributes: + label: Expected behavior + description: | + Provide a description of the expected behavior. + placeholder: Expected behavior + validations: + required: true + - type: textarea + id: actual-behavior + attributes: + label: Actual behavior + description: | + Provide a description of the actual behavior observed. If applicable please include any error messages, exception stacktraces or memory dumps. + placeholder: Actual behavior + validations: + required: true + - type: textarea + id: repro-steps + attributes: + label: Reproduction Steps + description: | + Please include minimal steps to reproduce the problem if possible. E.g.: the smallest possible code snippet; or a small project, with steps to run it. If possible include text as text rather than screenshots (so it shows up in searches). + placeholder: Minimal Reproduction + validations: + required: true + - type: textarea + id: environment + attributes: + label: Environment + description: | + Please provide more information on your environment: + * Language name and version + * IDE and version : [e.g. Visual Studio 16.3] + placeholder: Environment + validations: + required: false \ No newline at end of file diff --git a/.github/workflows/cli-ci.yml b/.github/workflows/cli-ci.yml new file mode 100644 index 00000000000..ad3a34f1949 --- /dev/null +++ b/.github/workflows/cli-ci.yml @@ -0,0 +1,43 @@ +name: cli-ci + +on: + pull_request: + paths: + - "cli/**" + - ".github/workflows/cli-ci.yml" + - "go.mod" + branches: [main] + +permissions: + contents: read + pull-requests: write + +jobs: + azd-lint: + runs-on: windows-latest + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-go@v2 + with: + go-version: "1.18.0" + - name: golangci-lint + uses: golangci/golangci-lint-action@v2 + with: + args: -v --timeout 5m0s + working-directory: cli/azd + + cspell-lint: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-node@v1 + name: Run spell check for project and for azd + with: + node-version: "16" + - run: npm install -g cspell + - run: cspell lint '**/*' --config ./.vscode/cspell.yaml --relative --no-progress + - run: cspell lint '**/*.go' --config ./cli/azd/.vscode/cspell.yaml --root ./cli/azd --no-progress + - run: cspell lint '**/*.ts' --config ./ext/vscode/.vscode/cspell.yaml --root ./ext/vscode --no-progress + + bicep-lint: + uses: ./.github/workflows/lint-bicep.yml diff --git a/.github/workflows/lint-bicep.yml b/.github/workflows/lint-bicep.yml new file mode 100644 index 00000000000..1fdd3b9778f --- /dev/null +++ b/.github/workflows/lint-bicep.yml @@ -0,0 +1,11 @@ +on: + workflow_call: + +jobs: + bicep-lint: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: Lint .bicep files + run: $ErrorActionPreference='Continue'; eng/scripts/Test-BicepLint.ps1 + shell: pwsh diff --git a/.github/workflows/sync-wiki.yml b/.github/workflows/sync-wiki.yml new file mode 100644 index 00000000000..b2aec0c98d4 --- /dev/null +++ b/.github/workflows/sync-wiki.yml @@ -0,0 +1,56 @@ +# One way sync wiki from source to target + +name: sync-wiki + +on: + - gollum + - workflow_dispatch + +env: + SOURCE_REPO: ${{ secrets.WIKI_SYNC_SOURCE }} + TARGET_REPO: ${{ secrets.WIKI_SYNC_TARGET }} + +permissions: + # Read secrets + id-token: write + +jobs: + sync-wiki: + runs-on: ubuntu-latest + steps: + - name: Log in with Azure + uses: azure/login@v1 + with: + client-id: ${{ secrets.AZURE_CLIENT_ID }} + tenant-id: ${{ secrets.AZURE_TENANT_ID }} + subscription-id: ${{ secrets.AZURE_SUBSCRIPTION_ID }} + + - name: Fetch PAT from Key Vault + uses: Azure/get-keyvault-secrets@v1 + with: + keyvault: ${{ secrets.AZ_ENGSYS_KV_NAME }} + secrets: 'azuresdk-github-pat' + id: EngSysSecrets + + - name: Set Git Configurations and Credentials + run: | + git config --global user.name "azure-sdk" + git config --global user.email "azuresdk@microsoft.com" + echo "https://azure-sdk:$GH_PAT_SECRET@github.com" > ~/.git-credentials + git config --global credential.helper "store" + env: + GH_PAT_SECRET: ${{ steps.EngSysSecrets.outputs.azuresdk-github-pat }} + + - name: Sync source repo to target + shell: pwsh + run: | + git clone $env:SOURCE_REPO source --origin source + Set-Location source + git remote add target $env:TARGET_REPO + + # Get default branch name + $defaultTargetBranch = (git remote show target | Out-String) -replace "(?ms).*HEAD branch: (\w+).*", '$1' + Write-Host "Default branch for target: $defaultTargetBranch" + + # Overwrite any existing changes in target + git push -f target $defaultTargetBranch diff --git a/.github/workflows/templates-ci.yml b/.github/workflows/templates-ci.yml new file mode 100644 index 00000000000..5596a902ede --- /dev/null +++ b/.github/workflows/templates-ci.yml @@ -0,0 +1,18 @@ +name: templates-ci + +on: + workflow_dispatch: + pull_request: + branches: [main] + paths: + - "templates/**" + - ".github/workflows/templates-ci.yml" + + +permissions: + contents: read + pull-requests: write + +jobs: + bicep-lint: + uses: ./.github/workflows/lint-bicep.yml diff --git a/.github/workflows/vscode-ci.yml b/.github/workflows/vscode-ci.yml new file mode 100644 index 00000000000..90d68d55354 --- /dev/null +++ b/.github/workflows/vscode-ci.yml @@ -0,0 +1,69 @@ +name: vscode-ci + +on: + pull_request: + paths: + - "ext/vscode/**" + - ".github/workflows/vscode-ci.yml" + branches: [main] + +permissions: + actions: read + contents: read + id-token: write + +jobs: + build-test: + runs-on: ${{ matrix.os }} + strategy: + matrix: + node-version: [14.x] + os: [macos-latest, ubuntu-latest, windows-latest] + include: + - os: ubuntu-latest + upload-artifact: true + + steps: + - uses: actions/checkout@v2 + + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v1 + with: + node-version: ${{ matrix.node-version }} + + # On push to `main` name the file `azure-dev-latest.vsix` instead of + # `azure-dev-.vsix` + - name: Set package additional arguments + id: package-arguments + uses: actions/github-script@v5 + with: + result-encoding: string + script: | + let packageArguments = '' + if (context.eventName == 'workflow_dispatch' || context.eventName == 'push') { + packageArguments = '--out azure-dev-latest.vsix' + } + return packageArguments + + - name: Install dependencies + run: | + npm install -g npm + npm ci --no-optional + working-directory: ./ext/vscode + + - name: Test + run: ./ci-test.ps1 + shell: pwsh + working-directory: ./ext/vscode + + - run: ./ci-package.ps1 -PackageArguments "${{ steps.package-arguments.outputs.result }}" + if: matrix.upload-artifact == true + shell: pwsh + working-directory: ./ext/vscode + + - name: 'Upload azd binary to artifact store (upload-artifact: true only)' + if: matrix.upload-artifact == true + uses: actions/upload-artifact@v2 + with: + name: package + path: ./ext/vscode/azure-dev*.vsix diff --git a/.gitignore b/.gitignore new file mode 100644 index 00000000000..600d787dbb2 --- /dev/null +++ b/.gitignore @@ -0,0 +1,36 @@ +# Binaries for programs and plugins +*.exe +*.exe~ +*.dll +*.so +*.dylib + +# Test binary, built with `go test -c` +*.test + +/bin +/.envrc + +# GoLand temp files +.idea + +# Output of the go coverage tool, specifically when used with LiteIDE +*.out + +# Dependency directories (remove the comment below to include it) +# vendor/ + +# Python temporary files +[.]venv/ +*.py[co] +__pycache__/ + +.env +.azure +/cli/azd/bin +*env/ +obj/ +bin/ +node_modules/ +test-results/ +playwright-report/ \ No newline at end of file diff --git a/.markdownlint.json b/.markdownlint.json new file mode 100644 index 00000000000..5822e1fbd67 --- /dev/null +++ b/.markdownlint.json @@ -0,0 +1,6 @@ +{ + "default": true, + "MD013": false, + "MD029": false, + "MD033": false +} \ No newline at end of file diff --git a/.vscode/cspell-github-user-aliases.txt b/.vscode/cspell-github-user-aliases.txt new file mode 100644 index 00000000000..0d8642c2ae3 --- /dev/null +++ b/.vscode/cspell-github-user-aliases.txt @@ -0,0 +1,15 @@ +fatih +ellismg +joho +karolz +sethvargo +stretchr +mattn +isatty +briandowns +envsubst +otiai10 +AlecAivazis +pbnj +multierr +theckman diff --git a/.vscode/cspell-notice.txt b/.vscode/cspell-notice.txt new file mode 100644 index 00000000000..cf6f707cf2f --- /dev/null +++ b/.vscode/cspell-notice.txt @@ -0,0 +1,551 @@ +aaaae +AAADPS +AAAE +AAAEOESS +AAAPSE +AACA +AAEAE +AAEE +Aaef +AAEOAI +AAEOI +Aaex +AAGC +Aaie +AASSQY +AAYAC +Ablog +Aboukhadijeh +ACDAE +ACEC +ACNSSI +Acoe +ADAIC +Adeg +Adege +Adegi +AEAAI +AEAEA +AEAI'o +AEAIAOEAACO +AEAP +AECIO +AECPS +Aecu +Aeecu +AEEEUAU +AEEOUO +AEFS +AEOAGB +AEOPS +AEPS +AESS +AEUA +AEUP +AEUPS +AGGIEI +AIAE +AIAO +AIAOPS +AIEO +AIOU +AIPO +albg +Alexandru +amut +Andeg +Andreas +Antoni +anyio +AOAAE +AODI +AOEA +AOEOA +AOUBIG +apidevtools +APIIAPS +argparse +Ariya +ariyahidayat +Armin +Arnout +arrayish +Aseem +asgiref +Ashkenas +ASSAO'I'U +ASSU +ASSUI +asynckit +AUA'uxa +AUAC +AUAI +Audegi +AUEYEOOD +Authlib +axios +azext +BAEB +Bahmutov +Battelledeg +Beazley +Beniton +BEOPEN +Berkman +bitfield +Bohm +Böhm +Boudra +Boudrias +Brodie +Broggini +Burnerdg +Buus +Bweb +Bynens +Caolan +Carshops +CAZNV +CCAU +cdeg +Cdeg +CEEA +certifi +cffi +Chappell +chardet +cheeriojs +Chemeris +Cliffano +CNRI's +CNRI +CNRIs +Collina +colorama +colorspace +Colvin +concat +Condon +contextlib +contextvars +Cordasco +Cowan +csstype +Cxga +dabh +dataclasses +Ddegu +Debuggable +degadegu +degau +dege +degi +dego +degu +degx +Denicola +denque +depd +devlouisc +Dgooglesucks +Dmitriy +Dmitry +DNAEPS +domelementtype +Domenic +domhandler +domutils +DOOO +DOPO +dotenv +DYID +dynamicproto +EAEB +Eaoe +EAUECOU +EDDPS +Edeg +Edegdeg +Edegi +Edxox +EECE +EECPS +EEEB +EEEEB +EEEEBU +Eemeli +Efendi +Eftimakis +Ehecu +Eldar +Embrey +encodeurl +Enselme +envify +EOOE +Eooo +eoou +EOPS +EPOOE +esprima +ESSO +ESSOY +esutils +etag +EUOO +Evgeny +extglob +EYEI'udegae +Faivre +fastapi +fastq +Fathi +fecha +Feross +figlet +Fijalkowski +Filippo +finalhandler +Fischen +Fliptoo +fluentui +Foord +Fredrik +Freniere +Frob +fullwidth +Gabdullin +Gabor +Geisendorfer +Geisendörfer +Gleb +globby +Gonggrijp +Gravier +Grebeweb +Greenline +Gronholm +Groupdegu +Gruber +Gvda +HAASS +Halliday +haoao +Haza +Heckmann +Herczeg +Hidayat +Hiro +Holowaychuk +Hoyt +Hristov +htmlparser +IAI'U +iamkun +IAOOAIDINEEC +Iaooxo +Iaxe +IBLOG +ICAS +icio +ideg +Ideg +idna +IECIOO +IEDD +IEIEP +IIUA +IIUAE +Ilya +importlib +Insua +IOAE +IOAOU +Iocu +IODO +Ioia +IOOEOOA +IOUEO +Iouiyp +ipaddr +Ipibx +isarray +isboolean +isequal +isinteger +isnumber +isodate +isplainobject +isstring +Istvan +István +Ithu +ITOIA +Ivanov +IXOBs +Ixxi'o +Johansen +Jozsef +jsdevtools +jsdoc +jsonfile +jsonwebtoken +Junon +Kael +Kaplan +Karadjov +KARASZI +Kaspersky +Kazemier +Kepert +kevva +keyvault +Kieffer +Kishore +Kobayashi +Koichi +Krammer +kuler +Kumar +Kvalheim +Lalonde +Lb'Aag +Lionhard +lionhardt +Lionhardt +Loftis +logform +Lostinet +Lotsmanov +Lubbe +Lupo +Lydell +Maciej +Madsen +Malinochkin +Marak +Marasteanu +Markus +Martensson +Mårtensson +Martijn +MATHEMATISCH +Matteo +Mayr +mergewith +Messageu +Messinger +Metcalf +microtask +minimatch +minimist +MMIV +mpath +mquery +MSAC +msal +msrest +multidict +Muvelodes +n'UE +Newswire +nextick +Nicol +Nikolay +Nikulin +nodelib +Noordhuis +Norvell +nspkg +O'aoa +OAAEA +OAATM +OAEP +Oaeu +OAOA +OAOUEO +oaouoa +OAUP +oauthlib +oblog +OCAAE +Ocon +OCPS +odeg +Odeg +odega +Odegau +Odegi +ODEI +ODIA +OEDD +OEEOPS +ONPS +OOAE +OOOON +OOOOOAUAU +openapi +opensource +Ossu +OUAC +oudegdegx +OUIO +Ousret +Ozcitak +Ozgur +Parada +parseurl +pathlib +Pbgaa +Pdegao'P +Pedegi +picomatch +PIOD +PISSA +Pitrou +Poberezkin +Podeg +POOU +portalocker +Portng +Portnoy's +Prewitt +PSAA +PSAC +PSAI +PSIO +PSIOAC +PSIOAE +PSIOPOPO +PSOE +PSOU +punycode +Pushkarev +Puzrin +pycparser +pydantic +pymongo +pywin +QPAZP +R'Nn +Radchenko +Rajlich +Ranjit +Rasic +realpath +Reardon +redete +Reitz +repoman +Reston +reusify +Rigo +rimraf +Rossum +Samhuri +Sami +Sanwenji +saslprep +Saurabh +Sayle +scandir +Schee +Schlinkert +Schlueter +Schwern +Scipy +Sencha +Senko +setprototypeof +Shanker +Shirokov +Shtuchkin +Shtylman +Sindre +sindresorhus +Skovoroda +slaff +Slavei +sniffio +Sodegu +softme +Sorhus +sprintf +SSCI'A +Stallman's +Stallman +starlette +Statsmodels +STICHTING +Subagio +Suoi +Surnet +Svetlov +Swaagman +TAHRI +Talmage +Tamas +Tarr +Teambition +Thorsen +Tiancheng +Tieken +tmpdir +toidentifier +tootallnate +Troffaes +Tschan +Tsvettsikh +typer +udege +udego +Ui'Eu +universalify +unpipe +Unshift +UOEAU +urllib +uthoa +uvicorn +Vasko +vaxilart +Verborgh +Vercel +Viacheslav +Vieh +Vitaly +Vogeln +Vorbach +Vrandecic +Wanstrath +wcwidth +Wdeg +webidl +Weis +werk +whatwg +whitequark +Wikiu +Wikix +Winberry +winstonjs +Woong +Wpsu +wrappy +xdeg +xi'ou +xmlbuilder +yallist +yamljs +yarl +Ydnar +YOOE +Yoyodyne +Yusuke +Yxaae +Yxdeg +Zabriskie +Zagora +Zhang +zipp +Zope \ No newline at end of file diff --git a/.vscode/cspell-templates.txt b/.vscode/cspell-templates.txt new file mode 100644 index 00000000000..cfff29aaf83 --- /dev/null +++ b/.vscode/cspell-templates.txt @@ -0,0 +1,39 @@ +APPLICATIONINSIGHTS +appservice +asgi +ASPNETCORE +asyncio +autouse +azdo +borderless +browserslist +codepaths +Codespaces +configfile +containerapp +CUSTOMHANDLER +envconfig +ezfunc +immer +inprogress +INPROGRESS +Instrumentor +mkdir +OPTARG +prestart +printenv +pycache +pytest +Quickstart +reactd +ROLENAME +Serializers +staticwebapp +tsbuildinfo +TTFB +uuidv +venv +virtuals +VSIX +webfonts +webui diff --git a/.vscode/cspell.global.yaml b/.vscode/cspell.global.yaml new file mode 100644 index 00000000000..40a627a86fe --- /dev/null +++ b/.vscode/cspell.global.yaml @@ -0,0 +1,33 @@ +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. + +# cspell settings for ALL projects in the repo + +version: 0.2 +language: en +ignorePaths: + - ./go.mod + - go.sum +words: + - opentelemetry + - bson + - azdo +ignoreWords: + - magefile +useGitignore: true +dictionaryDefinitions: + - name: gitHubUserAliases + path: ./cspell-github-user-aliases.txt + description: Custom Workspace Dictionary + addWords: true + scope: workspace + - name: noticeMd + path: ./cspell-notice.txt + description: Custom Notice Dictionary + addWords: true + scope: workspace +dictionaries: + - powershell + - go + - gitHubUserAliases + - noticeMd diff --git a/.vscode/cspell.yaml b/.vscode/cspell.yaml new file mode 100644 index 00000000000..0949b323930 --- /dev/null +++ b/.vscode/cspell.yaml @@ -0,0 +1,41 @@ +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. + +# cspell settings for top project (no cli) + +# Use global config +import: cspell.global.yaml + +ignorePaths: + - cli # uses its own cspell config + - eng # not required + - ext # uses its own cspell config + - "*.bicep" # no need to lint resource files +dictionaryDefinitions: + - name: templatesDictionary + path: ./cspell-templates.txt + description: Custom Dictionary for templates + addWords: true + scope: workspace +dictionaries: + - templatesDictionary +overrides: + - filename: ./SECURITY.md + words: + - MSRC + - msrc + - filename: ./README.md + words: + - VSIX + - filename: generators/repo/src/commands/generate.ts + words: + - nodir + - filename: generators/repo/tsconfig.json + words: + - tsbuildinfo + - filename: schemas/v1.0/azure.yaml.json + words: + - prodapi + - appservice + - containerapp + - staticwebapp diff --git a/.vscode/extensions.json b/.vscode/extensions.json new file mode 100644 index 00000000000..b9dbefb2712 --- /dev/null +++ b/.vscode/extensions.json @@ -0,0 +1,8 @@ +{ + // See http://go.microsoft.com/fwlink/?LinkId=827846 + // for the documentation about the extensions.json format + "recommendations": [ + "streetsidesoftware.code-spell-checker", + "redhat.vscode-yaml" + ] +} diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 00000000000..4d637b770c3 --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,3 @@ +{ + "cSpell.import": ["cspell.yaml"], +} \ No newline at end of file