You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/artifacts-helper/NOTES.md
+7-11Lines changed: 7 additions & 11 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,16 +2,6 @@ This installs [Azure Artifacts Credential Provider](https://github.com/microsoft
2
2
and optionally configures shims which shadow `dotnet`, `nuget`, `npm`, `yarn`, `rush`, and `pnpm`.
3
3
These dynamically sets an authentication token for pulling artifacts from a feed before running the command.
4
4
5
-
## GitHub Actions / Codespaces Prebuild Support
6
-
7
-
**Version 3.0.1+**: The shim scripts now detect when running in a GitHub Actions environment (during Codespaces prebuild) by checking for the `ACTIONS_ID_TOKEN_REQUEST_URL` environment variable. When this variable is set, the shims bypass all Azure DevOps authentication setup and execute the real commands directly. This prevents:
8
-
9
-
- Unnecessary 3-minute wait for authentication helper
10
-
- Installation of credential providers that aren't needed
This ensures package restore operations work seamlessly during Codespaces prebuild without interference from the Azure Artifacts authentication mechanisms.
14
-
15
5
For `npm`, `yarn`, `rush`, and `pnpm` this requires that your `~/.npmrc` file is configured to use the ${ARTIFACTS_ACCESSTOKEN}
16
6
environment variable for the `authToken`. A helper script has been added that you can use to write your `~/.npmrc`
17
7
file during your setup process, though there are many ways you could accomplish this. To use the script, run it like
When the feed URL is an Azure Artifacts feed pip will use the keyring helper to provide the credentials needed
49
39
to download the package.
50
40
41
+
## GitHub Actions / Codespaces Prebuild Support
42
+
43
+
**Version 3.0.1+**: The shim scripts now detect when running in a GitHub Actions environment (during Codespaces prebuild) by checking for the `ACTIONS_ID_TOKEN_REQUEST_URL` environment variable. When this variable is set, the shims bypass all Azure DevOps authentication setup and execute the real commands directly.
44
+
45
+
This ensures any custom scripting in place during Codespaces build process will work as expected. This feature can only be used at Codespaces runtime as it requires user interaction.
46
+
51
47
## Authentication Helper Wait Behavior
52
48
53
49
The shim scripts (e.g., `dotnet`, `npm`, `nuget`) now include a wait mechanism for the Azure DevOps authentication helper. When invoked, these scripts will:
@@ -99,4 +95,4 @@ if the `targetFiles` option is provided, so you may want to include them in the
0 commit comments