migtools / mig-e2e

End to end tests for OCP Migration
Apache License 2.0
0 stars 11 forks source link

Add hooks functionality #99

Open sergiordlr opened 4 years ago

sergiordlr commented 4 years ago

Add support for hooks functionality

In order to add a hook to a migration plan, add this variable to the migration (or in the defaults/main.yml file of the test role)

- name: Execute migration
  include_role:
    name: migration_run
  vars:
    migration_hooks:
    - hook_name: automaticpreback
      custom: false
      target_cluster: source
      playbook: "{{ lookup('template', 'hook.yml.j2') | string }}"
      execution_namespace: robot-source
      service_account: robot-source
      phase: PreBackup

Allowed target_custers target_cluster: destination target_cluster: source

Allowed phases phase: PreBackup phase: PostBackup phase: PreRestore phase: PostRestore