diff --git a/aws_jira_dc_node.yml b/aws_jira_dc_node.yml index 50579d1..3bec0f0 100644 --- a/aws_jira_dc_node.yml +++ b/aws_jira_dc_node.yml @@ -4,7 +4,7 @@ vars: # See group_vars/aws_node_local.yml, which pull vars from the environment. - atl_product_family: "jira" + atl_product_family: "jira-software" atl_product_user: "jira" atl_product_edition: "jira-{{ lookup('env', 'ATL_PRODUCT_EDITION') | lower }}" atl_install_jsd_as_obr: "{{ lookup('env', 'ATL_JSD_ASOBR') | bool }}" diff --git a/roles/product_install/molecule/bitbucket_latest/tests/test_default.py b/roles/product_install/molecule/bitbucket_latest/tests/test_default.py index 0592cbf..3605acf 100644 --- a/roles/product_install/molecule/bitbucket_latest/tests/test_default.py +++ b/roles/product_install/molecule/bitbucket_latest/tests/test_default.py @@ -25,17 +25,17 @@ def test_version_file_is_latest(host): assert verfile.exists upstream_fd = urllib.request.urlopen( - "https://marketplace.atlassian.com/rest/2/applications/bitbucket/versions/latest") + "https://marketplace.atlassian.com/rest/2/products/key/bitbucket/versions") upstream_json = json.load(upstream_fd) - upstream = upstream_json['version'] + upstream = upstream_json['_embedded']['versions'][0]['name'] assert verfile.content.decode("UTF-8").strip() == upstream.strip() def test_latest_is_downloaded(host): upstream_fd = urllib.request.urlopen( - "https://marketplace.atlassian.com/rest/2/applications/bitbucket/versions/latest") + "https://marketplace.atlassian.com/rest/2/products/key/bitbucket/versions") upstream_json = json.load(upstream_fd) - upstream = upstream_json['version'] + upstream = upstream_json['_embedded']['versions'][0]['name'] installer = host.file('/media/atl/downloads/bitbucket.' + upstream + '-x64.bin') assert installer.exists @@ -43,9 +43,9 @@ def test_latest_is_downloaded(host): def test_completed_lockfile(host): upstream_fd = urllib.request.urlopen( - "https://marketplace.atlassian.com/rest/2/applications/bitbucket/versions/latest") + "https://marketplace.atlassian.com/rest/2/products/key/bitbucket/versions") upstream_json = json.load(upstream_fd) - upstream = upstream_json['version'] + upstream = upstream_json['_embedded']['versions'][0]['name'] lockfile = host.file('/media/atl/downloads/bitbucket.' + upstream + '-x64.bin_completed') assert lockfile.exists diff --git a/roles/product_install/molecule/confluence_latest/tests/test_default.py b/roles/product_install/molecule/confluence_latest/tests/test_default.py index 01044a5..1b3ef88 100644 --- a/roles/product_install/molecule/confluence_latest/tests/test_default.py +++ b/roles/product_install/molecule/confluence_latest/tests/test_default.py @@ -24,25 +24,25 @@ def test_version_file_is_latest(host): verfile = host.file('/media/atl/confluence/shared-home/confluence.version') assert verfile.exists - upstream_fd = urllib.request.urlopen("https://marketplace.atlassian.com/rest/2/applications/confluence/versions/latest") + upstream_fd = urllib.request.urlopen("https://marketplace.atlassian.com/rest/2/products/key/confluence/versions") upstream_json = json.load(upstream_fd) - upstream = upstream_json['version'] + upstream = upstream_json['_embedded']['versions'][0]['name'] assert verfile.content.decode("UTF-8").strip() == upstream.strip() def test_latest_is_downloaded(host): - upstream_fd = urllib.request.urlopen("https://marketplace.atlassian.com/rest/2/applications/confluence/versions/latest") + upstream_fd = urllib.request.urlopen("https://marketplace.atlassian.com/rest/2/products/key/confluence/versions") upstream_json = json.load(upstream_fd) - upstream = upstream_json['version'] + upstream = upstream_json['_embedded']['versions'][0]['name'] installer = host.file('/media/atl/downloads/confluence.'+upstream+'-x64.bin') assert installer.exists assert installer.user == 'root' def test_completed_lockfile(host): - upstream_fd = urllib.request.urlopen("https://marketplace.atlassian.com/rest/2/applications/confluence/versions/latest") + upstream_fd = urllib.request.urlopen("https://marketplace.atlassian.com/rest/2/products/key/confluence/versions") upstream_json = json.load(upstream_fd) - upstream = upstream_json['version'] + upstream = upstream_json['_embedded']['versions'][0]['name'] lockfile = host.file('/media/atl/downloads/confluence.'+upstream+'-x64.bin_completed') assert lockfile.exists diff --git a/roles/product_install/molecule/crowd_latest/tests/test_default.py b/roles/product_install/molecule/crowd_latest/tests/test_default.py index 6e5dc7c..7b4841c 100644 --- a/roles/product_install/molecule/crowd_latest/tests/test_default.py +++ b/roles/product_install/molecule/crowd_latest/tests/test_default.py @@ -25,17 +25,17 @@ def test_version_file_is_latest(host): assert verfile.exists upstream_fd = urllib.request.urlopen( - "https://marketplace.atlassian.com/rest/2/applications/crowd/versions/latest") + "https://marketplace.atlassian.com/rest/2/products/key/crowd/versions") upstream_json = json.load(upstream_fd) - upstream = upstream_json['version'] + upstream = upstream_json['_embedded']['versions'][0]['name'] assert verfile.content.decode("UTF-8").strip() == upstream.strip() def test_latest_is_downloaded(host): upstream_fd = urllib.request.urlopen( - "https://marketplace.atlassian.com/rest/2/applications/crowd/versions/latest") + "https://marketplace.atlassian.com/rest/2/products/key/crowd/versions") upstream_json = json.load(upstream_fd) - upstream = upstream_json['version'] + upstream = upstream_json['_embedded']['versions'][0]['name'] installer = host.file('/media/atl/downloads/crowd.' + upstream + '.tar.gz') assert installer.exists @@ -43,9 +43,9 @@ def test_latest_is_downloaded(host): def test_completed_lockfile(host): upstream_fd = urllib.request.urlopen( - "https://marketplace.atlassian.com/rest/2/applications/crowd/versions/latest") + "https://marketplace.atlassian.com/rest/2/products/key/crowd/versions") upstream_json = json.load(upstream_fd) - upstream = upstream_json['version'] + upstream = upstream_json['_embedded']['versions'][0]['name'] lockfile = host.file('/media/atl/downloads/crowd.' + upstream + '.tar.gz_completed') assert lockfile.exists diff --git a/roles/product_install/molecule/default/tests/test_default.py b/roles/product_install/molecule/default/tests/test_default.py index 66eeb28..d157012 100644 --- a/roles/product_install/molecule/default/tests/test_default.py +++ b/roles/product_install/molecule/default/tests/test_default.py @@ -12,25 +12,25 @@ def test_version_file_is_latest(host): verfile = host.file('/media/atl/jira/shared/jira-core.version') assert verfile.exists - upstream_fd = urllib.request.urlopen("https://marketplace.atlassian.com/rest/2/applications/jira/versions/latest") + upstream_fd = urllib.request.urlopen("https://marketplace.atlassian.com/rest/2/products/key/jira-software/versions") upstream_json = json.load(upstream_fd) - upstream = upstream_json['version'] + upstream = upstream_json['_embedded']['versions'][0]['name'] assert verfile.content.decode("UTF-8").strip() == upstream.strip() def test_latest_is_downloaded(host): - upstream_fd = urllib.request.urlopen("https://marketplace.atlassian.com/rest/2/applications/jira/versions/latest") + upstream_fd = urllib.request.urlopen("https://marketplace.atlassian.com/rest/2/products/key/jira-software/versions") upstream_json = json.load(upstream_fd) - upstream = upstream_json['version'] + upstream = upstream_json['_embedded']['versions'][0]['name'] installer = host.file('/media/atl/downloads/jira-core.'+upstream+'-x64.bin') assert installer.exists assert installer.user == 'root' def test_completed_lockfile(host): - upstream_fd = urllib.request.urlopen("https://marketplace.atlassian.com/rest/2/applications/jira/versions/latest") + upstream_fd = urllib.request.urlopen("https://marketplace.atlassian.com/rest/2/products/key/jira-software/versions") upstream_json = json.load(upstream_fd) - upstream = upstream_json['version'] + upstream = upstream_json['_embedded']['versions'][0]['name'] lockfile = host.file('/media/atl/downloads/jira-core.'+upstream+'-x64.bin_completed') assert lockfile.exists diff --git a/roles/product_install/molecule/jira_software_latest/tests/test_default.py b/roles/product_install/molecule/jira_software_latest/tests/test_default.py index 80d53b8..653ece1 100644 --- a/roles/product_install/molecule/jira_software_latest/tests/test_default.py +++ b/roles/product_install/molecule/jira_software_latest/tests/test_default.py @@ -24,25 +24,25 @@ def test_version_file_is_latest(host): verfile = host.file('/media/atl/jira/shared/jira-software.version') assert verfile.exists - upstream_fd = urllib.request.urlopen("https://marketplace.atlassian.com/rest/2/applications/jira/versions/latest") + upstream_fd = urllib.request.urlopen("https://marketplace.atlassian.com/rest/2/products/key/jira-software/versions") upstream_json = json.load(upstream_fd) - upstream = upstream_json['version'] + upstream = upstream_json['_embedded']['versions'][0]['name'] assert verfile.content.decode("UTF-8").strip() == upstream.strip() def test_latest_is_downloaded(host): - upstream_fd = urllib.request.urlopen("https://marketplace.atlassian.com/rest/2/applications/jira/versions/latest") + upstream_fd = urllib.request.urlopen("https://marketplace.atlassian.com/rest/2/products/key/jira-software/versions") upstream_json = json.load(upstream_fd) - upstream = upstream_json['version'] + upstream = upstream_json['_embedded']['versions'][0]['name'] installer = host.file('/media/atl/downloads/jira-software.'+upstream+'-x64.bin') assert installer.exists assert installer.user == 'root' def test_completed_lockfile(host): - upstream_fd = urllib.request.urlopen("https://marketplace.atlassian.com/rest/2/applications/jira/versions/latest") + upstream_fd = urllib.request.urlopen("https://marketplace.atlassian.com/rest/2/products/key/jira-software/versions") upstream_json = json.load(upstream_fd) - upstream = upstream_json['version'] + upstream = upstream_json['_embedded']['versions'][0]['name'] lockfile = host.file('/media/atl/downloads/jira-software.'+upstream+'-x64.bin_completed') assert lockfile.exists diff --git a/roles/product_install/molecule/jira_tarball/tests/test_default.py b/roles/product_install/molecule/jira_tarball/tests/test_default.py index 7155f41..97e4f58 100644 --- a/roles/product_install/molecule/jira_tarball/tests/test_default.py +++ b/roles/product_install/molecule/jira_tarball/tests/test_default.py @@ -12,25 +12,25 @@ def test_version_file_is_latest(host): verfile = host.file('/media/atl/jira/shared/jira-core.version') assert verfile.exists - upstream_fd = urllib.request.urlopen("https://marketplace.atlassian.com/rest/2/applications/jira/versions/latest") + upstream_fd = urllib.request.urlopen("https://marketplace.atlassian.com/rest/2/products/key/jira-software/versions") upstream_json = json.load(upstream_fd) - upstream = upstream_json['version'] + upstream = upstream_json['_embedded']['versions'][0]['name'] assert verfile.content.decode("UTF-8").strip() == upstream.strip() def test_latest_is_downloaded(host): - upstream_fd = urllib.request.urlopen("https://marketplace.atlassian.com/rest/2/applications/jira/versions/latest") + upstream_fd = urllib.request.urlopen("https://marketplace.atlassian.com/rest/2/products/key/jira-software/versions") upstream_json = json.load(upstream_fd) - upstream = upstream_json['version'] + upstream = upstream_json['_embedded']['versions'][0]['name'] installer = host.file('/media/atl/downloads/jira-core.'+upstream+'.tar.gz') assert installer.exists assert installer.user == 'root' def test_completed_lockfile(host): - upstream_fd = urllib.request.urlopen("https://marketplace.atlassian.com/rest/2/applications/jira/versions/latest") + upstream_fd = urllib.request.urlopen("https://marketplace.atlassian.com/rest/2/products/key/jira-software/versions") upstream_json = json.load(upstream_fd) - upstream = upstream_json['version'] + upstream = upstream_json['_embedded']['versions'][0]['name'] lockfile = host.file('/media/atl/downloads/jira-core.'+upstream+'.tar.gz_completed') assert lockfile.exists diff --git a/roles/product_install/molecule/jira_version_latest/tests/test_default.py b/roles/product_install/molecule/jira_version_latest/tests/test_default.py index 8e20d76..93b81b4 100644 --- a/roles/product_install/molecule/jira_version_latest/tests/test_default.py +++ b/roles/product_install/molecule/jira_version_latest/tests/test_default.py @@ -12,25 +12,25 @@ def test_version_file_is_latest(host): verfile = host.file('/media/atl/jira/shared/jira-core.version') assert verfile.exists - upstream_fd = urllib.request.urlopen("https://marketplace.atlassian.com/rest/2/applications/jira/versions/latest") + upstream_fd = urllib.request.urlopen("https://marketplace.atlassian.com/rest/2/products/key/jira-software/versions") upstream_json = json.load(upstream_fd) - upstream = upstream_json['version'] + upstream = upstream_json['_embedded']['versions'][0]['name'] assert verfile.content.decode("UTF-8").strip() == upstream.strip() def test_latest_is_downloaded(host): - upstream_fd = urllib.request.urlopen("https://marketplace.atlassian.com/rest/2/applications/jira/versions/latest") + upstream_fd = urllib.request.urlopen("https://marketplace.atlassian.com/rest/2/products/key/jira-software/versions") upstream_json = json.load(upstream_fd) - upstream = upstream_json['version'] + upstream = upstream_json['_embedded']['versions'][0]['name'] installer = host.file('/media/atl/downloads/jira-core.'+upstream+'-x64.bin') assert installer.exists assert installer.user == 'root' def test_completed_lockfile(host): - upstream_fd = urllib.request.urlopen("https://marketplace.atlassian.com/rest/2/applications/jira/versions/latest") + upstream_fd = urllib.request.urlopen("https://marketplace.atlassian.com/rest/2/products/key/jira-software/versions") upstream_json = json.load(upstream_fd) - upstream = upstream_json['version'] + upstream = upstream_json['_embedded']['versions'][0]['name'] lockfile = host.file('/media/atl/downloads/jira-core.'+upstream+'-x64.bin_completed') assert lockfile.exists