| # This file is only used for tests, but Copybara won't work unless it exists. |
| - name: "Create dummy test_repos_config.sky" |
| ansible.builtin.copy: |
| src: "{{ zuul.project.src_dir }}/.copybara/test_repos_config.bara.sky.template" |
| dest: "{{ zuul.project.src_dir }}/.copybara/test_repos_config.bara.sky" |
| remote_src: true |
| force: true |
| |
| - name: "Run Copybara migration" |
| ansible.builtin.shell: |
| cmd: "sh export-commits.sh" |
| chdir: "{{ zuul.project.src_dir }}/.copybara" |
| register: result |
| # Exit status 4 means NO_OP: |
| # https://github.com/google/copybara/blob/55c4904442bcf905fe03c2297488b90428b472a7/java/com/google/copybara/util/ExitCode.java#L42 |
| failed_when: result.rc not in [0, 4] |
| retries: 3 |