factorial-io / phabalicious

Supports your deployments and every-day devops-tasks
http://docs.phab.io
MIT License
18 stars 3 forks source link

Feature/artifacts deployment #59

Closed stmh closed 5 years ago

stmh commented 5 years ago

Hi @d34dman

this MR contains the changes for doing artifact-based deployments into another git repository. Please have a look into the code and documentation.

d34dman commented 5 years ago

Thanks for the Merge request review,

I have tried it, and it works.

As discussed, find the proposal that we could work on to normalise the behaviour,

hosts:
  sample-sync-host:
    appCreateCopyFilesToTargetDirectoryPrepare:
      - cd %context.data.installDir%; cp .env.example .env

    ignoreSubmodules: true
    target:
      branch: int
      repository: ssh://git@source.factorial.io:2222/skakanat/mi009-phab-artifact.git
      actions:
        - action: copy
          arguments:
            - sites/all/modules
            - sites/all/libraries
            - sites/all/themes
        - action: exclude
          arguments:
            - sites/all/modules/custom/grv-drupal
        - action: delete
          arguments:
            - .tools/es
            - .idea
    needs:
      - git
      - artifacts--git
      - script

Changes are:

d34dman commented 5 years ago
hosts:
  sample-sync-host:
    appCreateCopyFilesToTargetDirectoryPrepare:
      - cd %context.data.installDir%; cp .env.example .env
    ignoreSubmodules: true
    target:
      branch: int
      repository: ssh://git@source.factorial.io:2222/skakanat/mi009-phab-artifact.git
    actions:
      - action: copy
        arguments:
          - sites/all/modules
          - sites/all/libraries
          - sites/all/themes
      - action: exclude
        arguments:
          - sites/all/modules/custom/grv-drupal
      - action: delete
        arguments:
          - .tools/es
          - .idea
    needs:
      - git
      - artifacts--git
      - script

Update: Moved actions key one level up. (instead of being a key under target).

stmh commented 5 years ago

i'd vote to move actions into the target section as they are only valid for that target.

stmh commented 5 years ago

and i would rename target to artifact to make sure what this block is about

d34dman commented 5 years ago

@stmh good job :) I have tested this and works. Did a small modification to conveniently copy the files to desired folder. Please merge whenever you like :) Thanks a LOT!