From daa568b0c952919b044fa773be36126ec343fb1c Mon Sep 17 00:00:00 2001 From: Ulises Gascon Date: Fri, 18 Nov 2022 22:01:23 +0100 Subject: [PATCH 1/8] fix: removed empty space --- doc/ssh.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/ssh.md b/doc/ssh.md index e1d3d8885..c3039281d 100644 --- a/doc/ssh.md +++ b/doc/ssh.md @@ -21,9 +21,9 @@ for build working group members. comments: ``` - # begin: node.js template + # begin: node.js template - # end: node.js template + # end: node.js template ``` 4. Follow the instructions in the [ansible guide](../ansible/README.md) to install ansible on your local machine. From 8991542c497191281234bb8ca5a111d48ce47a5a Mon Sep 17 00:00:00 2001 From: Richard Lau Date: Mon, 31 Oct 2022 20:21:10 +0000 Subject: [PATCH 2/8] ansible: fix Jenkins icon download Download the Jenkins icon from our own CI server to avoid failure due to redirects. --- ansible/group_vars/release.yml | 1 + ansible/group_vars/test.yml | 1 + ansible/roles/jenkins-worker-windows/tasks/main.yml | 2 +- 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/ansible/group_vars/release.yml b/ansible/group_vars/release.yml index 5592dbcd2..1c9b53a2d 100644 --- a/ansible/group_vars/release.yml +++ b/ansible/group_vars/release.yml @@ -1,6 +1,7 @@ jenkins_url: "https://ci-release.nodejs.org" # intentionally fetching `slave.jar` from ci.nodejs.org to avoid auth problems jenkins_worker_jar: "https://ci.nodejs.org/jnlpJars/slave.jar" +jenkins_icon: "https://ci.nodejs.org/favicon.ico" server_user: "iojs" home: "/home" git_reference_path: "{{ home }}/{{ server_user }}/.ccache/node.shared.reference" diff --git a/ansible/group_vars/test.yml b/ansible/group_vars/test.yml index 3165d07be..ddd0dadfb 100644 --- a/ansible/group_vars/test.yml +++ b/ansible/group_vars/test.yml @@ -1,5 +1,6 @@ jenkins_url: "https://ci.nodejs.org" jenkins_worker_jar: "{{ jenkins_url }}/jnlpJars/slave.jar" +jenkins_icon: "{{ jenkins_url }}/favicon.ico" server_user: iojs home: "/home" git_reference_path: "{{ home }}/{{ server_user }}/git/io.js.reference" diff --git a/ansible/roles/jenkins-worker-windows/tasks/main.yml b/ansible/roles/jenkins-worker-windows/tasks/main.yml index fae778bb9..abfe9867e 100644 --- a/ansible/roles/jenkins-worker-windows/tasks/main.yml +++ b/ansible/roles/jenkins-worker-windows/tasks/main.yml @@ -9,7 +9,7 @@ - name: download Jenkins icon win_get_url: - url: 'http://mirrors.jenkins-ci.org/art/jenkins-logo/favicon.ico' + url: '{{ jenkins_icon }}' dest: 'C:\jenkins.ico' force: no From 8655962b446738e875670ff464aa178fb3413fd1 Mon Sep 17 00:00:00 2001 From: Richard Lau Date: Fri, 18 Nov 2022 13:20:27 +0000 Subject: [PATCH 3/8] ansible: update Windows workers to Java 17 Refs: https://github.com/nodejs/build/issues/3030 --- ansible/roles/jenkins-worker-windows/tasks/main.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ansible/roles/jenkins-worker-windows/tasks/main.yml b/ansible/roles/jenkins-worker-windows/tasks/main.yml index abfe9867e..42cd91f95 100644 --- a/ansible/roles/jenkins-worker-windows/tasks/main.yml +++ b/ansible/roles/jenkins-worker-windows/tasks/main.yml @@ -4,8 +4,8 @@ # Install the Jenkins worker # -- name: install Java 8 - win_chocolatey: name=jdk8 +- name: install Java 17 + win_chocolatey: name=Temurin17 - name: download Jenkins icon win_get_url: From 7fdcf5790e73b41802263f312f73009800cf66f0 Mon Sep 17 00:00:00 2001 From: Richard Lau Date: Mon, 31 Oct 2022 16:31:32 +0000 Subject: [PATCH 4/8] ansible: pin Python 3 to 3.10.8 (#3062) Node.js 14 is incompatible with Python 3.11. Pin Python 3 to 3.10.8. --- ansible/roles/baselayout-windows/tasks/main.yml | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/ansible/roles/baselayout-windows/tasks/main.yml b/ansible/roles/baselayout-windows/tasks/main.yml index 75dac30e1..15a9e8107 100644 --- a/ansible/roles/baselayout-windows/tasks/main.yml +++ b/ansible/roles/baselayout-windows/tasks/main.yml @@ -13,7 +13,18 @@ install_args: 'ADD_CMAKE_TO_PATH=System' - name: install Python 3 - win_chocolatey: name=python + win_chocolatey: + install_args: Include_launcher=1 + name: python3 + pinned: yes + version: "3.10.8" + +- name: install Python 3 + win_chocolatey: + install_args: Include_launcher=1 + name: python + pinned: yes + version: "3.10.8" - name: install Python 2 win_chocolatey: name=python2 From ebc0ece6b3ab46d48c3c70ea3cccc95559a07d25 Mon Sep 17 00:00:00 2001 From: Ulises Gascon Date: Tue, 22 Nov 2022 02:25:51 +0100 Subject: [PATCH 5/8] fix: anchored ubuntu version to support Python 2.7 - See: https://github.com/actions/setup-python/issues/543 - Context: https://github.com/nodejs/build/actions/runs/3519497549/jobs/5899537570 --- .github/workflows/push.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index 808900d39..fa116a4e0 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml @@ -2,7 +2,7 @@ name: Lint on: [push, pull_request] jobs: Python: - runs-on: ubuntu-latest + runs-on: ubuntu-20.04 strategy: max-parallel: 2 matrix: From cdabfbe887a56bcebc7aea1d3cfe935425ffb980 Mon Sep 17 00:00:00 2001 From: Ulises Gascon Date: Tue, 22 Nov 2022 14:39:01 +0100 Subject: [PATCH 6/8] chore: upgrade gh actions - actions/setup-python@v1 -> actions/setup-python@v4 - actions/checkout@v2 -> actions/checkout@v3 --- .github/workflows/push.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index fa116a4e0..b66daed32 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml @@ -8,9 +8,9 @@ jobs: matrix: python-version: [2.7, 3.7] steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v1 + uses: actions/setup-python@v4 with: python-version: ${{ matrix.python-version }} - name: Install dependencies From 86235552f41058f1b0e5f33f66403ec3ee7fea49 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C3=ABl=20Zasso?= Date: Wed, 23 Nov 2022 15:04:29 +0100 Subject: [PATCH 7/8] ansible: install temurin JDK on macOS (#3085) Refs: https://github.com/nodejs/build/issues/3030 --- ansible/roles/java-base/tasks/main.yml | 23 ++----------------- ansible/roles/java-base/vars/main.yml | 2 +- ansible/roles/jenkins-worker/vars/main.yml | 3 +-- .../package-upgrade/tasks/partials/brew.yml | 7 +++--- 4 files changed, 8 insertions(+), 27 deletions(-) diff --git a/ansible/roles/java-base/tasks/main.yml b/ansible/roles/java-base/tasks/main.yml index c5e362919..be9a02a99 100644 --- a/ansible/roles/java-base/tasks/main.yml +++ b/ansible/roles/java-base/tasks/main.yml @@ -51,32 +51,13 @@ # Package manager mapping in ansible/roles/package-upgrade/vars/main.yml. use: "{{ os|match_key(pm)|default(omit) }}" -- name: install java tap (macOS) - become_user: administrator - when: java.rc > 0 and os|startswith("macos") and arch == "x64" - homebrew_tap: - name: AdoptOpenJDK/openjdk - state: present - - name: install java (macOS) - become_user: administrator - when: java.rc > 0 and os|startswith("macos") and arch == "x64" + become_user: "{{ ansible_user }}" + when: java.rc > 0 and os|startswith("macos") homebrew_cask: name: "{{ java_package_name }}" state: present -- name: Fetch java (Apple Silicon) - when: java.rc > 0 and os|startswith("macos11") and arch == "arm64" - shell: - chdir: "/Users/{{ ansible_user }}" - cmd: "curl -L -o zulu8.52.0.23-ca-jdk8.0.282-macosx_aarch64.tar.gz https://cdn.azul.com/zulu/bin/zulu8.52.0.23-ca-jdk8.0.282-macosx_aarch64.tar.gz" - -- name: Extract java (Apple Silicon) - when: java.rc > 0 and os|startswith("macos11") and arch == "arm64" - shell: - chdir: "/Users/{{ ansible_user }}" - cmd: "tar -xf zulu8.52.0.23-ca-jdk8.0.282-macosx_aarch64.tar.gz" - - name: install webupd8 oracle java 8 extras when: java.rc > 0 and os == "ubuntu1404" and arch != "ppc64" package: name="{{item}}" state=present diff --git a/ansible/roles/java-base/vars/main.yml b/ansible/roles/java-base/vars/main.yml index b86f176da..a0cd2d9b5 100644 --- a/ansible/roles/java-base/vars/main.yml +++ b/ansible/roles/java-base/vars/main.yml @@ -14,7 +14,7 @@ packages: { 'fedora32': 'java-11-openjdk-headless', 'freebsd': 'openjdk11-jre', 'ibmi': 'openjdk-11-ea', - 'macos': 'adoptopenjdk8', + 'macos': 'temurin17', 'rhel7': 'java-11-openjdk', 'rhel8': 'java-17-openjdk', 'smartos': 'openjdk8', diff --git a/ansible/roles/jenkins-worker/vars/main.yml b/ansible/roles/jenkins-worker/vars/main.yml index 94fe7c8ea..09bba7995 100644 --- a/ansible/roles/jenkins-worker/vars/main.yml +++ b/ansible/roles/jenkins-worker/vars/main.yml @@ -86,8 +86,7 @@ java_path: { 'macos10.14': 'java', 'macos10.15': 'java', 'macos11': 'java', - # Currently hardcoded untill adopt have their build available - 'macos11.0': '/Users/{{ ansible_user }}/zulu8.52.0.23-ca-jdk8.0.282-macosx_aarch64/bin/java', + 'macos11.0': 'java', 'smartos15': '/opt/local/java/openjdk8/bin/java', 'smartos16': '/opt/local/java/openjdk8/bin/java', 'smartos17': '/opt/local/java/openjdk8/bin/java', diff --git a/ansible/roles/package-upgrade/tasks/partials/brew.yml b/ansible/roles/package-upgrade/tasks/partials/brew.yml index e86fc4410..eafec4f0e 100644 --- a/ansible/roles/package-upgrade/tasks/partials/brew.yml +++ b/ansible/roles/package-upgrade/tasks/partials/brew.yml @@ -8,12 +8,13 @@ raw: xcode-select --print-path &> /dev/null register: xcode ignore_errors: yes + check_mode: no - name: Install xcode-tools script: files/install-xcode.sh when: xcode.rc > 1 - - name: Check if Homebrew is already installed (Apple Sillicon) + - name: Check if Homebrew is already installed (Apple Silicon) stat: path: /opt/homebrew/bin/brew register: armbrew @@ -45,10 +46,10 @@ homebrew_tap: name: buo/cask-upgrade - - name: Add AdoptOpenJDK Java Repo + - name: Install brew cask-versions become_user: "{{ ansible_user }}" homebrew_tap: - name: AdoptOpenJDK/openjdk + name: homebrew/cask-versions - name: Update Casks become_user: "{{ ansible_user }}" From 216ffd5c89d7703609f899911cc4179571ab2dd3 Mon Sep 17 00:00:00 2001 From: Richard Lau Date: Thu, 24 Nov 2022 13:17:13 +0000 Subject: [PATCH 8/8] ansible: update smartos hosts to Java 11 (#3095) Update smartos CI hosts to Java 11. Remove obsolete entries for older versions of smartos. Refs: https://github.com/nodejs/build/issues/3030 --- ansible/roles/java-base/tasks/main.yml | 2 +- ansible/roles/java-base/vars/main.yml | 2 +- ansible/roles/jenkins-worker/vars/main.yml | 7 ++----- 3 files changed, 4 insertions(+), 7 deletions(-) diff --git a/ansible/roles/java-base/tasks/main.yml b/ansible/roles/java-base/tasks/main.yml index be9a02a99..a821d9b13 100644 --- a/ansible/roles/java-base/tasks/main.yml +++ b/ansible/roles/java-base/tasks/main.yml @@ -47,7 +47,7 @@ - restart Jenkins package: name: "{{ java_package_name }}" - state: latest + state: "{{ 'present' if os|match_key(pm) == 'pkgin' else 'latest' }}" # Package manager mapping in ansible/roles/package-upgrade/vars/main.yml. use: "{{ os|match_key(pm)|default(omit) }}" diff --git a/ansible/roles/java-base/vars/main.yml b/ansible/roles/java-base/vars/main.yml index a0cd2d9b5..4a5c264b7 100644 --- a/ansible/roles/java-base/vars/main.yml +++ b/ansible/roles/java-base/vars/main.yml @@ -17,7 +17,7 @@ packages: { 'macos': 'temurin17', 'rhel7': 'java-11-openjdk', 'rhel8': 'java-17-openjdk', - 'smartos': 'openjdk8', + 'smartos': 'openjdk11', 'ubuntu': 'openjdk-17-jre-headless', 'ubuntu1604': 'openjdk-8-jre-headless', 'ubuntu1404': 'oracle-java8-installer', diff --git a/ansible/roles/jenkins-worker/vars/main.yml b/ansible/roles/jenkins-worker/vars/main.yml index 09bba7995..81a10012e 100644 --- a/ansible/roles/jenkins-worker/vars/main.yml +++ b/ansible/roles/jenkins-worker/vars/main.yml @@ -87,11 +87,8 @@ java_path: { 'macos10.15': 'java', 'macos11': 'java', 'macos11.0': 'java', - 'smartos15': '/opt/local/java/openjdk8/bin/java', - 'smartos16': '/opt/local/java/openjdk8/bin/java', - 'smartos17': '/opt/local/java/openjdk8/bin/java', - 'smartos18': '/opt/local/java/openjdk8/bin/java', - 'smartos20': '/opt/local/java/openjdk8/bin/java', + 'smartos18': '/opt/local/java/openjdk11/bin/java', + 'smartos20': '/opt/local/java/openjdk11/bin/java', 'zos24': '/usr/lpp/java/J8.0_64/bin/java' }