mirror of
https://bitbucket.org/atlassian/dc-deployments-automation.git
synced 2025-12-13 08:23:06 -06:00
Merged in DCD-1525-fix-failing-jira-deploys (pull request #161)
DCD-1525 fix failing jira deploys Approved-by: Dylan Rathbone Approved-by: Adam Brokes
This commit is contained in:
@@ -364,6 +364,6 @@ pipelines:
|
||||
script:
|
||||
- ./bin/install-ansible --dev
|
||||
- apt-get update && apt-get install -y npm
|
||||
- npm install -g snyk
|
||||
- npm install -g snyk@1.455.0
|
||||
- snyk auth $SNYK_TOKEN
|
||||
- pipenv run snyk monitor --severity-threshold=high --project-name=dc-deployments-automation
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -1 +0,0 @@
|
||||
product_version_latest.yml
|
||||
9
roles/product_install/tasks/jira-core_version_latest.yml
Normal file
9
roles/product_install/tasks/jira-core_version_latest.yml
Normal file
@@ -0,0 +1,9 @@
|
||||
---
|
||||
|
||||
- name: Fetch the latest version from URL
|
||||
set_fact:
|
||||
atl_product_version_json: "{{ lookup('url', 'https://marketplace.atlassian.com/rest/2/products/key/jira-software/versions') }}"
|
||||
|
||||
- name: Set the local var to retrieved version
|
||||
set_fact:
|
||||
atl_latest_version: "{{ atl_product_version_json._embedded.versions[0].name }}"
|
||||
@@ -1,9 +1,9 @@
|
||||
---
|
||||
|
||||
- name: Fetch the ServiceDesk metadata from marketplace
|
||||
- name: Fetch the latest version from URL
|
||||
set_fact:
|
||||
atl_servicedesk_version_json: "{{ lookup('url', '{{ atl_servicedesk_latest_url }}') }}"
|
||||
atl_product_version_json: "{{ lookup('url', 'https://marketplace.atlassian.com/rest/2/products/key/jira-servicedesk/versions') }}"
|
||||
|
||||
- name: Set the version for ServiceDesk
|
||||
- name: Set the local var to retrieved version
|
||||
set_fact:
|
||||
atl_latest_version: "{{ atl_servicedesk_version_json.name }}"
|
||||
atl_latest_version: "{{ atl_product_version_json._embedded.versions[0].name }}"
|
||||
@@ -1 +0,0 @@
|
||||
product_version_latest.yml
|
||||
@@ -0,0 +1,9 @@
|
||||
---
|
||||
|
||||
- name: Fetch the latest version from URL
|
||||
set_fact:
|
||||
atl_product_version_json: "{{ lookup('url', 'https://marketplace.atlassian.com/rest/2/products/key/jira-software/versions') }}"
|
||||
|
||||
- name: Set the local var to retrieved version
|
||||
set_fact:
|
||||
atl_latest_version: "{{ atl_product_version_json._embedded.versions[0].name }}"
|
||||
Reference in New Issue
Block a user