Skip to content

Commit e824154

Browse files
authored
Merge pull request #189 from StackStorm/node20
Node 20 and EL9
2 parents b829119 + 9b101c8 commit e824154

File tree

18 files changed

+136
-40
lines changed

18 files changed

+136
-40
lines changed

.circleci/config.yml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,10 @@ jobs:
99
machine:
1010
image: "ubuntu-2204:2023.04.2"
1111
working_directory: ~/StackStorm/st2chatops
12-
parallelism: 2
12+
parallelism: 3
1313
shell: /bin/bash --login
1414
environment:
15-
DISTROS: focal el8
15+
DISTROS: focal el8 el9
1616
ST2_PACKAGES_REPO: https://github.com/StackStorm/st2-packages
1717
ST2_TEST_ENVIRONMENT: https://github.com/StackStorm/st2-docker
1818
DEPLOY_PACKAGES: 1
@@ -29,14 +29,15 @@ jobs:
2929
echo "Cloning ${ST2_DOCKER_BRANCH:-DEPRECATED/all-in-one} branch of st2-docker"
3030
git clone --branch ${ST2_DOCKER_BRANCH:-DEPRECATED/all-in-one} --depth 1 ${ST2_TEST_ENVIRONMENT} ~/st2-docker
3131
make -C ~/st2-docker env
32-
sudo apt-get update -qq && sudo apt-get install -y rpm jq nodejs net-tools
32+
sudo apt-get update -qq && sudo apt-get install -y rpm jq nodejs net-tools npm
3333
gem install package_cloud
3434
sudo curl -L "https://github.com/docker/compose/releases/download/1.29.2/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
3535
sudo chmod +x /usr/local/bin/docker-compose
3636
rm -rf node_modules
3737
# print versions
3838
docker-compose version
3939
nodejs -v
40+
npm --version
4041
jq --version
4142
- run:
4243
name: Ensure Docker running
@@ -121,7 +122,7 @@ jobs:
121122
- image: circleci/ruby:2.7
122123
working_directory: ~/packages
123124
environment:
124-
DISTROS: "focal el8"
125+
DISTROS: "focal el8 el9"
125126
steps:
126127
- attach_workspace:
127128
at: /home/circleci

CHANGELOG.rst

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@ Added
99
* A changelog file.
1010

1111
Contributed by @nzlosh
12+
* EL9 support and node20 support
13+
14+
Contributed by @amanda11
1215

1316
Fixed
1417
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Dockerfile

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
1-
FROM node:14.17-slim
1+
FROM node:20.11.1-slim
22

33
RUN apt update && apt install --yes \
4-
python \
4+
python3 \
5+
npm \
56
libicu-dev \
67
libxml2-dev \
78
libexpat1-dev \
@@ -11,6 +12,7 @@ RUN apt update && apt install --yes \
1112

1213
COPY . /app
1314
WORKDIR /app
15+
RUN npm install npm@6 -g
1416
RUN npm install --production && npm cache verify
1517

1618
RUN apt remove --yes \

debian/control

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ Vcs-Browser: https://github.com/stackstorm/st2chatops
1111
Package: st2chatops
1212
Architecture: any
1313
Pre-Depends: dpkg (>= 1.16.16)
14-
Depends: nodejs (>= 10.0.0), nodejs (< 15.0.0)
14+
Depends: nodejs (>= 20.0.0)
1515
Description: St2Chatops - StackStorm ChatOps.
1616
Package providing StackStorm ChatOps functionality: bundled, tested and ready to use Hubot
1717
with hubot-stackstorm plugin and additional chat adapters

dev/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM node:10.15-slim
1+
FROM node:20.11.1-slim
22

33
RUN apt-get update && apt-get install -y \
44
python \

docker-compose.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,12 @@ el8:
1111
file: docker-compose.override.yml
1212
service: suite
1313

14+
el9:
15+
build: ./packagingenv/rockylinux9
16+
extends:
17+
file: docker-compose.override.yml
18+
service: suite
19+
1420
# Testing environments
1521
focal-test:
1622
build: ./testingenv/focal
@@ -24,3 +30,9 @@ el8-test:
2430
file: docker-compose.override.yml
2531
service: suite-test
2632

33+
el9-test:
34+
build: ./testingenv/rockylinux9
35+
extends:
36+
file: docker-compose.override.yml
37+
service: suite-test
38+

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
"botbuilder": "^3.30.0",
1010
"coffee-register": "1.0.0",
1111
"coffee-script": "1.12.7",
12+
"coffeescript": "1.12.7",
1213
"hubot": "^3.5.0",
1314
"hubot-botframework": "git+https://github.com/microsoft/BotFramework-Hubot.git#01d5be9",
1415
"hubot-diagnostics": "0.0.2",
@@ -25,6 +26,6 @@
2526
"hubot-xmpp": "^0.2.6"
2627
},
2728
"engines": {
28-
"node": ">=10.0 <=14.0"
29+
"node": ">=20.0"
2930
}
3031
}

packagingenv/Dockerfile.template

Lines changed: 16 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -4,43 +4,48 @@ FROM {{ dist }}:{{ version }}
44

55
RUN yum -y install gcc-c++ make git libicu-devel rpmdevtools
66

7-
# Add NodeSource repo
8-
RUN curl --silent --location https://rpm.nodesource.com/setup_10.x | bash -
9-
10-
{%- if version in ('centos8', 'rockylinux8') %}
7+
{%- if version in ('centos9', 'rockylinux9') %}
8+
RUN yum -y install systemd-rpm-macros
9+
{% endif %}
1110

12-
# Install development tools
13-
RUN yum -y module install nodejs:10
11+
# Install node
12+
RUN yum -y module install nodejs:20
1413

1514
# Install python3 for gyp
1615
RUN yum -y install python3
1716

1817
# Upgrade gyp to a python3 compatible version
1918
RUN npm install -g node-gyp@latest
2019

21-
{%- endif %}
20+
# Downgrade npm
21+
RUN npm install -g npm@6
2222

23-
# Install development tools
24-
RUN yum -y install nodejs
23+
# Install node
24+
RUN curl https://raw.githubusercontent.com/creationix/nvm/master/install.sh | bash && \
25+
source ~/.bashrc && \
26+
nvm install 20.8.1 && \
27+
node -v && npm -v
2528

2629
{% else -%}
2730

2831
# Install prerequisites
2932
RUN apt-get update && \
3033
DEBIAN_FRONTEND=noninteractive apt-get -y install \
31-
build-essential curl gnupg devscripts debhelper dh-make git libicu-dev
34+
build-essential curl gnupg devscripts debhelper dh-make git libicu-dev curl
3235

3336
{%- if version in ('focal') %}
3437
RUN DEBIAN_FRONTEND=noninteractive apt-get -y install dh-systemd
3538
{% endif %}
3639

3740
# Add NodeSource repo
38-
RUN curl -sL https://deb.nodesource.com/setup_10.x | bash -
41+
RUN curl -sL https://deb.nodesource.com/setup_20.x | bash -
3942

4043
# Install node
4144
RUN DEBIAN_FRONTEND=noninteractive apt-get -y install nodejs
4245

4346
RUN apt-get clean
47+
RUN npm install -g npm@6
48+
4449

4550
{% endif -%}
4651

packagingenv/focal/Dockerfile

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,17 +3,18 @@ FROM ubuntu:focal
33
# Install prerequisites
44
RUN apt-get update && \
55
DEBIAN_FRONTEND=noninteractive apt-get -y install \
6-
build-essential curl gnupg devscripts debhelper dh-make git libicu-dev
6+
build-essential curl gnupg devscripts debhelper dh-make git libicu-dev curl
77
RUN DEBIAN_FRONTEND=noninteractive apt-get -y install dh-systemd
88

9-
109
# Add NodeSource repo
11-
RUN curl -sL https://deb.nodesource.com/setup_10.x | bash -
10+
RUN curl -sL https://deb.nodesource.com/setup_20.x | bash -
1211

1312
# Install node
1413
RUN DEBIAN_FRONTEND=noninteractive apt-get -y install nodejs
1514

1615
RUN apt-get clean
16+
RUN npm install -g npm@6
17+
1718

1819
COPY docker-entrypoint.sh /entrypoint.sh
1920
ENTRYPOINT [ "/entrypoint.sh" ]

packagingenv/rockylinux8/Dockerfile

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,20 +2,17 @@ FROM rockylinux:8
22

33
RUN yum -y install gcc-c++ make git libicu-devel rpmdevtools
44

5-
# Add NodeSource repo
6-
RUN curl --silent --location https://rpm.nodesource.com/setup_10.x | bash -
7-
8-
# Install development tools
9-
RUN yum -y module install nodejs:10
5+
# Install node
6+
RUN yum -y module install nodejs:20
107

118
# Install python3 for gyp
129
RUN yum -y install python3
1310

1411
# Upgrade gyp to a python3 compatible version
1512
RUN npm install -g node-gyp@latest
1613

17-
# Install development tools
18-
RUN yum -y install nodejs
14+
# Downgrade npm
15+
RUN npm install -g npm@6
1916

2017
COPY docker-entrypoint.sh /entrypoint.sh
2118
ENTRYPOINT [ "/entrypoint.sh" ]

0 commit comments

Comments
 (0)