Skip to content

Introduce configuration value for mounts

Chad Woolley requested to merge 241166-sse-config-mounts into master

What does this MR do?

Adds support for a 'mounts' entry to the Static Site Editor config file.

See #241166 (closed) for more details and discussion.

See the links and link Entry classes in lib/gitlab/ci/config/entry/release/assets/links.rb for an existing example of a similar array-of-hashes config value in the CI config (#36133 (closed))

Description

This config value takes inspiration from the approach Hugo ended up with in their module/mounts approach:

So, using an examples from our current repo where we have can have two or more different content roots for Middleman in our monorepo structure, it would be something like this (using the Hugo "mounts" terminology):

mounts:
  - source: sites/handbook/source
    target: ''
  - source: source/images
    target: images

Config File Entry Syntax Details

Types:

mounts:
  - source: <string>
    target: <string>
  - ...

Default Values:

  • Ideally, the default value should be determined based on the static_site_generator config value, and be a single array entry with the source and target following the out-of-the box defaults for the corresponding tool (middleman, hugo, etc). This can be deferred to the future, though.

Does this MR meet the acceptance criteria?

Conformity

Availability and Testing

Related Issues and MRs

Edited by Chad Woolley

Merge request reports