-
Notifications
You must be signed in to change notification settings - Fork 462
Commit
To comply with security policies, this change updates the nuget (C#) and cargo (Rust) projects in this repo to resolve dependencies through a public Azure feed (which upstreams to nuget.org and crates.io), instead of directly from nuget.org and crates.io. To support our model of adding/updating packages and to be consistent with the lock files we've enabled for our Rust projects, this change also enables lock files (named packages.lock.json) for our C# projects. I also found a few of our Rust projects which were not using a lock file, so I added Cargo.lock files to those projects. All packages have been saved to the feed at the versions given in the various lock files. Whether the pipelines build our code or you build it locally, the Azure feed will be used to download dependency packages. Authentication is not required. To add/upgrade a package in the feed, you must authenticate with write credentials. For nuget, this is seemless once you install the [credential provider](https://github.com/microsoft/artifacts-credprovider#azure-artifacts-credential-provider). For cargo, the process is not so simple. Ideally, a `cargo login` before `cargo build` would allow you to seamlessly update the feed, but cargo does not currently support optional authentication with fallback to anonymous. In other words, because we allow anonymous access, cargo will not authenticate. Instead, you can use the feed's REST API directly. I updated edgelet/doc/devguide.md with a new section (edgelet/doc/devguide.md#update-a-dependency) that explains how to add/upgrade dependencies in the feed for Rust projects. To test, I ran the CI Build pipeline (as well as the E2E-Checkin pipeline, plus all the PR check pipelines) and confirmed they all passed. ## Azure IoT Edge PR checklist:
- Loading branch information
There are no files selected for viewing
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
[registries] | ||
iotedge_PublicPackages = { index = "sparse+https://pkgs.dev.azure.com/iotedge/iotedge/_packaging/iotedge_PublicPackages/Cargo/index/" } | ||
|
||
[registry] | ||
global-credential-providers = ["cargo:token", "cargo:libsecret"] | ||
|
||
[source.crates-io] | ||
replace-with = "iotedge_PublicPackages" |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
[registries] | ||
iotedge_PublicPackages = { index = "sparse+https://pkgs.dev.azure.com/iotedge/iotedge/_packaging/iotedge_PublicPackages/Cargo/index/" } | ||
|
||
[registry] | ||
global-credential-providers = ["cargo:token", "cargo:libsecret"] | ||
|
||
[source.crates-io] | ||
replace-with = "iotedge_PublicPackages" |
Large diffs are not rendered by default.