From fcc1ee280cb56ab09b8e0ab3e894c8562b4f4498 Mon Sep 17 00:00:00 2001 From: Shi Pujin Date: Mon, 27 May 2024 14:35:36 +0800 Subject: [PATCH] ansible: add loongson-clfs-loongarch64-{1,2,3} (#3740) Refs: https://github.com/nodejs/build/issues/3740 --- ansible/inventory.yml | 17 +++++++++++++++++ ansible/plugins/inventory/nodejs_yaml.py | 8 ++++---- ansible/roles/baselayout/vars/main.yml | 4 ++++ ansible/roles/bootstrap/tasks/partials/clfs.yml | 0 .../tasks/partials/tap2junit/clfs.yml | 11 +++++++++++ ansible/roles/jenkins-worker/vars/main.yml | 3 ++- 6 files changed, 38 insertions(+), 5 deletions(-) create mode 100644 ansible/roles/bootstrap/tasks/partials/clfs.yml create mode 100644 ansible/roles/jenkins-worker/tasks/partials/tap2junit/clfs.yml diff --git a/ansible/inventory.yml b/ansible/inventory.yml index 3fe7653f0..09496d2ad 100644 --- a/ansible/inventory.yml +++ b/ansible/inventory.yml @@ -56,6 +56,23 @@ hosts: smartos20-x64-2: {ip: 147.28.162.108} ubuntu1804_docker-x64-1: {ip: 147.28.162.104, user: ubuntu} + - loongson: + clfs-loongarch64-1: + ansible_python_interpreter: /usr/bin/python3 + ip: 111.207.111.194 + port: 13966 + user: nodejs + clfs-loongarch64-2: + ansible_python_interpreter: /usr/bin/python3 + ip: 114.242.206.194 + port: 14122 + user: nodejs + clfs-loongarch64-3: + ansible_python_interpreter: /usr/bin/python3 + ip: 114.242.206.194 + port: 14123 + user: nodejs + - macstadium: macos11.0-arm64-1: ansible_python_interpreter: /usr/bin/python3 diff --git a/ansible/plugins/inventory/nodejs_yaml.py b/ansible/plugins/inventory/nodejs_yaml.py index 6705a1a8c..459d14fbc 100755 --- a/ansible/plugins/inventory/nodejs_yaml.py +++ b/ansible/plugins/inventory/nodejs_yaml.py @@ -39,16 +39,16 @@ valid = { # taken from nodejs/node.git: ./configure - 'arch': ('armv6l', 'armv7l', 'arm64', 'ia32', 'mips', 'mipsel', 'ppc', - 'ppc64', 'x32', 'x64', 'x86', 's390', 's390x'), + 'arch': ('armv6l', 'armv7l', 'arm64', 'ia32', 'loong64', 'mips', 'mipsel', + 'ppc', 'ppc64', 'x32', 'x64', 'x86', 's390', 's390x'), # valid roles - add as necessary 'type': ('infra', 'release', 'test'), # providers - validated for consistency 'provider': ('azure', 'digitalocean', 'equinix', 'ibm', 'iinthecloud', 'joyent', - 'linuxonecc', 'hetzner', 'macstadium', 'marist', 'mininodes', 'msft', - 'orka', 'osuosl', 'rackspace', + 'linuxonecc', 'loongson', 'hetzner', 'macstadium', 'marist', 'mininodes', + 'msft', 'orka', 'osuosl', 'rackspace', 'rzkh', 'scaleway', 'softlayer', 'voxer') } DECRYPT_TOOL = "gpg" diff --git a/ansible/roles/baselayout/vars/main.yml b/ansible/roles/baselayout/vars/main.yml index 11939c793..806a9d408 100644 --- a/ansible/roles/baselayout/vars/main.yml +++ b/ansible/roles/baselayout/vars/main.yml @@ -59,6 +59,10 @@ packages: { 'autoconf,automake,ca-certificates-mozilla,tar-gnu,gzip,ccache,cmake,coreutils-gnu,gcc10,gcc10-cplusplus,gcc10-cpp,git,libstdcplusplus6-10-devel,m4-gnu,openssl-devel,python2-setuptools,python3,python3-pip,python39,python39-pip,python39-setuptools,sed-gnu,zlib-devel,icu-devel,c-ares-devel,brotli-devel,grep-gnu,pkg-config,xz', ], + clfs: [ + 'gcc,g++,binutils,git,curl,autoconf,automake,make,cmake,python3', + ], + debian8: [ 'ccache,git,gcc-4.9,g++-4.9,libfontconfig1,binutils-2.26,sudo', ], diff --git a/ansible/roles/bootstrap/tasks/partials/clfs.yml b/ansible/roles/bootstrap/tasks/partials/clfs.yml new file mode 100644 index 000000000..e69de29bb diff --git a/ansible/roles/jenkins-worker/tasks/partials/tap2junit/clfs.yml b/ansible/roles/jenkins-worker/tasks/partials/tap2junit/clfs.yml new file mode 100644 index 000000000..832fa1408 --- /dev/null +++ b/ansible/roles/jenkins-worker/tasks/partials/tap2junit/clfs.yml @@ -0,0 +1,11 @@ +--- + +# +# install tap2junit from pip +# + +- name: install tap2junit + ansible.builtin.pip: + executable: /usr/bin/pip3 + name: tap2junit=={{ tap2junit_version }} + state: present diff --git a/ansible/roles/jenkins-worker/vars/main.yml b/ansible/roles/jenkins-worker/vars/main.yml index d243d4395..3f5adaa62 100644 --- a/ansible/roles/jenkins-worker/vars/main.yml +++ b/ansible/roles/jenkins-worker/vars/main.yml @@ -9,7 +9,7 @@ init: { freebsd: 'freebsd', ibmi: 'ibmi73', macos: 'macos', - systemd: ['centos7', 'debian', 'fedora', 'rhel7', 'rhel8', 'rhel9', 'ubuntu1604', 'ubuntu1804','ubuntu2204'], + systemd: ['centos7', 'clfs', 'debian', 'fedora', 'rhel7', 'rhel8', 'rhel9', 'ubuntu1604', 'ubuntu1804','ubuntu2204'], svc: 'smartos', zos_start: 'zos' } @@ -61,6 +61,7 @@ jenkins: "{{ jenkins_init[init_type] }}" # some os'es needs different paths to java. add them here. java_path: { + 'clfs': '/opt/jdk17/bin/java', 'ibmi73': '/QOpenSys/pkgs/lib/jvm/openjdk-11/bin/java', 'macos10.15': 'java', 'macos11': 'java',