Skip to content
Snippets Groups Projects
Select Git revision
  • 4f3c64e24d22d1d6473f12d780af22c6aedae126
  • master default protected
  • reforme-allegement-general
  • abattement-retraite
  • temp
  • cdhr_reform
  • revert-inflateur-contrefactuel-impot
  • lint
  • test-cas-type
  • indemnite-inflation
  • 0_5_8
  • 0_5_7
  • 0_5_6
  • 0_5_5
  • 0_5_4
  • 0_5_3
  • 0_5_2
  • 0_5_1
  • 1.0.304
  • 1.0.303
  • 1.0.302
  • 1.0.301
  • 1.0.300
  • 1.0.299
  • 1.0.298
  • 1.0.297
  • 1.0.296
  • 1.0.295
  • 1.0.294
  • 1.0.293
  • 1.0.292
  • 1.0.291
  • 1.0.290
  • 1.0.289
  • 1.0.288
  • 1.0.287
  • 1.0.286
  • 1.0.285
38 results

.gitlab-ci.yml

Blame
  • .gitlab-ci.yml 2.12 KiB
    stages:
      - build
      - deploy
      - anaconda
    
    ci:
      stage: build
      image: node:18-bookworm
      cache:
        paths:
          - node_modules
      before_script:
        # Without apt update, apt install fails.
        - apt update --yes
    
        # Install ssh-agent if not already installed, it is required by Docker.
        - "which ssh-agent || apt install -y openssh-client"
        # Run ssh-agent (inside the build environment)
        - eval $(ssh-agent -s)
    
        - apt install --yes python-is-python3 python3-venv
        - curl -sSL https://install.python-poetry.org/ | python -
        # Add Poetry to path:
        - export PATH="/root/.local/bin:$PATH"
        # Ensure that Poetry creates and uses virtualenvs in .venv directory of each project.
        - poetry config virtualenvs.in-project true
    
        - npm install
        # Needed when Node version changes:
        - npm rebuild
    
        # Compile gitlab-ci TypeScript script.
        - npx tsc --declaration --project gitlab-ci/tsconfig.json
      script:
        # Execute gitlab-ci JavaScript script.
        - node --experimental-specifier-resolution=node gitlab-ci/build/gitlab-ci.js
    
    tax_benefit_ci:
      stage: build
      image: curlimages/curl:latest
      variables:
        OPENFISCA_PROJECT_NAME: openfisca-france
        OPENFISCA_PYTHON_PACKAGE: openfisca_france_with_indirect_taxation
      script:
        - |
          env | curl --data-binary @- --fail-with-body --header "Content-Type: text/plain; charset=utf-8" --max-time 300 --silent https://control-center.tax-benefit.org/api/gitlab/ci
    
    # deploy_pypi:
    #   stage: deploy
    #   needs: ["ci", "tax_benefit_ci"]
    #   image: python:3.8-slim
    #   script:
    #     - python3 -m pip install --upgrade build
    #     - python3 -m pip install --upgrade twine
    #     - python3 -m build
    #     - twine upload dist/* --username __token__ --password $PYPI_TOKEN
    #   only:
    #     - master
    
    # deploy_conda:
    #   stage: anaconda
    #   needs: ["deploy_pypi"]
    #   image: continuumio/miniconda3
    #   script:
    #     - python3 gitlab-ci/src/get_pypi_info.py -p openfisca-france-reforms
    #     - conda install -y conda-build anaconda-client
    #     - conda config --set anaconda_upload yes
    #     - conda build -c conda-forge --token $ANACONDA_TOKEN --user Leximpact .conda
    #   only:
    #     - master