Skip to content

Commit 5eff9b8

Browse files
jeremymengxirzec
andauthored
[ContainerRegistry] Update to beta.2 API design (Azure#15109)
and address JS review feedback. API changes include Change to a single ContainerRegistryClient with helper classes of hierarchy ContainerRepository => RegistryArtifact to group repository and artifact operations Add string literal types for artifact architectures and operation systems. Combine the parameters to Set*Properties() methods Add readonly properties like loginServer and fullyQualifiedName for better interaction with docker and other tools. Various renames * Apply suggestions from code review Improve CHANGELOG Co-authored-by: Jeff Fisher <[email protected]>
1 parent e31eb3e commit 5eff9b8

File tree

60 files changed

+2308
-1797
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

60 files changed

+2308
-1797
lines changed

sdk/containerregistry/container-registry/CHANGELOG.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,21 @@
22

33
## 1.0.0-beta.2 (Unreleased)
44

5+
### Features Added
6+
7+
- Added new properties to allow easier interaction with other docker tools:
8+
- `loginServer` in `ContainerRegistryClient`.
9+
- `fullyQualifiedName` in `ContainerRepository`
10+
11+
### Breaking Changes
12+
13+
The public API surface of this library has been re-designed. Notable changes include
14+
15+
- Removed: `ContainerRepositoryClient`. Operations on repositories are now grouped in `ContainerRepository` type and operations on artifacts are now in `RegistryArtifact` type. Some `*Options` types are also renamed accordingly.
16+
- Renamed: `endpoint` property is renamed to `registryUrl`.
17+
- Renamed: `listRepositories()` is renamed to `listRepositoryNames()` in `ContainerRegistryClient`.
18+
- Renamed: "RegistryArtifact" in property or function names replaced by "Manifest".
19+
- Renamed: `*OrderBy` values is now capitalized as `timeDesc` and `timeAsc`. Previously they are all in lower case.
520

621
## 1.0.0-beta.1 (2021-04-06)
722

sdk/containerregistry/container-registry/README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -55,12 +55,12 @@ The [Azure Identity library][identity] provides easy Azure Active Directory supp
5555
const { ContainerRegistryClient } = require("@azure/container-registry");
5656
const { DefaultAzureCredential } = require("@azure/identity");
5757

58-
const endpoint = process.env.REGISTRY_ENDPOINT;
58+
const endpoint = process.env.CONTAINER_REGISTRY_ENDPOINT;
5959
// Create a ContainerRegistryClient that will authenticate through Active Directory
6060
const client = new ContainerRegistryClient(endpoint, new DefaultAzureCredential());
6161
```
6262

63-
Note that these samples assume you have a `REGISTRY_ENDPOINT` environment variable set, which is the URL including the name of the login server and the `https://` prefix.
63+
Note that these samples assume you have a `CONTAINER_REGISTRY_ENDPOINT` environment variable set, which is the URL including the name of the login server and the `https://` prefix.
6464

6565
For more information on using AAD with Azure Container Registry, please see the service's [Authentication Overview](https://docs.microsoft.com/azure/container-registry/container-registry-authentication).
6666

@@ -83,11 +83,11 @@ const { DefaultAzureCredential } = require("@azure/identity");
8383
async function main() {
8484
// endpoint should be in the form of "https://myregistryname.azurecr.io"
8585
// where "myregistryname" is the actual name of your registry
86-
const endpoint = process.env.REGISTRY_ENDPOINT;
86+
const endpoint = process.env.CONTAINER_REGISTRY_ENDPOINT || "<endpoint>";
8787
const client = new ContainerRegistryClient(endpoint, new DefaultAzureCredential());
8888

8989
console.log("Listing repositories");
90-
const iterator = client.listRepositories();
90+
const iterator = client.listRepositoryNames();
9191
for await (const repository of iterator) {
9292
console.log(` repository: ${repository}`);
9393
}
Lines changed: 11 additions & 11 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)