Skip to main content
Sign in
Snippets Groups Projects
Commit a6cd4d11 authored by benoit-cty's avatar benoit-cty
Browse files

Update doc

parent 807f0840
No related branches found
No related tags found
1 merge request!33Build conda package in CI
Pipeline #2919 passed
...@@ -4,11 +4,11 @@ There is two way of publishing to conda: ...@@ -4,11 +4,11 @@ There is two way of publishing to conda:
- A fully automatic in CI that publish to an "openfisca" channel. See below for more information. - A fully automatic in CI that publish to an "openfisca" channel. See below for more information.
- A more complex for Conda-Forge. - A more complex for Conda-Forge.
We use both for openfisca-core but only _openfisca channel_ for this project. We use both for openfisca-core but only _leximpact channel_ for this project.
## Automatic upload ## Automatic upload
The CI could automaticaly upload the PyPi and Anaconda package, see the `.github/workflow.yml`, step `publish-to-conda` in _OpenFisca-Core_. The CI could automaticaly upload the PyPi and Anaconda package, see the `.gitlab-ci.yml`.
## Manual actions made to make it works the first time ## Manual actions made to make it works the first time
...@@ -19,16 +19,11 @@ The CI could automaticaly upload the PyPi and Anaconda package, see the `.github ...@@ -19,16 +19,11 @@ The CI could automaticaly upload the PyPi and Anaconda package, see the `.github
## Manual actions before CI exist ## Manual actions before CI exist
To create the package you can do the following in the project root folder: To create the package you can do the following in the project root folder:
```
- Edit `.conda/meta.yaml` and update it if needed: docker run -i -t -v $PWD:/src continuumio/miniconda3 /bin/bash
- Version number cd /src
- Hash SHA256 python3 gitlab-ci/src/get_pypi_info.py -p openfisca-france-reforms
- Package URL on PyPi conda install -y conda-build anaconda-client
conda config --set anaconda_upload yes
- Build & Upload package: conda build -c conda-forge --token $ANACONDA_TOKEN --user Leximpact .conda
- `conda install -c anaconda conda-build anaconda-client` ```
- `conda config --add channels conda-forge`
- `conda config --set channel_priority strict`
- `conda build .conda`
- `anaconda login`
- `anaconda upload <PATH>openfisca_france_reforms-<VERSION>-py_0.tar.bz2`
\ No newline at end of file
...@@ -61,12 +61,9 @@ deploy_conda: ...@@ -61,12 +61,9 @@ deploy_conda:
needs: ["deploy_pypi"] needs: ["deploy_pypi"]
image: continuumio/miniconda3 image: continuumio/miniconda3
script: script:
- python3 -m pip install requests re argparse
- python3 gitlab-ci/src/get_pypi_info.py -p openfisca-france-reforms - python3 gitlab-ci/src/get_pypi_info.py -p openfisca-france-reforms
- conda install conda-build anaconda-client - conda install -y conda-build anaconda-client
- conda info
- conda config --set anaconda_upload yes - conda config --set anaconda_upload yes
- conda build -c conda-forge --token $ANACONDA_TOKEN --user Leximpact .conda - conda build -c conda-forge --token $ANACONDA_TOKEN --user Leximpact .conda
only: only:
- master - master
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment