diff --git a/ansible/roles/baselayout-windows/tasks/main.yml b/ansible/roles/baselayout-windows/tasks/main.yml index 663d9e05d..b2ffe6129 100644 --- a/ansible/roles/baselayout-windows/tasks/main.yml +++ b/ansible/roles/baselayout-windows/tasks/main.yml @@ -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: diff --git a/ansible/roles/baselayout-windows/vars/main.yml b/ansible/roles/baselayout-windows/vars/main.yml new file mode 100644 index 000000000..bac78f4a9 --- /dev/null +++ b/ansible/roles/baselayout-windows/vars/main.yml @@ -0,0 +1,2 @@ +--- +tap2junit_version: 0.1.6 diff --git a/ansible/roles/baselayout/tasks/main.yml b/ansible/roles/baselayout/tasks/main.yml index 34214360a..6198f02af 100644 --- a/ansible/roles/baselayout/tasks/main.yml +++ b/ansible/roles/baselayout/tasks/main.yml @@ -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" @@ -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 }}" diff --git a/ansible/roles/baselayout/vars/main.yml b/ansible/roles/baselayout/vars/main.yml index 7c6b57a6f..b757946c9 100644 --- a/ansible/roles/baselayout/vars/main.yml +++ b/ansible/roles/baselayout/vars/main.yml @@ -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: [ @@ -163,7 +163,8 @@ packages: { smartos18: [ 'gcc7', 'ccache', - 'python37' + 'python37', + 'py37-pip' ], smartos20: [ @@ -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: [ diff --git a/ansible/roles/jenkins-worker/tasks/partials/tap2junit/aix.yml b/ansible/roles/jenkins-worker/tasks/partials/tap2junit/aix.yml index 6e3c23f5f..5affb9307 100644 --- a/ansible/roles/jenkins-worker/tasks/partials/tap2junit/aix.yml +++ b/ansible/roles/jenkins-worker/tasks/partials/tap2junit/aix.yml @@ -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 diff --git a/ansible/roles/jenkins-worker/tasks/partials/tap2junit/aix73.yml b/ansible/roles/jenkins-worker/tasks/partials/tap2junit/aix73.yml index b3bc04f14..ddb5fff53 100644 --- a/ansible/roles/jenkins-worker/tasks/partials/tap2junit/aix73.yml +++ b/ansible/roles/jenkins-worker/tasks/partials/tap2junit/aix73.yml @@ -1,5 +1,5 @@ - name: install tap2junit ansible.builtin.pip: - name: tap2junit + name: tap2junit=={{ tap2junit_version }} state: present executable: /usr/bin/pip3 diff --git a/ansible/roles/jenkins-worker/tasks/partials/tap2junit/freebsd.yml b/ansible/roles/jenkins-worker/tasks/partials/tap2junit/freebsd.yml index 539c8a3f1..e836fc8be 100644 --- a/ansible/roles/jenkins-worker/tasks/partials/tap2junit/freebsd.yml +++ b/ansible/roles/jenkins-worker/tasks/partials/tap2junit/freebsd.yml @@ -19,5 +19,5 @@ - name: install tap2junit pip: executable: pip3 - name: tap2junit + name: tap2junit=={{ tap2junit_version }} state: present diff --git a/ansible/roles/jenkins-worker/tasks/partials/tap2junit/macos.yml b/ansible/roles/jenkins-worker/tasks/partials/tap2junit/macos.yml index 794194a86..fe9268ce1 100644 --- a/ansible/roles/jenkins-worker/tasks/partials/tap2junit/macos.yml +++ b/ansible/roles/jenkins-worker/tasks/partials/tap2junit/macos.yml @@ -6,6 +6,6 @@ - name: install tap2junit pip: - name: tap2junit + name: tap2junit=={{ tap2junit_version }} state: present executable: /usr/bin/pip3 diff --git a/ansible/roles/jenkins-worker/tasks/partials/tap2junit/macos10.14.yml b/ansible/roles/jenkins-worker/tasks/partials/tap2junit/macos10.14.yml index 31adc615f..98259603e 100644 --- a/ansible/roles/jenkins-worker/tasks/partials/tap2junit/macos10.14.yml +++ b/ansible/roles/jenkins-worker/tasks/partials/tap2junit/macos10.14.yml @@ -6,6 +6,6 @@ - name: install tap2junit pip: - name: tap2junit + name: tap2junit=={{ tap2junit_version }} state: latest executable: /usr/local/bin/pip3 diff --git a/ansible/roles/jenkins-worker/tasks/partials/tap2junit/pip.yml b/ansible/roles/jenkins-worker/tasks/partials/tap2junit/pip.yml index d9d9c60cf..df3a5f6d1 100644 --- a/ansible/roles/jenkins-worker/tasks/partials/tap2junit/pip.yml +++ b/ansible/roles/jenkins-worker/tasks/partials/tap2junit/pip.yml @@ -5,4 +5,4 @@ # - name: install tap2junit - pip: name=tap2junit state=present + pip: name=tap2junit=={{ tap2junit_version }} state=present diff --git a/ansible/roles/jenkins-worker/tasks/partials/tap2junit/smartos.yml b/ansible/roles/jenkins-worker/tasks/partials/tap2junit/smartos.yml index 4414e1198..ff2e2fabe 100644 --- a/ansible/roles/jenkins-worker/tasks/partials/tap2junit/smartos.yml +++ b/ansible/roles/jenkins-worker/tasks/partials/tap2junit/smartos.yml @@ -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 diff --git a/ansible/roles/jenkins-worker/tasks/partials/tap2junit/ubuntu.yml b/ansible/roles/jenkins-worker/tasks/partials/tap2junit/ubuntu.yml index fe5d82a86..472643252 100644 --- a/ansible/roles/jenkins-worker/tasks/partials/tap2junit/ubuntu.yml +++ b/ansible/roles/jenkins-worker/tasks/partials/tap2junit/ubuntu.yml @@ -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 diff --git a/ansible/roles/jenkins-worker/tasks/partials/tap2junit/ubuntu2204.yml b/ansible/roles/jenkins-worker/tasks/partials/tap2junit/ubuntu2204.yml index ee216b8fe..ba1529e29 100644 --- a/ansible/roles/jenkins-worker/tasks/partials/tap2junit/ubuntu2204.yml +++ b/ansible/roles/jenkins-worker/tasks/partials/tap2junit/ubuntu2204.yml @@ -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 diff --git a/ansible/roles/jenkins-worker/vars/main.yml b/ansible/roles/jenkins-worker/vars/main.yml index 81a10012e..3fe79128a 100644 --- a/ansible/roles/jenkins-worker/vars/main.yml +++ b/ansible/roles/jenkins-worker/vars/main.yml @@ -133,3 +133,5 @@ jobs_variants: { arm64: '3', smartos: '2' } + +tap2junit_version: 0.1.6