Merge "Add DOCS_REQIREMENTS variable to RTD Gitlab job"
authorTrevor Bramwell <tbramwell@linuxfoundation.org>
Tue, 29 Jun 2021 17:19:26 +0000 (17:19 +0000)
committerGerrit Code Review <gerrit@opnfv.org>
Tue, 29 Jun 2021 17:19:26 +0000 (17:19 +0000)
1  2 
gitlab-templates/RTD.gitlab-ci.yml

  #
  # Scheduled builds can be enabled when creating a schedule job and
  # specifying DOCS_SCHEDULE = "true" in build variables
+ #
+ # If extra dependencies are needed for builds they will be installed
+ # from the $DOCS_REQUIREMENTS location.
  ---
  variables:
    PIP_CACHE_DIR: "$CI_PROJECT_DIR/.cache/pip"
    DOCS_DIRECTORY: "docs"
+   DOCS_REQUIREMENTS: "$DOCS_DIRECTORY/requirements.txt"
  
  .docs-cache: &docs-cache
    paths:
@@@ -36,8 -40,8 +40,8 @@@
    - source venv/bin/activate
    - pip install Sphinx
    - |
-     if [ -f "$DOCS_DIRECTORY/requirements.txt" ]; then
-       pip install -r "$DOCS_DIRECTORY/requirements.txt"
+     if [ -f "$DOCS_REQUIREMENTS" ]; then
+       pip install -r "$DOCS_REQUIREMENTS"
      fi
  
  docs-build:
@@@ -56,7 -60,7 +60,7 @@@
        when: never
      - if: $CI_PIPELINE_SOURCE == "merge_request_event" || $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
        changes:
 -        - $DOCS_DIRECTORY/*
 +        - $DOCS_DIRECTORY/**/*
  
  docs-link-check:
    stage: test
@@@ -76,7 -80,7 +80,7 @@@
        when: never
      - if: $CI_PIPELINE_SOURCE == "merge_request_event" || $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
        changes:
 -        - $DOCS_DIRECTORY/*
 +        - $DOCS_DIRECTORY/**/*
  
  pages:
    stage: deploy
@@@ -92,4 -96,4 +96,4 @@@
        when: never
      - if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
        changes:
 -        - $DOCS_DIRECTORY/*
 +        - $DOCS_DIRECTORY/**/*