Skip to content
Snippets Groups Projects
Select Git revision
  • 93466625369792117f63b0eb674aa2b36b3b3179
  • master default protected
  • docs-improve_user_path_description
  • fix-pipeline
  • ci-change_exercises_image_registry
  • feat-merge_recorder_in_extension
  • feat-default_folder
  • feat-change_user
  • develop protected
  • refactor-mission
  • feat-exercise_automatic_save
  • docs-improve_documentation
  • feat-create_little_container_for_developer
  • feat-local-dev
  • 0.1.12
  • 0.1.11
  • 0.1.10
  • 0.1.5
18 results

setup.sh

Blame
  • .gitlab-ci.yml 1.82 KiB
    stages:
      - stagetest
      - training_resources
      - clean_training_resources
    
    # Blocks will be added for each step/day, this could be moved in its own file
    
    stagetest:
      stage: stagetest
      image: python:3
      needs: []
      before_script:
        - cd docs
        - mkdir docs_to_publish
        - cp -r resources/docs/* docs_to_publish/
        - pip install -r requirements
      script:
        - mkdocs build --verbose --site-dir test
      artifacts:
        paths:
          - test
      rules:
        - if: $CI_COMMIT_REF_NAME != $CI_DEFAULT_BRANCH
          changes:
            - docs/*
    
    deploy_trainee_repository:
      stage: training_resources
      image: python:3
      tags:
        - compute
        - small
      needs: []
      before_script:
        - cd resources/docs
        - mkdir docs_to_publish
        - cp -r docs/* docs_to_publish/
        - ls -la docs_to_publish/
        - cd ../..
    
        - 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-angular/tp-angular"
      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