Skip to content

Commit

Permalink
verification of links pipelines (#9216)
Browse files Browse the repository at this point in the history
  • Loading branch information
KarishmaGhiya authored Jul 11, 2020
1 parent 9fea001 commit 1d25f3e
Show file tree
Hide file tree
Showing 37 changed files with 228 additions and 214 deletions.
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ Generally speaking, the following commands are roughly equivalent:

## Onboarding a new library

To add a new library to the repo, update `rush.json` in the root of the repo and add a new entry to the `projects` array at the bottom of the file. The package name must be the full name of the package as specified in its package.json. Your new library must follow our [repository structure](https://github.com/Azure/azure-sdk/blob/master/docs/engineering-system/repo-structure.md) (specifically, it must be located at `sdk/<servicename>/<packagename>`) and your library's package.json must contain the required scripts as documented [above](#other-npm-scripts). Once the library is added, run `rush update` to install and link dependencies. If your new library has introduced a dependency version conflict, this command will fail. See [above](#resolving-dependency-version-conflicts) to learn how to resolve dependency version conflicts.
To add a new library to the repo, update `rush.json` in the root of the repo and add a new entry to the `projects` array at the bottom of the file. The package name must be the full name of the package as specified in its package.json. Your new library must follow our [repository structure](https://github.com/Azure/azure-sdk/blob/master/docs/policies/repostructure.md) (specifically, it must be located at `sdk/<servicename>/<packagename>`) and your library's package.json must contain the required scripts as documented [above](#other-npm-scripts). Once the library is added, run `rush update` to install and link dependencies. If your new library has introduced a dependency version conflict, this command will fail. See [above](#resolving-dependency-version-conflicts) to learn how to resolve dependency version conflicts.

Rush assumes that anything printed to `STDERR` is a warning. Your package scripts should avoid writing to `STDERR` unless emitting warnings or errors, since this will cause Rush to flag them as warnings during the execution of your build or script command. If your library uses a tool that can't be configured this way, you can still append `2>&1` to the command which will redirect all output to `STDOUT`. You won't see warnings show up, but Rush will still consider the command to have failed as long as it returns a nonzero exit code.

Expand Down
84 changes: 42 additions & 42 deletions common/tools/eslint-plugin-azure-sdk/README.md

Large diffs are not rendered by default.

3 changes: 2 additions & 1 deletion eng/common/pipelines/templates/steps/verify-links.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
parameters:
Directory: 'not-specified'
IgnoreLinksFile: "$(Build.SourcesDirectory)/eng/ignore-links.txt"

steps:
- task: PowerShell@2
Expand All @@ -9,4 +10,4 @@ steps:
workingDirectory: $(Build.SourcesDirectory)/${{ parameters.Directory }}
filePath: eng/common/scripts/Verify-Links.ps1
arguments: >
-urls $(dir -r -i *.md) -rootUrl "file://$(Build.SourcesDirectory)/${{ parameters.Directory }}"
-urls $(dir -r -i *.md) -rootUrl "file://$(Build.SourcesDirectory)/${{ parameters.Directory }}" -recursive:$false -ignoreLinksFile "${{ parameters.IgnoreLinksFile }}"
9 changes: 9 additions & 0 deletions eng/ignore-links.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
https://github.com/Azure/azure-sdk-for-js/tree/master/sdk/keyvault/keyvault-admin/samples
https://github.com/Azure/azure-sdk-for-js/tree/master/sdk/keyvault/keyvault-admin/samples/javascript
https://github.com/Azure/azure-sdk-for-js/tree/master/sdk/keyvault/keyvault-admin/samples/typescript
https://github.com/Azure/azure-sdk-for-js/tree/master/sdk/keyvault/keyvault-admin/test/
https://docs.microsoft.com/javascript/api/@azure/keyvault-admin
https://docs.microsoft.com/javascript/api/@azure/storage-blob-changefeed
https://github.com/Azure/azure-sdk-for-js/tree/master/sdk/storage/storage-blob-changefeed/samples/javascript
https://github.com/Azure/azure-sdk-for-js/tree/master/sdk/storage/storage-blob-changefeed/samples/typescript
https://github.com/Azure/azure-sdk-for-js/tree/master/sdk/storage/storage-blob-changefeed/test/
4 changes: 4 additions & 0 deletions eng/pipelines/aggregate-reports.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ jobs:
inputs:
versionSpec: 10.x

- template: ../common/pipelines/templates/steps/verify-links.yml
parameters:
Directory: ""

- script: 'npm ci'
workingDirectory: '$(Build.SourcesDirectory)/eng/tools/analyze-deps'
displayName: 'Install tool dependencies'
Expand Down
11 changes: 4 additions & 7 deletions eng/pipelines/templates/jobs/archetype-sdk-client.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,13 +55,6 @@ jobs:
condition: and(succeeded(),ne(variables['SetDevVersion'],'true'))
displayName: "Install dependencies"
- template: /eng/common/pipelines/templates/steps/replace-relative-links.yml
parameters:
TargetFolder: $(Build.SourcesDirectory)/sdk/$(folder)
RootFolder: $(Build.SourcesDirectory)
BuildSHA: $(Build.SourceVersion)
RepoId: "Azure/azure-sdk-for-js"

# Option "-p max" ensures parallelism is set to the number of cores on all platforms, which improves build times.
# The default on Windows is "cores - 1" (microsoft/rushstack#436).
- script: |
Expand Down Expand Up @@ -140,6 +133,10 @@ jobs:
parameters:
SourceDirectory: $(Build.SourcesDirectory)

- template: ../../../common/pipelines/templates/steps/verify-links.yml
parameters:
Directory: sdk/${{ parameters.ServiceDirectory }}

- script: |
npm ci
workingDirectory: $(System.DefaultWorkingDirectory)/eng/tools/analyze-deps
Expand Down
4 changes: 2 additions & 2 deletions sdk/core/core-lro/samples/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ A guide on how to write them follows.

The `update` method defines how to request the remote service for updates on the status of the long running operation.

It optionally receives an object with an `abortSignal` property, from [@azure/abort-controller](../abort-controller)'s `AbortSignalLike`.
It optionally receives an object with an `abortSignal` property, from [@azure/abort-controller](../../abort-controller)'s `AbortSignalLike`.

A more advanced use allows passing in a `fireProgress` function, which, if called, is responsible for triggering the
poller's `onProgress` callbacks.
Expand Down Expand Up @@ -112,7 +112,7 @@ async function update(

The operation's `cancel` method should attempt to cancel the pending operation, if it's allowed by the remote service. Otherwise, it should throw.

It only optionally receives an object with an `abortSignal` property, from [@azure/abort-controller](../abort-controller)'s `AbortSignalLike`.
It only optionally receives an object with an `abortSignal` property, from [@azure/abort-controller](../../abort-controller)'s `AbortSignalLike`.

It returns a promise that should be resolved with an updated version of the poller's operation.

Expand Down
2 changes: 0 additions & 2 deletions sdk/cosmosdb/cosmos/dev.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,4 @@ You can also build via the configured tasks (`build` does a full build, and `com

Build the SDK and make sure the tests run before you try any samples (they depend on the SDK)

- [TodoApp](./samples/TodoApp)

We recommend using [VS code's multi-root workspaces](https://code.visualstudio.com/docs/editor/multi-root-workspaces) for testing the samples, especially if you're using the samples to test the SDK. There is a `launch.json` for the samples thave have been updated and multi-root workspaces will show all `launch.json`s.
10 changes: 5 additions & 5 deletions sdk/eventhub/event-hubs/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,7 @@ For more information, please visit https://aka.ms/azsdk/releases/july2019preview
## 2.1.0 (2019-06-10)

- Added support for WebSockets. WebSockets enable Event Hubs to work over an HTTP proxy and in environments where the standard AMQP port 5671 is blocked.
Refer to the [websockets](https://github.com/Azure/azure-sdk-for-js/blob/master/sdk/eventhub/event-hubs/samples/websockets.ts) sample to see how to use WebSockets.
Refer to the [websockets](https://github.com/Azure/azure-sdk-for-js/blob/@azure/event-hubs_2.1.0/sdk/eventhub/event-hubs/samples/websockets.ts) sample to see how to use WebSockets.
- `@types/async-lock` has been moved to being a dependency from a dev-dependency. This fixes the [bug 3240](https://github.com/Azure/azure-sdk-for-js/issues/3240)

## 2.0.0 (2019-03-26)
Expand Down Expand Up @@ -351,15 +351,15 @@ For more information, please visit https://aka.ms/azsdk/releases/july2019preview
## 0.2.6 (2018-08-07)

- Improved log statements.
- Documented different mechanisms of getting the debug logs in [README](https://github.com/Azure/azure-sdk-for-js/tree/master/eventhub/event-hubs/#debug-logs).
- Documented different mechanisms of getting the debug logs in [README](https://github.com/Azure/azure-sdk-for-js/tree/master/sdk/eventhub/event-hubs//#debug-logs).
- Minimum dependency on `"rhea": "^0.2.18"`.
- Fixed bugs in recovery logic
- Added support to recover from session close for sender and receiver
- Added a new property `isConnecting` that provides information whether a linkEntity is currently in the process of establishing itself.
- Using `is_closed()` method of sender, receiver and session in rhea to determine whether the sdk initiated the close.
- MessagingError is retryable by default.
- Added support to translate node.js [`SystemError`](https://nodejs.org/api/errors.html#errors_class_systemerror) into AmqpError.
- Added a new static method `createFromTokenProvider()` on the EventHubClient where customers can provide their own [TokenProvider](https://github.com/Azure/azure-event-hubs-node/blob/master/client/lib/amqp-common/auth/token.ts#L42).
- Added a new static method `createFromTokenProvider()` on the EventHubClient where customers can provide their own [TokenProvider](https://github.com/Azure/azure-event-hubs-node/blob/v0.2.6-EH-August2018/client/lib/amqp-common/auth/token.ts#L42).

## 0.2.5 (2018-07-17)

Expand Down Expand Up @@ -411,7 +411,7 @@ const client = await EventHubClient.createFromIotHubConnectionString(
- Created an options object in the `client.createFromConnectionString()` and the `EventHubClient` constructor. This is a breaking change. However moving to an options object design reduces the chances of breaking changes in the future.
This options object will:
- have the existing optional `tokenProvider` property
- and a new an optional property named `dataTransformer`. You can provide your own transformer. If not provided then we will use the [DefaultDataTransformer](./client/lib/dataTransformer.ts). This should be applicable for majority of the scenarios and will ensure that messages are interoperable between different Azure services. It fixes issue #60.
- and a new an optional property named `dataTransformer`. You can provide your own transformer. If not provided then we will use the [DefaultDataTransformer](https://github.com/Azure/azure-event-hubs-node/blob/v0.2.0-EH-May2018/client/lib/dataTransformer.ts). This should be applicable for majority of the scenarios and will ensure that messages are interoperable between different Azure services. It fixes issue #60.

## 0.1.2 (2018-04-26)

Expand All @@ -424,7 +424,7 @@ const client = await EventHubClient.createFromIotHubConnectionString(
## 0.1.0 (2018-04-23)

- Previously we were depending on [amqp10](https://npmjs.com/package/amqp10) package for the amqp protocol. Moving forward we will be depending on [rhea](https://npmjs.com/package/rhea).
- The public facing API of this library has major breaking changes from the previous version 0.0.8. Please take a look at the [Readme](./README.md) and the [samples](./samples) directory for detailed samples.
- The public facing API of this library has major breaking changes from the previous version 0.0.8. Please take a look at the [Readme](https://github.com/Azure/azure-event-hubs-node/blob/v0.1.0-April2018/README.md) and the [examples](https://github.com/Azure/azure-event-hubs-node/tree/v0.1.0-April2018/examples) directory for detailed samples.
- Removed the need to say `client.open.then()`. First call to create a sender, receiver or get metadata about the hub or partition will establish the AMQP connection.
- Added support to authenticate via Service Principal credentials, MSITokenCredentials, DeviceTokenCredentials.
- This should make it easy for customers to login once using the above mentioned credentials,
Expand Down
2 changes: 1 addition & 1 deletion sdk/eventhub/event-processor-host/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@
- `onEphError`
- `leaseRenewInterval`
- `leaseDuration`
- Please take a look at the [examples](https://github.com/Azure/azure-sdk-for-js/tree/master/eventhub/event-processor-host/samples) for more details.
- Please take a look at the [examples](https://github.com/Azure/azure-sdk-for-js/tree/master/sdk/eventhub/event-processor-host/samples) for more details.

## 0.1.4 (2018-07-16)

Expand Down
6 changes: 3 additions & 3 deletions sdk/keyvault/keyvault-admin/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,9 @@ setLogLevel("info");

You can find more code samples through the following links:

- [KeyVault Admin Samples (JavaScript)](./samples/javascript)
- [KeyVault Admin Samples (TypeScript)](./samples/typescript)
- [KeyVault Admin Test Cases](./test/)
- [KeyVault Admin Samples (JavaScript)](https://github.com/Azure/azure-sdk-for-js/tree/master/sdk/keyvault/keyvault-admin/samples/javascript)
- [KeyVault Admin Samples (TypeScript)](https://github.com/Azure/azure-sdk-for-js/tree/master/sdk/keyvault/keyvault-admin/samples/typescript)
- [KeyVault Admin Test Cases](https://github.com/Azure/azure-sdk-for-js/tree/master/sdk/keyvault/keyvault-admin/test/)

## Contributing

Expand Down
2 changes: 1 addition & 1 deletion sdk/keyvault/keyvault-certificates/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ Use the [Azure Cloud Shell](https://shell.azure.com/bash) snippet below to creat

## Authenticating with Azure Active Directory

The Key Vault service relies on Azure Active Directory to authenticate requests to its APIs. The [`@azure/identity`](https://www.npmjs.com/package/@azure/identity) package provides a variety of credential types that your application can use to do this. The [README for `@azure/identity`](/sdk/identity/identity/README.md) provides more details and samples to get you started.
The Key Vault service relies on Azure Active Directory to authenticate requests to its APIs. The [`@azure/identity`](https://www.npmjs.com/package/@azure/identity) package provides a variety of credential types that your application can use to do this. The [README for `@azure/identity`](https://github.com/Azure/azure-sdk-for-js/blob/master/sdk/identity/identity/README.md) provides more details and samples to get you started.

Here's a quick example. First, import `DefaultAzureCredential` and `CertificateClient`:

Expand Down
20 changes: 10 additions & 10 deletions sdk/keyvault/keyvault-certificates/samples/javascript/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,17 +66,17 @@ npx cross-env KEYVAULT_NAME="<key vault name>" AZURE_TENANT_ID="<AAD tenant id>"

Take a look at our [API Documentation][apiref] for more information about the APIs that are available in the clients.

[backupandrestore]: ./backupAndRestore.js
[contacts]: ./contacts.js
[deleteandrecover]: ./deleteAndRecover.js
[helloworld]: ./helloWorld.js
[issuers]: ./issuers.js
[listcertificates]: ./listCertificates.js
[mergecertificate]: ./mergeCertificate.js
[operations]: ./operations.js
[purgeAllCertificates]: ./purgeAllCertificates.js
[backupandrestore]: https://github.com/Azure/azure-sdk-for-js/blob/master/sdk/keyvault/keyvault-certificates/samples/javascript/backupAndRestore.js
[contacts]: https://github.com/Azure/azure-sdk-for-js/blob/master/sdk/keyvault/keyvault-certificates/samples/javascript/contacts.js
[deleteandrecover]: https://github.com/Azure/azure-sdk-for-js/blob/master/sdk/keyvault/keyvault-certificates/samples/javascript/deleteAndRecover.js
[helloworld]: https://github.com/Azure/azure-sdk-for-js/blob/master/sdk/keyvault/keyvault-certificates/samples/javascript/helloWorld.js
[issuers]: https://github.com/Azure/azure-sdk-for-js/blob/master/sdk/keyvault/keyvault-certificates/samples/javascript/issuers.js
[listcertificates]: https://github.com/Azure/azure-sdk-for-js/blob/master/sdk/keyvault/keyvault-certificates/samples/javascript/listCertificates.js
[mergecertificate]: https://github.com/Azure/azure-sdk-for-js/blob/master/sdk/keyvault/keyvault-certificates/samples/javascript/mergeCertificate.js
[operations]: https://github.com/Azure/azure-sdk-for-js/blob/master/sdk/keyvault/keyvault-certificates/samples/javascript/operations.js
[purgeAllCertificates]: https://github.com/Azure/azure-sdk-for-js/blob/master/sdk/keyvault/keyvault-certificates/samples/javascript/purgeAllCertificates.js
[apiref]: https://docs.microsoft.com/javascript/api/@azure/keyvault-certificates
[azkeyvault]: https://docs.microsoft.com/azure/key-vault/quick-create-portal
[kvsoftdelete]: https://docs.microsoft.com/azure/key-vault/key-vault-soft-delete-cli
[freesub]: https://azure.microsoft.com/free/
[package]: ../README.md
[package]: https://github.com/Azure/azure-sdk-for-js/blob/master/sdk/keyvault/keyvault-certificates/README.md
20 changes: 10 additions & 10 deletions sdk/keyvault/keyvault-certificates/samples/typescript/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,18 +78,18 @@ npx cross-env KEYVAULT_NAME="<key vault name>" AZURE_TENANT_ID="<AAD tenant id>"

Take a look at our [API Documentation][apiref] for more information about the APIs that are available in the clients.

[backupandrestore]: ./src/backupAndRestore.ts
[contacts]: ./src/contacts.ts
[deleteandrecover]: ./src/deleteAndRecover.ts
[helloworld]: ./src/helloWorld.ts
[issuers]: ./src/issuers.ts
[listcertificates]: ./src/listCertificates.ts
[mergecertificate]: ./src/mergeCertificate.ts
[operations]: ./src/operations.ts
[purgeAllCertificates]: ./src/purgeAllCertificates.ts
[backupandrestore]: https://github.com/Azure/azure-sdk-for-js/blob/master/sdk/keyvault/keyvault-certificates/samples/typescript/src/backupAndRestore.ts
[contacts]: https://github.com/Azure/azure-sdk-for-js/blob/master/sdk/keyvault/keyvault-certificates/samples/typescript/src/contacts.ts
[deleteandrecover]: https://github.com/Azure/azure-sdk-for-js/blob/master/sdk/keyvault/keyvault-certificates/samples/typescript/src/deleteAndRecover.ts
[helloworld]: https://github.com/Azure/azure-sdk-for-js/blob/master/sdk/keyvault/keyvault-certificates/samples/typescript/src/helloWorld.ts
[issuers]: https://github.com/Azure/azure-sdk-for-js/blob/master/sdk/keyvault/keyvault-certificates/samples/typescript/src/issuers.ts
[listcertificates]: https://github.com/Azure/azure-sdk-for-js/blob/master/sdk/keyvault/keyvault-certificates/samples/typescript/src/listCertificates.ts
[mergecertificate]: https://github.com/Azure/azure-sdk-for-js/blob/master/sdk/keyvault/keyvault-certificates/samples/typescript/src/mergeCertificate.ts
[operations]: https://github.com/Azure/azure-sdk-for-js/blob/master/sdk/keyvault/keyvault-certificates/samples/typescript/src/operations.ts
[purgeAllCertificates]: https://github.com/Azure/azure-sdk-for-js/blob/master/sdk/keyvault/keyvault-certificates/samples/typescript/src/purgeAllCertificates.ts
[apiref]: https://docs.microsoft.com/javascript/api/@azure/keyvault-certificates
[azkeyvault]: https://docs.microsoft.com/azure/key-vault/quick-create-portal
[kvsoftdelete]: https://docs.microsoft.com/azure/key-vault/key-vault-soft-delete-cli
[freesub]: https://azure.microsoft.com/free/
[package]: ../README.md
[package]: https://github.com/Azure/azure-sdk-for-js/blob/master/sdk/keyvault/keyvault-certificates/README.md
[typescript]: https://www.typescriptlang.org/docs/home.html
2 changes: 1 addition & 1 deletion sdk/keyvault/keyvault-keys/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ Use the [Azure Cloud Shell](https://shell.azure.com/bash) snippet below to creat

## Authenticating with Azure Active Directory

The Key Vault service relies on Azure Active Directory to authenticate requests to its APIs. The [`@azure/identity`](https://www.npmjs.com/package/@azure/identity) package provides a variety of credential types that your application can use to do this. The [README for `@azure/identity`](/sdk/identity/identity/README.md) provides more details and samples to get you started.
The Key Vault service relies on Azure Active Directory to authenticate requests to its APIs. The [`@azure/identity`](https://www.npmjs.com/package/@azure/identity) package provides a variety of credential types that your application can use to do this. The [README for `@azure/identity`](https://github.com/Azure/azure-sdk-for-js/tree/master/sdk/identity/identity/README.md) provides more details and samples to get you started.

Here's a quick example. First, import `DefaultAzureCredential` and `KeyClient`:

Expand Down
Loading

0 comments on commit 1d25f3e

Please sign in to comment.