Skip to content
Snippets Groups Projects
Select Git revision
2 results Searching

.gitlab-ci.yml

Blame
  • .gitlab-ci.yml 1.25 KiB
    stages:
      - training_resources
      - clean_training_resources
    
    deploy_trainee_repository:
      stage: training_resources
      image: python:3
      tags:
        - compute
        - small
      needs: []
      before_script:
        - git config --global user.email "bot@takima.fr"
        - git config --global user.name "TakiBot"
      script:
        - pip install -U python-dotenv
        - pip install GitPython
        - pip install -r ./resources/docs/requirements
        - cd scripts
        - python deploy_trainee_repo.py
      variables:
        GIT_TRAINEE_REPOSITORY: "gitlab.takima.io/school/formation-dev-web/es6-epf-trainees.git"
      when: manual
      cache:
        paths:
          - .cache/pip
          - venv/
      only:
        - main
    
    clean_trainee_repository:
      stage: clean_training_resources
      image: python:3
      tags:
        - compute
        - small
      before_script:
        - git config --global user.email "bot@takima.fr"
        - git config --global user.name "TakiBot"
      script:
        - pip install -U python-dotenv
        - pip install GitPython
        - pip install -r ./resources/docs/requirements
        - cd scripts
        - python clean_trainee_repo.py
      variables:
        GIT_TRAINEE_REPOSITORY: "gitlab.takima.io/school/formation-dev-web/es6-epf-trainees.git"
      cache:
        paths:
          - .cache/pip
          - venv/
      when: manual
      needs: []
      only:
        - main