mirror of
https://bitbucket.org/atlassian/dc-deployments-automation.git
synced 2025-12-14 08:53:07 -06:00
add task to force all handlers to run
This commit is contained in:
committed by
Steve Smith
parent
e5da94581c
commit
ab9d510d8b
42
roles/bitbucket_dataset_restore/tasks/main.yml
Normal file
42
roles/bitbucket_dataset_restore/tasks/main.yml
Normal file
@@ -0,0 +1,42 @@
|
|||||||
|
---
|
||||||
|
|
||||||
|
- name: Check if import directory exists
|
||||||
|
stat:
|
||||||
|
path: /tmp/import
|
||||||
|
register: import_dir
|
||||||
|
|
||||||
|
- name: create directory structure if it note exists
|
||||||
|
file:
|
||||||
|
path: /tmp/import
|
||||||
|
state: directory
|
||||||
|
mode: 0644
|
||||||
|
group: root
|
||||||
|
owner: root
|
||||||
|
when: import_dir.stat.exists == false
|
||||||
|
|
||||||
|
- name: Copy Bitbucket dataset from s3
|
||||||
|
get_url:
|
||||||
|
url: "{{ atl_bitbucket_dataset_url }}"
|
||||||
|
dest: /tmp/import
|
||||||
|
|
||||||
|
- name: Force all notified handlers to run at this point, not waiting for normal sync points
|
||||||
|
meta: flush_handlers
|
||||||
|
|
||||||
|
- name: wait for port 7990 to be up
|
||||||
|
wait_for:
|
||||||
|
port: 7990
|
||||||
|
delay: 10
|
||||||
|
timeout: 60
|
||||||
|
|
||||||
|
- name: Invoke Import API
|
||||||
|
uri:
|
||||||
|
url: http://localhost:7990/rest/api/1.0/migration/imports
|
||||||
|
user: admin
|
||||||
|
password: "{{ atl_bitbucket_admin_password }}"
|
||||||
|
method: POST
|
||||||
|
force_basic_auth: yes
|
||||||
|
body: '{{ "archivePath": "/tmp/import/{{ atl_bitbucket_dataset_url | basename}}" }}'
|
||||||
|
body_format: json
|
||||||
|
return_content: yes
|
||||||
|
register: response
|
||||||
|
failed_when: "'INITIALISING' not in response.content"
|
||||||
Reference in New Issue
Block a user