From c6c1bec571bd0377813a89fdc02b0bc7c97c374b Mon Sep 17 00:00:00 2001 From: amanda Date: Mon, 26 Feb 2024 13:28:38 +0000 Subject: [PATCH 1/5] Remove bionic/el7 and add el9 --- .circleci/config.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index f74ddce..410611d 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -9,10 +9,10 @@ jobs: machine: image: "ubuntu-2004:current" working_directory: ~/StackStorm/st2chatops - parallelism: 4 + parallelism: 3 shell: /bin/bash --login environment: - DISTROS: bionic focal el7 el8 + DISTROS: focal el8 el9 ST2_PACKAGES_REPO: https://github.com/StackStorm/st2-packages ST2_TEST_ENVIRONMENT: https://github.com/StackStorm/st2-docker DEPLOY_PACKAGES: 1 @@ -122,7 +122,7 @@ jobs: - image: circleci/ruby:2.7 working_directory: ~/packages environment: - DISTROS: "bionic focal el7 el8" + DISTROS: "focal el8 el9" steps: - attach_workspace: at: /home/circleci From 2b9ce9bce4e7d5b6a988201dcf15e10487896a42 Mon Sep 17 00:00:00 2001 From: amanda Date: Mon, 26 Feb 2024 13:38:16 +0000 Subject: [PATCH 2/5] Add changelog --- .circleci/config.yml | 1 - CHANGELOG.rst | 3 +++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 410611d..e63cee8 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -38,7 +38,6 @@ jobs: docker-compose version nodejs -v jq --version - package_cloud version - run: name: Ensure Docker running command: 'sudo docker info >/dev/null 2>&1 || sudo service docker start; ' diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 1283d34..989822f 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -23,6 +23,9 @@ Changed Contributed by @lopf +* Added support for EL9. Removed support for EL7 and bionic. #187 + Contributed by @amanda11 + Removed ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * Remove skills-validator from npm-shrinkwrap.json From 612e8ad8433ffae4c37b592421602c0d00098ed8 Mon Sep 17 00:00:00 2001 From: amanda Date: Mon, 26 Feb 2024 14:30:45 +0000 Subject: [PATCH 3/5] try and fix ruby --- .circleci/config.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index e63cee8..6ce9ce1 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -7,7 +7,7 @@ version: 2 jobs: build: machine: - image: "ubuntu-2004:current" + image: "ubuntu-2204:2023.04.2" working_directory: ~/StackStorm/st2chatops parallelism: 3 shell: /bin/bash --login @@ -41,9 +41,9 @@ jobs: - run: name: Ensure Docker running command: 'sudo docker info >/dev/null 2>&1 || sudo service docker start; ' - - run: - name: Set up Ruby 2.0 - command: rvm use ruby-2.0.0-p645 --default + # - run: + # name: Set up Ruby 2.0 + # command: rvm use ruby-2.0.0-p645 --default - run: name: Get PackageCloud variables command: | From 79b51e029577c479dfeb5e0f2771d1c2bd935107 Mon Sep 17 00:00:00 2001 From: amanda Date: Mon, 26 Feb 2024 14:45:22 +0000 Subject: [PATCH 4/5] Add el9 to docker file --- docker-compose.yml | 20 ++++---------------- 1 file changed, 4 insertions(+), 16 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index d24c2fc..78a8374 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,10 +1,4 @@ # Packaging environments -bionic: - build: ./packagingenv/bionic - extends: - file: docker-compose.override.yml - service: suite - focal: build: ./packagingenv/focal extends: @@ -17,19 +11,13 @@ el8: file: docker-compose.override.yml service: suite -el7: - build: ./packagingenv/centos7 +el9: + build: ./packagingenv/rockylinux9 extends: file: docker-compose.override.yml service: suite # Testing environments -bionic-test: - build: ./testingenv/bionic - extends: - file: docker-compose.override.yml - service: suite-test - focal-test: build: ./testingenv/focal extends: @@ -42,8 +30,8 @@ el8-test: file: docker-compose.override.yml service: suite-test -el7-test: - build: ./testingenv/centos7 +el9-test: + build: ./testingenv/rockylinux9 extends: file: docker-compose.override.yml service: suite-test From 12fd3e3916074452b8007dfa81408c34481beed1 Mon Sep 17 00:00:00 2001 From: amanda Date: Mon, 26 Feb 2024 15:32:25 +0000 Subject: [PATCH 5/5] EL9 has to use nodejs 18 or above --- packagingenv/bionic/Dockerfile | 19 ------------- packagingenv/bionic/docker-entrypoint.sh | 19 ------------- packagingenv/centos7/Dockerfile | 12 -------- packagingenv/rockylinux9/Dockerfile | 21 ++++++++++++++ .../docker-entrypoint.sh | 0 testingenv/bionic/Dockerfile | 15 ---------- testingenv/bionic/docker-entrypoint.sh | 28 ------------------- .../{centos7 => rockylinux9}/Dockerfile | 2 +- .../docker-entrypoint.sh | 0 9 files changed, 22 insertions(+), 94 deletions(-) delete mode 100644 packagingenv/bionic/Dockerfile delete mode 100755 packagingenv/bionic/docker-entrypoint.sh delete mode 100755 packagingenv/centos7/Dockerfile create mode 100644 packagingenv/rockylinux9/Dockerfile rename packagingenv/{centos7 => rockylinux9}/docker-entrypoint.sh (100%) delete mode 100644 testingenv/bionic/Dockerfile delete mode 100755 testingenv/bionic/docker-entrypoint.sh rename testingenv/{centos7 => rockylinux9}/Dockerfile (92%) rename testingenv/{centos7 => rockylinux9}/docker-entrypoint.sh (100%) diff --git a/packagingenv/bionic/Dockerfile b/packagingenv/bionic/Dockerfile deleted file mode 100644 index a00822d..0000000 --- a/packagingenv/bionic/Dockerfile +++ /dev/null @@ -1,19 +0,0 @@ -FROM ubuntu:bionic - -# Install prerequisites -RUN apt-get update && \ - DEBIAN_FRONTEND=noninteractive apt-get -y install \ - build-essential curl gnupg devscripts debhelper dh-make git libicu-dev -RUN DEBIAN_FRONTEND=noninteractive apt-get -y install dh-systemd - - -# Add NodeSource repo -RUN curl -sL https://deb.nodesource.com/setup_10.x | bash - - -# Install node -RUN DEBIAN_FRONTEND=noninteractive apt-get -y install nodejs - -RUN apt-get clean - -COPY docker-entrypoint.sh /entrypoint.sh -ENTRYPOINT [ "/entrypoint.sh" ] diff --git a/packagingenv/bionic/docker-entrypoint.sh b/packagingenv/bionic/docker-entrypoint.sh deleted file mode 100755 index 6cd4c62..0000000 --- a/packagingenv/bionic/docker-entrypoint.sh +++ /dev/null @@ -1,19 +0,0 @@ -#!/bin/bash - -set -eu -set -o pipefail - -operation="${1:-build}" - -case "$operation" in -pull) - ;; -build) - make changelog - dpkg-buildpackage -b -uc -us - cp ../*.{deb,changes} $ARTIFACT_DIR - ;; -*) - [[ $# -gt 0 ]] && exec "$@" - ;; -esac diff --git a/packagingenv/centos7/Dockerfile b/packagingenv/centos7/Dockerfile deleted file mode 100755 index 4e33736..0000000 --- a/packagingenv/centos7/Dockerfile +++ /dev/null @@ -1,12 +0,0 @@ -FROM centos:7 - -RUN yum -y install gcc-c++ make git libicu-devel rpmdevtools - -# Add NodeSource repo -RUN curl --silent --location https://rpm.nodesource.com/setup_10.x | bash - - -# Install development tools -RUN yum -y install nodejs - -COPY docker-entrypoint.sh /entrypoint.sh -ENTRYPOINT [ "/entrypoint.sh" ] diff --git a/packagingenv/rockylinux9/Dockerfile b/packagingenv/rockylinux9/Dockerfile new file mode 100644 index 0000000..c6be79c --- /dev/null +++ b/packagingenv/rockylinux9/Dockerfile @@ -0,0 +1,21 @@ +FROM rockylinux:9 + +RUN yum -y install gcc-c++ make git libicu-devel rpmdevtools + +# Add NodeSource repo +#RUN curl --silent --location https://rpm.nodesource.com/setup_18.x | bash - + +# Install development tools +RUN yum -y module install nodejs:18 +# +# Install python3 for gyp +RUN yum -y install python3 + +# Upgrade gyp to a python3 compatible version +RUN npm install -g node-gyp@latest + +# Install development tools +RUN yum -y install nodejs + +COPY docker-entrypoint.sh /entrypoint.sh +ENTRYPOINT [ "/entrypoint.sh" ] diff --git a/packagingenv/centos7/docker-entrypoint.sh b/packagingenv/rockylinux9/docker-entrypoint.sh similarity index 100% rename from packagingenv/centos7/docker-entrypoint.sh rename to packagingenv/rockylinux9/docker-entrypoint.sh diff --git a/testingenv/bionic/Dockerfile b/testingenv/bionic/Dockerfile deleted file mode 100644 index 2936eb6..0000000 --- a/testingenv/bionic/Dockerfile +++ /dev/null @@ -1,15 +0,0 @@ -FROM ubuntu:bionic - -# Install prerequesties -RUN apt-get clean && apt-get update && \ - DEBIAN_FRONTEND=noninteractive apt-get -y install curl gnupg - -# Add NodeSource repo -RUN curl -sL https://deb.nodesource.com/setup_10.x | bash - - -# Install node -RUN apt-get update && \ - DEBIAN_FRONTEND=noninteractive apt-get -y install nodejs - -COPY docker-entrypoint.sh /entrypoint.sh -ENTRYPOINT [ "/entrypoint.sh" ] diff --git a/testingenv/bionic/docker-entrypoint.sh b/testingenv/bionic/docker-entrypoint.sh deleted file mode 100755 index e97db1c..0000000 --- a/testingenv/bionic/docker-entrypoint.sh +++ /dev/null @@ -1,28 +0,0 @@ -#!/bin/bash - -set -eu -set -o pipefail - -operation="${1:-test}" - -case "$operation" in -pull) - ;; -test) - apt-get install -y $ARTIFACT_DIR/*.deb - cd /opt/stackstorm/chatops - sed -i.bak -r "s/^# (export HUBOT_ADAPTER=slack)/\1/" st2chatops.env - sed -i.bak -r "s/^# (export HUBOT_SLACK_TOKEN.).*/\1$SLACK_TOKEN/" st2chatops.env - sed -i.bak -r "s/^(export ST2_AUTH_USERNAME.).*/\1$ST2_USERNAME/" st2chatops.env - sed -i.bak -r "s/^(export ST2_AUTH_PASSWORD.).*/\1$ST2_PASSWORD/" st2chatops.env - bin/hubot &> /tmp/hubot.log & - sleep 15 - cat /tmp/hubot.log - grep -rq "INFO Connected to Slack RTM" /tmp/hubot.log && \ - grep -rq "INFO [[:digit:]]\+ commands are loaded" /tmp/hubot.log - exit $? - ;; -*) - [[ $# -gt 0 ]] && exec "$@" - ;; -esac diff --git a/testingenv/centos7/Dockerfile b/testingenv/rockylinux9/Dockerfile similarity index 92% rename from testingenv/centos7/Dockerfile rename to testingenv/rockylinux9/Dockerfile index e627e4a..7c8bf43 100755 --- a/testingenv/centos7/Dockerfile +++ b/testingenv/rockylinux9/Dockerfile @@ -1,4 +1,4 @@ -FROM centos:7 +FROM rockylinux:9 # Add NodeSource repo RUN curl --silent --location https://rpm.nodesource.com/setup_10.x | bash - diff --git a/testingenv/centos7/docker-entrypoint.sh b/testingenv/rockylinux9/docker-entrypoint.sh similarity index 100% rename from testingenv/centos7/docker-entrypoint.sh rename to testingenv/rockylinux9/docker-entrypoint.sh