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
Add environment.yml to unify conda versioning (Azure#18141)
* add an environment.yml. consume in both build_conda_artifacts as well as in the meta.yml package definitions.
* enhance conda_build_artifacts.py to extend the `summary` attribute via setting an environment variable
* update to get_tagged_code to use mkdir -p instead of testing any paths.
Copy file name to clipboardExpand all lines: doc/dev/conda-builds.md
+17Lines changed: 17 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -16,6 +16,21 @@ A Conda Artifact defines:
16
16
17
17
## How to Build an Azure SDK Conda Package Locally
18
18
19
+
### Set up your conda environment
20
+
21
+
You will notice that all the azure-sdk conda distributions have the **same** version number and requirement set. This is due to the fact that the azure-sdk team pushes our conda packages out in waves. To support this, all versions are set via a common environment variable `AZURESDK_CONDA_VERSION`.
22
+
23
+
We keep this environment variable set properly across all our builds by using a common `conda_env.yml` when creating our build environment. This environment definition ensures that:
24
+
25
+
1. Our channel `https://azuresdkconda.blob.core.windows.net/channel1/` is added to the set to download packages
26
+
2. The environment variable `AZURESDK_CONDA_VERSION` will be set exactly once.
27
+
28
+
29
+
Reference the `conda_env.yml` in your local build by pass `-f <path to conda_env.yml>` when you create your conda environment.
Given how Conda packages are comprised of multiple source distributions _combined_, the buildable source does not exist directly within the azure-sdk-for-python repo. Currently, there is _some_ manual work that needs to be done.
description="Build a Conda Package, given a properly formatted build directory, and input configuration. This script assumes that the build directory has been set up w/ the necessary sdists in each location."
@@ -276,11 +316,19 @@ def create_combined_sdist(
276
316
)
277
317
278
318
parser.add_argument(
279
-
"-o",
280
-
"--output_var",
281
-
dest="output_var",
282
-
help="The name of the environment variable that will be set in azure devops. The contents will be the final location of the output artifact. Local users will need to grab this value and set their env manually.",
283
-
required=False,
319
+
"-e",
320
+
"--environment_config",
321
+
dest="environment_config",
322
+
help="The location of the yml config file used to create the conda environments. This file has necessary common configuration information within.",
323
+
required=True,
324
+
)
325
+
326
+
parser.add_argument(
327
+
"-c",
328
+
"--ci_yml",
329
+
dest="ci_yml",
330
+
help="The location of the ci.yml that is used to define our conda artifacts. Used when to easily grab summary information.",
0 commit comments