Skip to content

Add option to build current directory #267

Description

@ochorocho

i wanted to have a single container building the required assets.

Example:

build:
    stage: build assets
    image: akoehnlein/surf:php72
    script:
    - yarn config set cache-dir $CI_PROJECT_DIR/.caches/npm
    - yarn install
    - yarn production
    artifacts:
      paths:
          - DistributionPackages/JoRo.Data/Resources/Public/JavaScript
          - DistributionPackages/JoRo.Data/Resources/Public/Styles
      expire_in: 1d

which works. Gitlab-ci hands over the artifacts to all other jobs which is awesome. The only problem is, Surf itself does all the Tasks in {workspace}-Folder. So my assets are not found by Surf.

With an option to build the current directory, it would be possible for Surf to use the existing data without recompiling or copying the existing asset where Surf can find it.

This would avoid doing dodgy stuff like

"cp " .  dirname(__DIR__) . "/assets" . " " . $deployment->getWorkspacePath($application) . "/assets"

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions