Verified Commit 872a004a authored by Adrian DC's avatar Adrian DC
Browse files

ci(gitlab-ci): use more CI/CD inputs in 'pages.yml' template

Signed-off-by: default avatarAdrian DC <radian.dc@gmail.com>
parent b86613c9
Loading
Loading
Loading
Loading
+10 −5
Changes for .gitlab-ci.d/pages.yml: 10 added lines, 5 removed lines.
Original line number Diff line number Diff line
@@ -6,6 +6,12 @@ spec:
    image:
      default: undefined:latest
      description: 'Specify the pages image (Default: undefined:latest)'
    pdf:
      default: undefined-name
      description: 'Specify the pages pdf output name (Default: undefined-name)'
    watch:
      default: ./docs/.* ./docs/* ./mkdocs.yml ./README.md
      description: 'Specify the pages watch filters (Default: ./docs/.* ./docs/* ./mkdocs.yml ./README.md)'
---

.pages:
@@ -13,9 +19,8 @@ spec:
  image: $[[ inputs.image ]]
  variables:
    CI_LOCAL_NETWORK: 'host'
    DOCS_PREPARE_WATCH_FILES: ./docs/.* ./docs/* ./mkdocs.yml ./README.md
    MKDOCS_EXPORTER_PDF_ENABLED: 'true'
    MKDOCS_EXPORTER_PDF_OUTPUT: 'undefined'
    MKDOCS_EXPORTER_PDF_OUTPUT: $[[ inputs.pdf ]]
  script:
    # Fetch all tags
    - |
@@ -44,7 +49,7 @@ spec:
    # Prepare documentation
    - |
      if [ ! -z "${CI_LOCAL:-}" ]; then
        find ${DOCS_PREPARE_WATCH_FILES} -not -path ./docs/assets/stylesheets/variables.scss -type f | entr -n sh ./docs/prepare.sh &
        find $[[ inputs.watch ]] -not -path ./docs/assets/stylesheets/variables.scss -type f | entr -n sh ./docs/prepare.sh &
        echo -n "${!}" >./docs/.serve.pid
        sleep 2
      else
@@ -71,8 +76,8 @@ spec:
      - public

.pdf:
  extends:
    - .pages
  # extends:
  #   - .pages
  stage: $[[ inputs.stage ]]
  artifacts:
    expire_in: 1 hour
+2 −3
Changes for .gitlab-ci.yml: 2 added lines, 3 removed lines.
Original line number Diff line number Diff line
@@ -49,6 +49,8 @@ include:
    inputs:
      stage: deploy
      image: registry.gitlab.com/radiandevcore/tools/gitlab-projects-settings/gitlab-projects-settings:pages
      pdf: gitlab-projects-settings
      watch: ./config/* ./docs/.* ./docs/* ./mkdocs.yml ./README.md

stages:
  - development
@@ -528,9 +530,6 @@ pages:
    - job: quality:coverage
      artifacts: true
      optional: true
  variables:
    DOCS_PREPARE_WATCH_FILES: ./config/* ./docs/.* ./docs/* ./mkdocs.yml ./README.md
    MKDOCS_EXPORTER_PDF_OUTPUT: 'gitlab-projects-settings'
  cache:
    key: '${CI_JOB_NAME}'
    paths: