mirror of
https://bitbucket.org/atlassian/dc-deployments-automation.git
synced 2025-12-14 00:43:06 -06:00
The S3 Jira latest file does not appear to be updating, so use marketplace.
This commit is contained in:
@@ -2,6 +2,7 @@ import os
|
|||||||
from six.moves import urllib
|
from six.moves import urllib
|
||||||
|
|
||||||
import testinfra.utils.ansible_runner
|
import testinfra.utils.ansible_runner
|
||||||
|
import json
|
||||||
|
|
||||||
testinfra_hosts = testinfra.utils.ansible_runner.AnsibleRunner(
|
testinfra_hosts = testinfra.utils.ansible_runner.AnsibleRunner(
|
||||||
os.environ['MOLECULE_INVENTORY_FILE']).get_hosts('all')
|
os.environ['MOLECULE_INVENTORY_FILE']).get_hosts('all')
|
||||||
@@ -11,14 +12,16 @@ def test_version_file_is_latest(host):
|
|||||||
verfile = host.file('/media/atl/jira/shared/jira-core.version')
|
verfile = host.file('/media/atl/jira/shared/jira-core.version')
|
||||||
assert verfile.exists
|
assert verfile.exists
|
||||||
|
|
||||||
upstream_fd = urllib.request.urlopen("https://s3.amazonaws.com/atlassian-software/releases/jira-core/latest")
|
upstream_fd = urllib.request.urlopen("https://marketplace.atlassian.com/rest/2/applications/jira/versions/latest")
|
||||||
upstream = upstream_fd.read()
|
upstream_json = json.load(upstream_fd)
|
||||||
|
upstream = upstream_json['version']
|
||||||
|
|
||||||
assert verfile.content.decode("UTF-8").strip() == upstream.decode("UTF-8").strip()
|
assert verfile.content.decode("UTF-8").strip() == upstream.strip()
|
||||||
|
|
||||||
def test_latest_is_downloaded(host):
|
def test_latest_is_downloaded(host):
|
||||||
upstream_fd = urllib.request.urlopen("https://s3.amazonaws.com/atlassian-software/releases/jira-core/latest")
|
upstream_fd = urllib.request.urlopen("https://marketplace.atlassian.com/rest/2/applications/jira/versions/latest")
|
||||||
upstream = upstream_fd.read().decode("UTF-8").strip()
|
upstream_json = json.load(upstream_fd)
|
||||||
|
upstream = upstream_json['version']
|
||||||
|
|
||||||
installer = host.file('/opt/atlassian/tmp/jira-core.'+upstream+'.bin')
|
installer = host.file('/opt/atlassian/tmp/jira-core.'+upstream+'.bin')
|
||||||
assert installer.exists
|
assert installer.exists
|
||||||
|
|||||||
@@ -23,14 +23,16 @@ def test_version_file_is_latest(host):
|
|||||||
verfile = host.file('/media/atl/jira/shared/jira-software.version')
|
verfile = host.file('/media/atl/jira/shared/jira-software.version')
|
||||||
assert verfile.exists
|
assert verfile.exists
|
||||||
|
|
||||||
upstream_fd = urllib.request.urlopen("https://s3.amazonaws.com/atlassian-software/releases/jira-software/latest")
|
upstream_fd = urllib.request.urlopen("https://marketplace.atlassian.com/rest/2/applications/jira/versions/latest")
|
||||||
upstream = upstream_fd.read()
|
upstream_json = json.load(upstream_fd)
|
||||||
|
upstream = upstream_json['version']
|
||||||
|
|
||||||
assert verfile.content.decode("UTF-8").strip() == upstream.decode("UTF-8").strip()
|
assert verfile.content.decode("UTF-8").strip() == upstream.strip()
|
||||||
|
|
||||||
def test_latest_is_downloaded(host):
|
def test_latest_is_downloaded(host):
|
||||||
upstream_fd = urllib.request.urlopen("https://s3.amazonaws.com/atlassian-software/releases/jira-software/latest")
|
upstream_fd = urllib.request.urlopen("https://marketplace.atlassian.com/rest/2/applications/jira/versions/latest")
|
||||||
upstream = upstream_fd.read().decode("UTF-8").strip()
|
upstream_json = json.load(upstream_fd)
|
||||||
|
upstream = upstream_json['version']
|
||||||
|
|
||||||
installer = host.file('/opt/atlassian/tmp/jira-software.'+upstream+'.bin')
|
installer = host.file('/opt/atlassian/tmp/jira-software.'+upstream+'.bin')
|
||||||
assert installer.exists
|
assert installer.exists
|
||||||
|
|||||||
@@ -11,14 +11,16 @@ def test_version_file_is_latest(host):
|
|||||||
verfile = host.file('/media/atl/jira/shared/jira-core.version')
|
verfile = host.file('/media/atl/jira/shared/jira-core.version')
|
||||||
assert verfile.exists
|
assert verfile.exists
|
||||||
|
|
||||||
upstream_fd = urllib.request.urlopen("https://s3.amazonaws.com/atlassian-software/releases/jira-core/latest")
|
upstream_fd = urllib.request.urlopen("https://marketplace.atlassian.com/rest/2/applications/jira/versions/latest")
|
||||||
upstream = upstream_fd.read()
|
upstream_json = json.load(upstream_fd)
|
||||||
|
upstream = upstream_json['version']
|
||||||
|
|
||||||
assert verfile.content.decode("UTF-8").strip() == upstream.decode("UTF-8").strip()
|
assert verfile.content.decode("UTF-8").strip() == upstream.strip()
|
||||||
|
|
||||||
def test_latest_is_downloaded(host):
|
def test_latest_is_downloaded(host):
|
||||||
upstream_fd = urllib.request.urlopen("https://s3.amazonaws.com/atlassian-software/releases/jira-core/latest")
|
upstream_fd = urllib.request.urlopen("https://marketplace.atlassian.com/rest/2/applications/jira/versions/latest")
|
||||||
upstream = upstream_fd.read().decode("UTF-8").strip()
|
upstream_json = json.load(upstream_fd)
|
||||||
|
upstream = upstream_json['version']
|
||||||
|
|
||||||
installer = host.file('/opt/atlassian/tmp/jira-core.'+upstream+'.bin')
|
installer = host.file('/opt/atlassian/tmp/jira-core.'+upstream+'.bin')
|
||||||
assert installer.exists
|
assert installer.exists
|
||||||
|
|||||||
Reference in New Issue
Block a user