Skip to content
This repository was archived by the owner on Aug 26, 2025. It is now read-only.
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
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
44 changes: 34 additions & 10 deletions eng/mgmt/automation/generate_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ def sdk_automation_typespec(config: dict) -> List[dict]:
if 'relatedTypeSpecProjectFolder' not in config:
return packages

head_sha = config['headSha']
repo_url = config['repoHttpsUrl']
head_sha: str = config['headSha']
repo_url: str = config['repoHttpsUrl']

tsp_projects = config['relatedTypeSpecProjectFolder']
if isinstance(tsp_projects, str):
Expand All @@ -47,16 +47,40 @@ def sdk_automation_typespec(config: dict) -> List[dict]:
service = None
module = None
try:
cmd = ['pwsh', './eng/common/scripts/TypeSpec-Project-Process.ps1', tsp_dir, head_sha, repo_url]
logging.info('Command line: ' + ' '.join(cmd))
output = subprocess.check_output(cmd, cwd=sdk_root)
output_str = str(output, 'utf-8')
script_return = output_str.splitlines()[-1] # the path to sdk folder
sdk_folder = os.path.relpath(script_return, sdk_root)
def remove_prefix(text, prefix):
if text.startswith(prefix):
return text[len(prefix):]
return text

def find_sdk_folder():
cmd = ['git', 'add', '.']
check_call(cmd, sdk_root)

cmd = ['git', 'status', '--porcelain', '**/tsp-location.yaml']
logging.info('Command line: ' + ' '.join(cmd))
output = subprocess.check_output(cmd, cwd=sdk_root)
output_str = str(output, 'utf-8')
git_items = output_str.splitlines()
sdk_folder = None
if len(git_items) > 0:
tsp_location_item: str = git_items[0]
sdk_folder = tsp_location_item[1:].strip()[0:-len('/tsp-location.yaml')]

cmd = ['git', 'reset', '.']
check_call(cmd, sdk_root)

return sdk_folder

repo = remove_prefix(repo_url, 'https://github.com/')
cmd = ['npx', 'tsp-client', 'init', '--debug', '--tsp-config', tsp_dir, '--commit', head_sha, '--repo', repo]
check_call(cmd, sdk_root)

sdk_folder = find_sdk_folder()
logging.info('SDK folder: ' + sdk_folder)
succeeded = True
if sdk_folder:
succeeded = True
except subprocess.CalledProcessError as error:
logging.error(f'TypeSpec-Project-Process.ps1 fail: {error}')
logging.error(f'tsp-client init fail: {error}')

if succeeded:
# check require_sdk_integration
Expand Down
2 changes: 2 additions & 0 deletions eng/mgmt/automation/init.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ export NVM_DIR="$HOME/.nvm"
nvm install v18.15.0
nvm alias default node

npm install @azure-tools/typespec-client-generator-cli

cat << EOF > $2
{"envs": {"PATH": "$JAVA_HOME_11_X64/bin:$PATH", "JAVA_HOME": "$JAVA_HOME_11_X64"}}
EOF
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# Release History

## 1.0.0-beta.8 (Unreleased)
## 1.0.0-beta.1 (2024-02-05)

- Azure Resource Manager AppConfiguration client library for Java. This package contains Microsoft Azure SDK for AppConfiguration Management SDK. Package tag package-preview-2023-08. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt).

### Features Added

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

Azure Resource Manager AppConfiguration client library for Java.

This package contains Microsoft Azure SDK for AppConfiguration Management SDK. Package tag package-2023-03-01. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt).
This package contains Microsoft Azure SDK for AppConfiguration Management SDK. Package tag package-preview-2023-08. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt).

## We'd love to hear your feedback

Expand Down Expand Up @@ -32,7 +32,7 @@ Various documentation is available to help you get started
<dependency>
<groupId>com.azure.resourcemanager</groupId>
<artifactId>azure-resourcemanager-appconfiguration</artifactId>
<version>1.0.0-beta.7</version>
<version>1.0.0-beta.8</version>
</dependency>
```
[//]: # ({x-version-update-end})
Expand All @@ -45,7 +45,7 @@ Azure Management Libraries require a `TokenCredential` implementation for authen

### Authentication

By default, Azure Active Directory token authentication depends on correct configuration of the following environment variables.
By default, Microsoft Entra ID token authentication depends on correct configuration of the following environment variables.

- `AZURE_CLIENT_ID` for Azure client ID.
- `AZURE_TENANT_ID` for Azure tenant ID.
Expand Down Expand Up @@ -94,7 +94,7 @@ This project has adopted the [Microsoft Open Source Code of Conduct][coc]. For m
<!-- LINKS -->
[survey]: https://microsoft.qualtrics.com/jfe/form/SV_ehN0lIk2FKEBkwd?Q_CHL=DOCS
[docs]: https://azure.github.io/azure-sdk-for-java/
[jdk]: https://docs.microsoft.com/java/azure/jdk/
[jdk]: https://learn.microsoft.com/azure/developer/java/fundamentals/
[azure_subscription]: https://azure.microsoft.com/free/
[azure_identity]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/identity/azure-identity
[azure_core_http_netty]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/core/azure-core-http-netty
Expand All @@ -103,3 +103,5 @@ This project has adopted the [Microsoft Open Source Code of Conduct][coc]. For m
[cg]: https://github.com/Azure/azure-sdk-for-java/blob/main/CONTRIBUTING.md
[coc]: https://opensource.microsoft.com/codeofconduct/
[coc_faq]: https://opensource.microsoft.com/codeofconduct/faq/

![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-java%2Fsdk%2Fappconfiguration%2Fazure-resourcemanager-appconfiguration%2FREADME.png)
Loading