Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ansible: use explicit tap2junit version #3272

Merged
merged 2 commits into from
Apr 3, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion ansible/roles/baselayout-windows/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@

# Necessary for junit output in Jenkins jobs
- name: install tap2junit
win_command: 'pip3 install --upgrade tap2junit'
win_command: 'pip3 install --upgrade tap2junit=={{ tap2junit_version }}'

# Necessary for the libuv test job
- block:
Expand Down
2 changes: 2 additions & 0 deletions ansible/roles/baselayout-windows/vars/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
---
tap2junit_version: 0.1.6
13 changes: 10 additions & 3 deletions ansible/roles/baselayout/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,14 @@
alternatives:
link: "/usr/bin/python3"
name: python3
path: "/usr/bin/python3.7"
path: "/usr/bin/python3.9"

- name: ubuntu1804 | update python package alternatives
when: os == "ubuntu1804"
alternatives:
link: "/usr/bin/python3"
name: python3
path: "/usr/bin/python3.8"

- name: freebsd | update python package alternatives
when: os == "freebsd12"
Expand Down Expand Up @@ -193,8 +200,8 @@
dest: "/usr/bin/{{ item.1 }}"
state: link
with_together:
- [ 'curl', 'curl_32', 'curl_64', 'tar' ]
- [ 'curl', 'curl_32', 'curl_64', 'gtar' ]
- [ 'curl', 'curl_32', 'curl_64', 'tar', 'python3.9' ]
- [ 'curl', 'curl_32', 'curl_64', 'gtar', 'python3' ]

- name: run ccache installer
include: "{{ ccache_include }}"
Expand Down
9 changes: 5 additions & 4 deletions ansible/roles/baselayout/vars/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ packages: {
],

aix: [
'bash,cmake,coreutils,curl,gcc-c++,tar,unzip,git,make,sudo,python-setuptools,python3',
'bash,cmake,coreutils,curl,gcc-c++,tar,unzip,git,make,sudo,python-setuptools,python3.9',
],

aix71: [
Expand Down Expand Up @@ -163,7 +163,8 @@ packages: {
smartos18: [
'gcc7',
'ccache',
'python37'
'python37',
'py37-pip'
],

smartos20: [
Expand All @@ -183,12 +184,12 @@ packages: {

# Default gcc/g++ package is 5.
ubuntu1604: [
'gcc-8,g++-8,gcc-6,g++-6,python3.7,python3.7-distutils',
'gcc-8,g++-8,gcc-6,g++-6,python3.9,python3.9-distutils',
],

# Default gcc/g++ package is 7.
ubuntu1804: [
'gcc-6,g++-6,gcc-8,g++-8',
'gcc-6,g++-6,gcc-8,g++-8,python3.8',
],

ubuntu2204: [
Expand Down
31 changes: 4 additions & 27 deletions ansible/roles/jenkins-worker/tasks/partials/tap2junit/aix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,46 +4,23 @@
# aix: python2.7 is default
#

- name: check if pip exists
stat:
path: /usr/bin/pip
register: pip_exists

- name: download get-pip.py
get_url:
url: https://bootstrap.pypa.io/get-pip.py
dest: /home/iojs/get-pip.py
when: pip_exists.stat.exists == False

- name: Locate Python 3
changed_when: No
command: command -v python3
register: python3_path

- name: install pip AIX71
raw: /opt/freeware/bin/python3 /home/iojs/get-pip.py
when: pip_exists.stat.exists == False and os == "aix71"

- name: install pip AIX72
- name: install pip
ansible.builtin.command: python3 /home/iojs/get-pip.py
when: pip_exists.stat.exists == False and os == "aix72"

- name: create symbolic link AIX71
file:
src: "/opt/freeware/bin/pip"
dest: "/usr/bin/pip"
state: link
when: pip_exists.stat.exists == False and os == "aix71"

- name: create symbolic link AIX72
- name: create pip symbolic link
file:
src: "{{ python3_path.stdout | dirname }}/pip"
src: "/opt/freeware/bin/pip3"
dest: "/usr/bin/pip"
state: link
when: pip_exists.stat.exists == False and os == "aix72"

- name: install tap2junit
pip:
name: tap2junit
name: tap2junit=={{ tap2junit_version }}
state: present
executable: /usr/bin/pip
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
- name: install tap2junit
ansible.builtin.pip:
name: tap2junit
name: tap2junit=={{ tap2junit_version }}
state: present
executable: /usr/bin/pip3
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,5 @@
- name: install tap2junit
pip:
executable: pip3
name: tap2junit
name: tap2junit=={{ tap2junit_version }}
state: present
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@

- name: install tap2junit
pip:
name: tap2junit
name: tap2junit=={{ tap2junit_version }}
state: present
executable: /usr/bin/pip3
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@

- name: install tap2junit
pip:
name: tap2junit
name: tap2junit=={{ tap2junit_version }}
state: latest
executable: /usr/local/bin/pip3
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@
#

- name: install tap2junit
pip: name=tap2junit state=present
pip: name=tap2junit=={{ tap2junit_version }} state=present
15 changes: 11 additions & 4 deletions ansible/roles/jenkins-worker/tasks/partials/tap2junit/smartos.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,18 @@
---

#
# smartos: python 2.7
# smartos
#

- name: install pip
package: name=py27-pip state=present
- name: smartos | update pip3 symlink
when: os == "smartos18"
file:
dest: "/opt/local/bin/pip3"
state: link
src: "/opt/local/bin/pip3.7"

- name: install tap2junit
pip: name=tap2junit state=present
pip:
executable: /opt/local/bin/pip3
name: tap2junit=={{ tap2junit_version }}
state: present
16 changes: 13 additions & 3 deletions ansible/roles/jenkins-worker/tasks/partials/tap2junit/ubuntu.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,21 @@
---

#
# ubuntu series: python 2.7
# ubuntu series
#

# Install pip via `get-pip.py`.
- name: download pip install script
ansible.builtin.get_url:
dest: "{{ home }}/{{ server_user }}/get-pip.py"
url: https://bootstrap.pypa.io/get-pip.py

- name: install pip
package: name=python-pip state=present
ansible.builtin.shell:
cmd: python3 {{ home }}/{{ server_user }}/get-pip.py

- name: install tap2junit
pip: name=tap2junit state=present
pip:
name: tap2junit=={{ tap2junit_version }}
state: present
executable: pip3
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,7 @@
package: name=python3-pip state=present

- name: install tap2junit
pip: name=tap2junit state=present
pip:
name: tap2junit=={{ tap2junit_version }}
state: present
executable: /usr/bin/pip3
2 changes: 2 additions & 0 deletions ansible/roles/jenkins-worker/vars/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -133,3 +133,5 @@ jobs_variants: {
arm64: '3',
smartos: '2'
}
MoLow marked this conversation as resolved.
Show resolved Hide resolved

tap2junit_version: 0.1.6