From dcd072549af1adbeebc724b47176a0a54719588c Mon Sep 17 00:00:00 2001 From: Nicolas Kruchten Date: Thu, 27 Oct 2022 14:58:25 -0400 Subject: [PATCH 1/3] make a single artifact tarball --- .circleci/config.yml | 26 ++++++++++---------------- release.md | 16 +++++++--------- 2 files changed, 17 insertions(+), 25 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 422a72690cc..90bfce7c926 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -266,6 +266,7 @@ jobs: conda create -n env --yes python=3.9 conda-build conda-verify conda install -n env -c conda-forge jupyterlab nodejs=12 conda init bash + mkdir output - run: name: initial NPM Build @@ -284,12 +285,7 @@ jobs: conda activate env cd packages/python/plotly python setup.py sdist bdist_wheel - mkdir pypi_dist - tar czf pypi_dist/all.tgz dist - - - store_artifacts: - path: packages/python/plotly/pypi_dist - destination: pypi_dist + mv dist ../../../output - run: name: Conda Build @@ -298,12 +294,7 @@ jobs: conda activate env cd packages/python/plotly conda build recipe/ - mkdir conda_dist - mv /opt/conda/envs/env/conda-bld/noarch/plotly*.tar.bz2 conda_dist - - - store_artifacts: - path: packages/python/plotly/conda_dist - destination: conda_dist + mv /opt/conda/envs/env/conda-bld/noarch/plotly*.tar.bz2 ../../../output - run: name: NPM Pack @@ -312,12 +303,15 @@ jobs: conda activate env cd packages/javascript/jupyterlab-plotly npm pack - mkdir npm_dist - mv jupyterlab-plotly*.tgz npm_dist + mv jupyterlab-plotly*.tgz ../../../output + + - run: + name: Zip output + command: | + tar czf output.tgz output - store_artifacts: - path: packages/javascript/jupyterlab-plotly/npm_dist - destination: npm_dist + path: output.tgz build-doc: resource_class: xlarge diff --git a/release.md b/release.md index f7e32f663c0..0a7ecdbb405 100644 --- a/release.md +++ b/release.md @@ -59,11 +59,9 @@ Manually update the versions to `X.Y.Z` in the files specified below. ### Download and QA CI Artifacts -The `full_build` job in the `release_build` workflow in CircleCI produces three sets of artifacts. Download all three: +The `full_build` job in the `release_build` workflow in CircleCI produces a tarball of artifacts `output.tgz` which you should download and decompress. -1. `pypi_dist/all.tgz` -2. `conda_dist/plotly-X.Y.Z.tar.bz2` -3. `npm_dist/jupyterlab-plotly-X.Y.Z.tgz` +The filenames contained within will contain version numbers. **Note: if any of the version numbers are not simply `X.Y.Z` but include some kind of git hash, then this is a dirty build and you'll need to clean up whatever is dirtying the tree and follow the instructions above to trigger the build again.** (That said, you can do QA on dirty builds, you just can't publish them.) @@ -72,13 +70,13 @@ To locally install the PyPI dist, make sure you have an environment with Jupyter - `tar xzf all.tgz` - `pip uninstall plotly` - `conda uninstall plotly` (just in case!) -- `pip install dist/plotly-X.Y.X-py2.py3-none-any.whl` +- `pip install path/to/output/dist/plotly-X.Y.X-py2.py3-none-any.whl` To locally install the Conda dist (generally do this in a different, clean environment from the one above!): - `conda uninstall plotly` - `pip uninstall plotly` (just in case!) -- `conda install conda_dist/plotly-X.Y.Z.tar.bz2` +- `conda install path/to/output/plotly-X.Y.Z.tar.bz2` It's more complicated to locally install the NPM bundle, as you'll need to have a JupyterLab 2 environment installed... Undocumented for now :see_no_evil:. @@ -94,21 +92,21 @@ you can publish the artifacts. **You will need special credentials from Plotly l Publishing to PyPI: ```bash -(plotly_dev) $ cd pypi_dist/dist +(plotly_dev) $ cd path/to/output/dist (plotly_dev) $ twine upload plotly-X.Y.Z* ``` Publishing to NPM: ```bash -(plotly_dev) $ cd npm_dist +(plotly_dev) $ cd path/to/output (plotly_dev) $ npm publish jupyterlab-plotly-X.Y.Z.tgz ``` Publishing to `plotly` conda channel (make sure you have run `conda install anaconda-client` to get the `anaconda` command): ``` -(plotly_dev) $ cd conda_dist +(plotly_dev) $ cd path/to/output (plotly_dev) $ anaconda upload plotly-X.Y.Z.tar.bz2 ``` From 977c88d72661393234cef46df7192421d6aca0ed Mon Sep 17 00:00:00 2001 From: Nicolas Kruchten Date: Thu, 27 Oct 2022 15:46:21 -0400 Subject: [PATCH 2/3] make a single artifact tarball --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 90bfce7c926..0587087034c 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -285,7 +285,7 @@ jobs: conda activate env cd packages/python/plotly python setup.py sdist bdist_wheel - mv dist ../../../output + cp -R dist ../../../output/dist - run: name: Conda Build From cebe516acfb02883b153da483955c2179f37fc03 Mon Sep 17 00:00:00 2001 From: Nicolas Kruchten Date: Thu, 27 Oct 2022 16:13:56 -0400 Subject: [PATCH 3/3] instructions --- release.md | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/release.md b/release.md index 0a7ecdbb405..574ce7f7285 100644 --- a/release.md +++ b/release.md @@ -59,9 +59,7 @@ Manually update the versions to `X.Y.Z` in the files specified below. ### Download and QA CI Artifacts -The `full_build` job in the `release_build` workflow in CircleCI produces a tarball of artifacts `output.tgz` which you should download and decompress. - -The filenames contained within will contain version numbers. +The `full_build` job in the `release_build` workflow in CircleCI produces a tarball of artifacts `output.tgz` which you should download and decompress, which will give you a directory called `output`. The filenames contained within will contain version numbers. **Note: if any of the version numbers are not simply `X.Y.Z` but include some kind of git hash, then this is a dirty build and you'll need to clean up whatever is dirtying the tree and follow the instructions above to trigger the build again.** (That said, you can do QA on dirty builds, you just can't publish them.)