Skip to main content
Homepage
Explore
Search or go to…
/
Register
Sign in
Explore
Primary navigation
Project
O
OpenFisca-France-Reforms
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Collapse sidebar
Snippets
Groups
Projects
Show more breadcrumbs
leximpact
Simulateur socio-fiscal
Adaptations OpenFisca
OpenFisca-France-Reforms
Commits
a6cd4d11
Commit
a6cd4d11
authored
Mar 2, 2022
by
benoit-cty
Browse files
Options
Downloads
Patches
Plain Diff
Update doc
parent
807f0840
No related branches found
No related tags found
1 merge request
!33
Build conda package in CI
Pipeline
#2919
passed
Mar 2, 2022
Status:
Stage: build
Changes
2
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
.conda/README.md
+10
-15
10 additions, 15 deletions
.conda/README.md
.gitlab-ci.yml
+2
-5
2 additions, 5 deletions
.gitlab-ci.yml
with
12 additions
and
20 deletions
.conda/README.md
+
10
−
15
View file @
a6cd4d11
...
@@ -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
`.git
hub/workflow.yml`
, step
`publish-to-conda`
in _OpenFisca-Core_
.
The CI could automaticaly upload the PyPi and Anaconda package, see the
`.git
lab-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
This diff is collapsed.
Click to expand it.
.gitlab-ci.yml
+
2
−
5
View file @
a6cd4d11
...
@@ -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
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment