mirror of
https://bitbucket.org/atlassian/dc-deployments-automation.git
synced 2025-12-14 08:53:07 -06:00
DCD-224: Add fetching of the installer.
This commit is contained in:
@@ -1,5 +1,10 @@
|
||||
---
|
||||
|
||||
atl_release_base_url: "https://s3.amazonaws.com/atlassian-software/releases"
|
||||
atl_product_latest_version_url: "{{ atl_release_base_url }}/{{ atl_product_edition }}/latest"
|
||||
atl_product_base_url: "{{ atl_release_base_url }}/{{ atl_product_edition }}"
|
||||
|
||||
atl_product_latest_version_url: "{{ atl_product_base_url }}/latest"
|
||||
atl_product_version_cache: "{{ atl_product_home_shared }}/{{ atl_product_edition }}.version"
|
||||
|
||||
atl_product_download_url: "{{ atl_product_base_url }}/atlassian-{{ atl_product_edition }}-{{ atl_product_version_file.stdout }}-x64.bin"
|
||||
atl_product_download_cache: "{{ atl_product_home_shared }}/{{ atl_product_edition }}.{{ atl_product_version_file.stdout }}.bin"
|
||||
|
||||
@@ -12,7 +12,7 @@ def test_version_downloaded(host):
|
||||
assert verfile.exists
|
||||
|
||||
|
||||
def test_version_is_latest(host):
|
||||
def test_version_file_is_latest(host):
|
||||
verfile = host.file('/media/atl/jira/shared/jira-software.version')
|
||||
assert verfile.exists
|
||||
|
||||
@@ -20,3 +20,12 @@ def test_version_is_latest(host):
|
||||
upstream = upstream_fd.read()
|
||||
|
||||
assert verfile.content.decode("UTF-8").strip() == upstream.decode("UTF-8").strip()
|
||||
|
||||
def test_latest_is_downloaded(host):
|
||||
upstream_fd = urllib.request.urlopen("https://s3.amazonaws.com/atlassian-software/releases/jira-software/latest")
|
||||
upstream = upstream_fd.read().decode("UTF-8").strip()
|
||||
|
||||
installer = host.file('/media/atl/jira/shared/jira-software.'+upstream+'.bin')
|
||||
assert installer.exists
|
||||
assert installer.user == 'root'
|
||||
assert installer.mode == 0o0755
|
||||
|
||||
@@ -15,6 +15,12 @@
|
||||
when: atl_product_version is defined and atl_product_version != "latest"
|
||||
|
||||
- name: Use version for product version
|
||||
slurp:
|
||||
src: "{{ atl_product_version_cache }}"
|
||||
register: atl_product_version
|
||||
command: "cat {{ atl_product_version_cache }}"
|
||||
register: atl_product_version_file
|
||||
|
||||
- name: Fetch product installer
|
||||
get_url:
|
||||
url: "{{ atl_product_download_url }}"
|
||||
dest: "{{ atl_product_download_cache }}"
|
||||
mode: 0755
|
||||
force: false
|
||||
|
||||
Reference in New Issue
Block a user