From 5eb8b25d04249220aea0726e0dd9706c213f107e Mon Sep 17 00:00:00 2001 From: Craig Comstock Date: Wed, 19 Nov 2025 08:52:52 -0600 Subject: [PATCH 1/3] Tidy up ci/setup.sh based on shellcheck linter Ticket: none Changelog: none --- ci/setup.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci/setup.sh b/ci/setup.sh index c90bc52c3..c13e35959 100755 --- a/ci/setup.sh +++ b/ci/setup.sh @@ -1,6 +1,6 @@ +#!/bin/sh # setup build host on ubuntu 22 set -ex -PREFIX=/var/cfengine # Github Actions provides machines with various packages installed, # what confuses our build system into thinking that it's an RPM distro. From 24ecb6e0fbda26b9e0ddb35f257adfca5d1534bc Mon Sep 17 00:00:00 2001 From: Craig Comstock Date: Wed, 19 Nov 2025 08:53:37 -0600 Subject: [PATCH 2/3] In CI scripts, nodesource.com is often flaky, instead check if sufficient node version is already present Especially in github we have seend deb.nodesource.com not work repeatedly. The image we currently use on github includes a sufficient node, v20.19.5 so no need to install something else there. https://github.com/actions/runner-images/blob/ubuntu22/20251112.150/images/ubuntu/Ubuntu2204-Readme.md Ticket: ENT-13521 Changelog: none --- ci/setup.sh | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) diff --git a/ci/setup.sh b/ci/setup.sh index c13e35959..6b1142707 100755 --- a/ci/setup.sh +++ b/ci/setup.sh @@ -40,8 +40,19 @@ sudo apt-get -qy install bison flex binutils build-essential fakeroot ntp \ sudo apt-get -qq purge apache* "postgresql*" redis* # packages needed for installing Mission portal dependencies -# remove any nodejs or node- packages currently in place -sudo apt-get remove -qy 'nodejs*' 'node-*' -# replace with exact version we want -wget -O - https://deb.nodesource.com/setup_20.x | sudo -E bash - -sudo apt-get install -qy nodejs + +MINIMUM_NODE_VERSION=20 +echo "Check for at least $MINIMUM_NODE_VERSION node version" +if command -v node; then + # vMAJOR.MINOR.PATCH + _major=$(node --version | cut -dv -f2 | cut -d. -f1) + if [ "$_major" -lt "$MINIMUM_NODE_VERSION" ]; then + echo "We need at least node version $MINIMUM_NODE_VERSION and found $_major. Will attempt to install from nodesource" + + # remove any nodejs or node- packages currently in place + sudo apt-get remove -qy 'nodejs*' 'node-*' + # replace with exact version we want + wget -O - https://deb.nodesource.com/setup_20.x | sudo -E bash - + sudo apt-get install -qy nodejs + fi +fi From ac4b655770280a201f9623788cc084e51c4e64c7 Mon Sep 17 00:00:00 2001 From: Craig Comstock Date: Wed, 19 Nov 2025 09:02:47 -0600 Subject: [PATCH 3/3] test the change in buildscripts by adding a workflow we do not want --- .github/workflows/craig.yml | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 .github/workflows/craig.yml diff --git a/.github/workflows/craig.yml b/.github/workflows/craig.yml new file mode 100644 index 000000000..6b07dadc3 --- /dev/null +++ b/.github/workflows/craig.yml @@ -0,0 +1,11 @@ +name: craigs check +on: + pull_request: + +jobs: + dts: + secrets: inherit + uses: ./.github/workflows/deployment-tests.yml + permissions: + contents: read + pull-requests: read