Skip to content

Commit

Permalink
Improve docs for Azure Pipelines scaler (kedacore#604)
Browse files Browse the repository at this point in the history
Co-authored-by: Tom Kerkhove <[email protected]>
  • Loading branch information
Jorge Turrado Ferrero and tomkerkhove authored Dec 2, 2021
1 parent 7068a28 commit fb69ad2
Show file tree
Hide file tree
Showing 4 changed files with 52 additions and 8 deletions.
15 changes: 13 additions & 2 deletions content/docs/2.3/scalers/azure-pipelines.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ This specification describes the `azure-pipelines` trigger for Azure Pipelines.
triggers:
- type: azure-pipelines
metadata:
# Required: poolID - Can be retrieved by the REST API call https://dev.azure.com/{organizationName}/_apis/distributedtask/pools?poolname={agentPoolName}
poolID: "1"
# Required - Learn more in 'How to determine your pool ID'
poolID: "{agentPoolId}"
# Optional: Azure DevOps organization URL, can use TriggerAuthentication as well
organizationURLFromEnv: "AZP_URL"
# Optional: Azure DevOps Personal Access Token, can use TriggerAuthentication as well
Expand Down Expand Up @@ -44,6 +44,17 @@ As an alternative to using environment variables, you can authenticate with Azur
- `organizationURL` - The URL of the Azure DevOps organization.
- `personalAccessToken` - The Personal Access Token (PAT) for Azure DevOps.

### How to determine your pool ID

There are several ways to get the `poolID`. The easiest could be using `az cli` to get it using the command `az pipelines pool list --pool-name {agentPoolName} --organization {organizationURL} --query [0].id`.

It is also possible to get the pool ID using the UI by browsing to the agent pool from the organization (Organization settings -> Agent pools -> `{agentPoolName}`) and getting it from the URL.
The URL should be similar to `https://dev.azure.com/{organization}/_settings/agentpools?poolId={poolID}&view=jobs`

> Careful - You should determine this on an organization-level, not project-level. Otherwise, you might get an incorrect id.

Finally, it is also possible get the pool ID from the response of a HTTP request by calling the `https://dev.azure.com/{organizationName}/_apis/distributedtask/pools?poolname={agentPoolName}` endpoint in the key `value[0].id`.

### Example

```yaml
Expand Down
15 changes: 13 additions & 2 deletions content/docs/2.4/scalers/azure-pipelines.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ This specification describes the `azure-pipelines` trigger for Azure Pipelines.
triggers:
- type: azure-pipelines
metadata:
# Required: poolID - Can be retrieved by the REST API call https://dev.azure.com/{organizationName}/_apis/distributedtask/pools?poolname={agentPoolName}
poolID: "1"
# Required - Learn more in 'How to determine your pool ID'
poolID: "{agentPoolId}"
# Optional: Azure DevOps organization URL, can use TriggerAuthentication as well
organizationURLFromEnv: "AZP_URL"
# Optional: Azure DevOps Personal Access Token, can use TriggerAuthentication as well
Expand Down Expand Up @@ -44,6 +44,17 @@ As an alternative to using environment variables, you can authenticate with Azur
- `organizationURL` - The URL of the Azure DevOps organization.
- `personalAccessToken` - The Personal Access Token (PAT) for Azure DevOps.

### How to determine your pool ID

There are several ways to get the `poolID`. The easiest could be using `az cli` to get it using the command `az pipelines pool list --pool-name {agentPoolName} --organization {organizationURL} --query [0].id`.

It is also possible to get the pool ID using the UI by browsing to the agent pool from the organization (Organization settings -> Agent pools -> `{agentPoolName}`) and getting it from the URL.
The URL should be similar to `https://dev.azure.com/{organization}/_settings/agentpools?poolId={poolID}&view=jobs`

> Careful - You should determine this on an organization-level, not project-level. Otherwise, you might get an incorrect id.

Finally, it is also possible get the pool ID from the response of a HTTP request by calling the `https://dev.azure.com/{organizationName}/_apis/distributedtask/pools?poolname={agentPoolName}` endpoint in the key `value[0].id`.

### Example

```yaml
Expand Down
15 changes: 13 additions & 2 deletions content/docs/2.5/scalers/azure-pipelines.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ This specification describes the `azure-pipelines` trigger for Azure Pipelines.
triggers:
- type: azure-pipelines
metadata:
# Required: poolID - Can be retrieved by the REST API call https://dev.azure.com/{organizationName}/_apis/distributedtask/pools?poolname={agentPoolName}
poolID: "1"
# Required - Learn more in 'How to determine your pool ID'
poolID: "{agentPoolId}"
# Optional: Azure DevOps organization URL, can use TriggerAuthentication as well
organizationURLFromEnv: "AZP_URL"
# Optional: Azure DevOps Personal Access Token, can use TriggerAuthentication as well
Expand Down Expand Up @@ -44,6 +44,17 @@ As an alternative to using environment variables, you can authenticate with Azur
- `organizationURL` - The URL of the Azure DevOps organization.
- `personalAccessToken` - The Personal Access Token (PAT) for Azure DevOps.

### How to determine your pool ID

There are several ways to get the `poolID`. The easiest could be using `az cli` to get it using the command `az pipelines pool list --pool-name {agentPoolName} --organization {organizationURL} --query [0].id`.

It is also possible to get the pool ID using the UI by browsing to the agent pool from the organization (Organization settings -> Agent pools -> `{agentPoolName}`) and getting it from the URL.
The URL should be similar to `https://dev.azure.com/{organization}/_settings/agentpools?poolId={poolID}&view=jobs`

> Careful - You should determine this on an organization-level, not project-level. Otherwise, you might get an incorrect id.

Finally, it is also possible get the pool ID from the response of a HTTP request by calling the `https://dev.azure.com/{organizationName}/_apis/distributedtask/pools?poolname={agentPoolName}` endpoint in the key `value[0].id`.

### Example

```yaml
Expand Down
15 changes: 13 additions & 2 deletions content/docs/2.6/scalers/azure-pipelines.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ This specification describes the `azure-pipelines` trigger for Azure Pipelines.
triggers:
- type: azure-pipelines
metadata:
# Required: poolID - Can be retrieved by the REST API call https://dev.azure.com/{organizationName}/_apis/distributedtask/pools?poolname={agentPoolName}
poolID: "1"
# Required - Learn more in 'How to determine your pool ID'
poolID: "{agentPoolId}"
# Optional: Azure DevOps organization URL, can use TriggerAuthentication as well
organizationURLFromEnv: "AZP_URL"
# Optional: Azure DevOps Personal Access Token, can use TriggerAuthentication as well
Expand Down Expand Up @@ -44,6 +44,17 @@ As an alternative to using environment variables, you can authenticate with Azur
- `organizationURL` - The URL of the Azure DevOps organization.
- `personalAccessToken` - The Personal Access Token (PAT) for Azure DevOps.

### How to determine your pool ID

There are several ways to get the `poolID`. The easiest could be using `az cli` to get it using the command `az pipelines pool list --pool-name {agentPoolName} --organization {organizationURL} --query [0].id`.

It is also possible to get the pool ID using the UI by browsing to the agent pool from the organization (Organization settings -> Agent pools -> `{agentPoolName}`) and getting it from the URL.
The URL should be similar to `https://dev.azure.com/{organization}/_settings/agentpools?poolId={poolID}&view=jobs`

> Careful - You should determine this on an organization-level, not project-level. Otherwise, you might get an incorrect id.

Finally, it is also possible get the pool ID from the response of a HTTP request by calling the `https://dev.azure.com/{organizationName}/_apis/distributedtask/pools?poolname={agentPoolName}` endpoint in the key `value[0].id`.

### Example

```yaml
Expand Down

0 comments on commit fb69ad2

Please sign in to comment.