From 20e53e7005acde8b43af0fdd1598f9a0a0844ae3 Mon Sep 17 00:00:00 2001 From: Alexander Todorov Date: Sun, 5 Jan 2025 15:39:20 +0200 Subject: [PATCH] Start using Node.js v22 inside container upgrade from v16 --- .github/workflows/coverity_scan.yml | 5 +++++ .github/workflows/lint.yml | 6 ++++++ .github/workflows/sanity.yml | 13 +++++++++++++ .github/workflows/security.yml | 6 ++++++ .github/workflows/testing.yml | 28 ++++++++++++++++++++++++++++ Dockerfile.buildroot | 3 ++- 6 files changed, 60 insertions(+), 1 deletion(-) diff --git a/.github/workflows/coverity_scan.yml b/.github/workflows/coverity_scan.yml index c608314f24..58f1b66952 100644 --- a/.github/workflows/coverity_scan.yml +++ b/.github/workflows/coverity_scan.yml @@ -21,6 +21,11 @@ jobs: with: python-version: 3.11 + - name: Setup Node.js + uses: actions/setup-node@v4 + with: + node-version: 22 + - name: Install depenencies run: | sudo apt-get update diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 934dbfaa6e..091de5b5ff 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -140,6 +140,12 @@ jobs: steps: - uses: actions/checkout@v4 + + - name: Setup Node.js + uses: actions/setup-node@v4 + with: + node-version: 22 + - name: Run eslint run: | cd tcms/ diff --git a/.github/workflows/sanity.yml b/.github/workflows/sanity.yml index 61122bc1fa..fd2d31f337 100644 --- a/.github/workflows/sanity.yml +++ b/.github/workflows/sanity.yml @@ -34,10 +34,17 @@ jobs: steps: - uses: actions/checkout@v4 + - name: Set up Python ${{ matrix.python-version }} uses: actions/setup-python@v5 with: python-version: ${{ matrix.python-version }} + + - name: Setup Node.js + uses: actions/setup-node@v4 + with: + node-version: 22 + - name: test-for-missing-migrations run: | pip install -r requirements/devel.txt @@ -54,11 +61,17 @@ jobs: steps: - uses: actions/checkout@v4 + - name: Set up Python ${{ matrix.python-version }} uses: actions/setup-python@v5 with: python-version: ${{ matrix.python-version }} + - name: Setup Node.js + uses: actions/setup-node@v4 + with: + node-version: 22 + - name: Create database run: | docker compose -f docker-compose.postgres pull db diff --git a/.github/workflows/security.yml b/.github/workflows/security.yml index 0db244816e..ddf37ecf29 100644 --- a/.github/workflows/security.yml +++ b/.github/workflows/security.yml @@ -71,6 +71,12 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 + + - name: Setup Node.js + uses: actions/setup-node@v4 + with: + node-version: 22 + - name: npm audit run: | pushd tcms/ diff --git a/.github/workflows/testing.yml b/.github/workflows/testing.yml index fcc32af2ff..52e07137ae 100644 --- a/.github/workflows/testing.yml +++ b/.github/workflows/testing.yml @@ -18,11 +18,17 @@ jobs: steps: - uses: actions/checkout@v4 + - name: Set up Python ${{ matrix.python-version }} uses: actions/setup-python@v5 with: python-version: ${{ matrix.python-version }} + - name: Setup Node.js + uses: actions/setup-node@v4 + with: + node-version: 22 + - name: Configure ~/.tcms.conf for ${{ matrix.kiwitcms-url }} run: | echo "[tcms]" > ~/.tcms.conf @@ -86,6 +92,11 @@ jobs: with: python-version: ${{ matrix.python-version }} + - name: Setup Node.js + uses: actions/setup-node@v4 + with: + node-version: 22 + - name: Install Python dependencies run: | sudo apt-get update @@ -124,6 +135,11 @@ jobs: with: python-version: ${{ matrix.python-version }} + - name: Setup Node.js + uses: actions/setup-node@v4 + with: + node-version: 22 + - name: Execute tests run: | sudo apt-get update @@ -159,11 +175,17 @@ jobs: steps: - uses: actions/checkout@v4 + - name: Set up Python ${{ matrix.python-version }} uses: actions/setup-python@v5 with: python-version: ${{ matrix.python-version }} + - name: Setup Node.js + uses: actions/setup-node@v4 + with: + node-version: 22 + - name: Create database run: | docker compose pull db @@ -207,11 +229,17 @@ jobs: steps: - uses: actions/checkout@v4 + - name: Set up Python ${{ matrix.python-version }} uses: actions/setup-python@v5 with: python-version: ${{ matrix.python-version }} + - name: Setup Node.js + uses: actions/setup-node@v4 + with: + node-version: 22 + - name: Create database run: | docker compose -f docker-compose.postgres pull db diff --git a/Dockerfile.buildroot b/Dockerfile.buildroot index cedc3e863b..163f6f969e 100644 --- a/Dockerfile.buildroot +++ b/Dockerfile.buildroot @@ -3,7 +3,8 @@ # checkov:skip=CKV_DOCKER_7:Ensure the base image uses a non latest version tag FROM registry.access.redhat.com/ubi9-minimal -RUN microdnf -y --nodocs install python3.11-devel mariadb-connector-c-devel tar gzip make \ +RUN microdnf -y module enable nodejs:22 && \ + microdnf -y --nodocs install python3.11-devel mariadb-connector-c-devel tar gzip make \ postgresql-devel libffi-devel gcc gettext npm unzip which rust cargo findutils \ libjpeg-turbo-devel && \ microdnf -y --nodocs update && \