diff --git a/.github/workflows/integration.yml b/.github/workflows/integration.yml index ad090ae3..5411a218 100644 --- a/.github/workflows/integration.yml +++ b/.github/workflows/integration.yml @@ -1,7 +1,7 @@ name: Integration testing env: PROJECT_ROOT: /root/go/src/github.com/infrawatch/sg-core - OPSTOOLS_REPO: https://raw.githubusercontent.com/infrawatch/sg-core/04dcb34edd2c234b378222d2f9a17e15c0dad936/build/repos/opstools.repo + OPENSTACK_REPO: https://trunk.rdoproject.org/centos9-caracal/delorean-deps.repo QDR_IMAGE: quay.io/interconnectedcloud/qdrouterd:1.17.0 QDR_VOLUME: "--volume=${{ github.workspace }}/ci/service_configs/qdr:/etc/qpid-dispatch:ro" @@ -10,7 +10,7 @@ env: BRIDGE_IMAGE: quay.io/infrawatch/sg-bridge:latest BRIDGE_VOLUME: "--volume=${{ github.workspace }}/tmp:/tmp/sg-bridge:z" - TEST_IMAGE: registry.access.redhat.com/ubi8 + TEST_IMAGE: registry.access.redhat.com/ubi9 TEST_PORT: "-p 3000:3000" on: [push, pull_request] @@ -22,7 +22,7 @@ jobs: env: QDR_CHANNEL: collectd/metrics BRIDGE_SOCKET: /tmp/sg-bridge/test-socket - PROMETHEUS_IMAGE: prom/prometheus:latest + PROMETHEUS_IMAGE: quay.io/prometheus/prometheus:latest steps: - name: Checkout code uses: actions/checkout@v4.1.3 @@ -74,7 +74,7 @@ jobs: if: steps.bridge_branch.outcome == 'success' run: | docker run --name=sgbridge --network host $BRIDGE_VOLUME -d -uroot \ - -e GITHUB_HEAD_REF -e BRIDGE_SOCKET -e QDR_CHANNEL -e OPSTOOLS_REPO \ + -e GITHUB_HEAD_REF -e BRIDGE_SOCKET -e QDR_CHANNEL -e OPENSTACK_REPO \ --workdir=$(dirname $BRIDGE_SOCKET) --volume ${{ github.workspace }}:$PROJECT_ROOT:z \ $TEST_IMAGE bash $PROJECT_ROOT/ci/integration/metrics/run_bridge.sh - name: Install collectd @@ -86,7 +86,7 @@ jobs: sudo collectd -C ci/integration/metrics/collectd/collectd.conf - name: Run sg-core to process metrics run: | - docker run --name=sgcore -d -uroot --network host $BRIDGE_VOLUME -e OPSTOOLS_REPO \ + docker run --name=sgcore -d -uroot --network host $BRIDGE_VOLUME -e OPENSTACK_REPO \ --volume ${{ github.workspace }}:$PROJECT_ROOT:z --workdir $PROJECT_ROOT \ $TEST_IMAGE bash $PROJECT_ROOT/ci/integration/metrics/collectd/run_sg.sh - name: Run Prometheus to store metrics @@ -118,7 +118,7 @@ jobs: env: QDR_CHANNEL: anycast/ceilometer/metering.sample BRIDGE_SOCKET: /tmp/sg-bridge/test-socket - PROMETHEUS_IMAGE: prom/prometheus:latest + PROMETHEUS_IMAGE: quay.io/prometheus/prometheus:latest steps: - name: Checkout code uses: actions/checkout@v4.1.3 @@ -170,7 +170,7 @@ jobs: if: steps.bridge_branch.outcome == 'success' run: | docker run --name=sgbridge --network host $BRIDGE_VOLUME -d -uroot \ - -e GITHUB_HEAD_REF -e BRIDGE_SOCKET -e QDR_CHANNEL -e OPSTOOLS_REPO \ + -e GITHUB_HEAD_REF -e BRIDGE_SOCKET -e QDR_CHANNEL -e OPENSTACK_REPO \ --workdir=$(dirname $BRIDGE_SOCKET) --volume ${{ github.workspace }}:$PROJECT_ROOT:z \ $TEST_IMAGE bash $PROJECT_ROOT/ci/integration/metrics/run_bridge.sh - name: Set Ceilometer pipelines to QDR output and restart notification agent @@ -186,7 +186,7 @@ jobs: sudo systemctl restart devstack@ceilometer-anotification.service - name: Run sg-core to process metrics run: | - docker run --name=sgcore -d -uroot --network host $BRIDGE_VOLUME -e OPSTOOLS_REPO \ + docker run --name=sgcore -d -uroot --network host $BRIDGE_VOLUME -e OPENSTACK_REPO \ --volume ${{ github.workspace }}:$PROJECT_ROOT:z --workdir $PROJECT_ROOT \ $TEST_IMAGE bash $PROJECT_ROOT/ci/integration/metrics/ceilometer/bridge/run_sg.sh - name: Run Prometheus to store metrics @@ -218,7 +218,7 @@ jobs: name: "[metrics] transport: socket(tcp); handler: ceilometer-metrics; application: prometheus" runs-on: ubuntu-22.04 env: - PROMETHEUS_IMAGE: prom/prometheus:latest + PROMETHEUS_IMAGE: quay.io/prometheus/prometheus:latest steps: - name: Checkout code uses: actions/checkout@v4.1.3 @@ -263,7 +263,7 @@ jobs: sudo systemctl restart devstack@ceilometer-anotification.service - name: Run sg-core to process metrics run: | - docker run --name=sgcore -d -uroot --network host $BRIDGE_VOLUME -e OPSTOOLS_REPO \ + docker run --name=sgcore -d -uroot --network host $BRIDGE_VOLUME -e OPENSTACK_REPO \ --volume ${{ github.workspace }}:$PROJECT_ROOT:z --workdir $PROJECT_ROOT \ $TEST_IMAGE bash $PROJECT_ROOT/ci/integration/metrics/ceilometer/tcp/run_sg.sh - name: Run Prometheus to store metrics @@ -333,7 +333,7 @@ jobs: - name: Start sg-bridge with same branch if: steps.bridge_branch.outcome == 'success' run: | - docker run --name=sgbridge $BRIDGE_VOLUME -d -uroot --network host -e OPSTOOLS_REPO \ + docker run --name=sgbridge $BRIDGE_VOLUME -d -uroot --network host -e OPENSTACK_REPO \ -e GITHUB_HEAD_REF -e BRIDGE_SOCKET --workdir=$(dirname $BRIDGE_SOCKET) --volume ${{ github.workspace }}:$PROJECT_ROOT:z \ $TEST_IMAGE bash $PROJECT_ROOT/ci/integration/logging/run_bridge.sh - name: Run rsyslog to produce log messages @@ -395,7 +395,7 @@ jobs: # run integration tests - name: Run sg-core to process log messages run: | - docker run --name=sgcore -d -uroot --network host $TEST_PORT $BRIDGE_VOLUME -e OPSTOOLS_REPO \ + docker run --name=sgcore -d -uroot --network host $TEST_PORT $BRIDGE_VOLUME -e OPENSTACK_REPO \ --volume ${{ github.workspace }}:$PROJECT_ROOT:z --workdir $PROJECT_ROOT \ $TEST_IMAGE bash $PROJECT_ROOT/ci/integration/logging/run_sg.sh - name: sg-core debug output diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index a3cef223..e0fab31c 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -1,7 +1,7 @@ name: CI env: PROJECT_ROOT: /root/go/src/github.com/infrawatch/sg-core - OPSTOOLS_REPO: https://raw.githubusercontent.com/infrawatch/sg-core/04dcb34edd2c234b378222d2f9a17e15c0dad936/build/repos/opstools.repo + OPENSTACK_REPO: https://trunk.rdoproject.org/centos9-caracal/delorean-deps.repo LOKI_IMAGE: quay.io/infrawatch/loki:2.4.2 LOKI_VOLUME: "--volume=${{ github.workspace }}/ci/service_configs/loki:/etc/loki:ro" @@ -10,7 +10,7 @@ env: ELASTIC_IMAGE: docker.elastic.co/elasticsearch/elasticsearch:7.10.2 ELASTIC_PORT: "-p 9200:9200 -p 9300:9300" - TEST_IMAGE: registry.access.redhat.com/ubi8 + TEST_IMAGE: registry.access.redhat.com/ubi9 COVERALLS_TOKEN: ${{ secrets.COVERALLS_TOKEN }} on: [push, pull_request] @@ -18,24 +18,24 @@ on: [push, pull_request] jobs: golangci: name: Linting - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 steps: - uses: actions/setup-go@v5 with: - go-version: '1.20' + go-version: '1.21.13' - uses: actions/checkout@v4.1.3 #- name: download libraries # run: go mod download - name: golangci-lint - uses: golangci/golangci-lint-action@v3 + uses: golangci/golangci-lint-action@v6.1.0 with: # Caching conflicts happen in GHA, so just disable for now skip-cache: true # Required: the version of golangci-lint is required and must be specified without patch version: we always use the latest patch version. - version: v1.51 + version: v1.59.1 unit-tests: name: Unit tests - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 steps: - name: Checkout code uses: actions/checkout@v4.1.3 @@ -63,7 +63,7 @@ jobs: docker logs loki - name: Run sg-core unit test suite run: | - docker run --name=testsuite -uroot --network host -e COVERALLS_REPO_TOKEN -e OPSTOOLS_REPO \ + docker run --name=testsuite -uroot --network host -e COVERALLS_REPO_TOKEN -e OPENSTACK_REPO \ --volume ${{ github.workspace }}:$PROJECT_ROOT:z --workdir $PROJECT_ROOT \ $TEST_IMAGE bash $PROJECT_ROOT/ci/unit/run_tests.sh - name: Send coverage @@ -72,12 +72,12 @@ jobs: path-to-profile: ${{ github.workspace }}/profile.cov image-build: name: Image build - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 steps: - uses: actions/checkout@v4.1.3 - uses: actions/setup-go@v5 with: - go-version: '1.20' + go-version: '1.21.13' - name: Verify image builds run: | docker build --tag infrawatch/sg-core:latest --file build/Dockerfile . diff --git a/.github/workflows/updates.yml b/.github/workflows/updates.yml index 7cad2c5a..406e227e 100644 --- a/.github/workflows/updates.yml +++ b/.github/workflows/updates.yml @@ -16,7 +16,7 @@ jobs: # (github.event.issue.author_association == 'CONTRIBUTOR') || # (github.event.issue.author_association == 'MEMBER') # ) - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 steps: - name: update PR with coveralls badge uses: actions/github-script@v7.0.1 diff --git a/.golangci.yaml b/.golangci.yaml index d53d3f01..d4533893 100644 --- a/.golangci.yaml +++ b/.golangci.yaml @@ -1,11 +1,3 @@ -run: - skip-dirs: - - plugins/transport/dummy-alertmanager - - plugins/transport/dummy-events - - plugins/transport/dummy-metrics - - plugins/transport/dummy-logs - - plugins/application/print - - devenv issues: exclude-rules: - linters: @@ -21,12 +13,26 @@ issues: - staticcheck # https://staticcheck.io/docs/checks#SA4008 (The variable in the loop condition never changes, are you incrementing the wrong variable?) text: "SA4008:" - + # Don't warn on unused parameters. + # Parameter names are useful; replacing them with '_' is undesirable. + - linters: [revive] + text: 'unused-parameter: parameter \S+ seems to be unused, consider removing or renaming it as _' + - linters: [revive] + text: 'redefines-builtin-id: redefinition of the built-in function new' + - linters: [revive] + text: 'redefines-builtin-id: redefinition of the built-in function len' + exclude-dirs: + - plugins/transport/dummy-alertmanager + - plugins/transport/dummy-events + - plugins/transport/dummy-metrics + - plugins/transport/dummy-logs + - plugins/application/print + - devenv linters: disable-all: true enable: - bodyclose - - depguard + # - depguard - dogsled - dupl - errcheck diff --git a/build/Dockerfile b/build/Dockerfile index c11c13b9..5dc9a706 100644 --- a/build/Dockerfile +++ b/build/Dockerfile @@ -1,5 +1,5 @@ # --- build smart gateway --- -FROM registry.access.redhat.com/ubi8:latest AS builder +FROM registry.access.redhat.com/ubi9:latest AS builder ENV GOPATH=/go ENV D=/go/src/github.com/infrawatch/sg-core @@ -7,13 +7,13 @@ WORKDIR $D COPY . $D/ # dependencies for qpid-proton-c -COPY build/repos/opstools.repo /etc/yum.repos.d/opstools.repo +COPY build/repos/centos9-caracal.repo /etc/yum.repos.d/centos9-caracal.repo RUN dnf install golang git qpid-proton-c-devel -y --setopt=tsflags=nodocs -RUN go install golang.org/dl/go1.20@latest && /go/bin/go1.20 download && PRODUCTION_BUILD=false CONTAINER_BUILD=true GOCMD=/go/bin/go1.20 ./build.sh +RUN go install golang.org/dl/go1.21.13@latest && /go/bin/go1.21.13 download && PRODUCTION_BUILD=false CONTAINER_BUILD=true GOCMD=/go/bin/go1.21.13 ./build.sh # --- end build, create smart gateway layer --- -FROM registry.access.redhat.com/ubi8-minimal:latest +FROM registry.access.redhat.com/ubi9-minimal:latest LABEL io.k8s.display-name="Smart Gateway" \ io.k8s.description="A component of the Service Telemetry Framework on the server side that ingests data from AMQP 1.x and provides a metrics scrape endpoint for Prometheus, and forwards events to ElasticSearch" \ diff --git a/build/repos/centos9-caracal.repo b/build/repos/centos9-caracal.repo new file mode 100644 index 00000000..f46eff60 --- /dev/null +++ b/build/repos/centos9-caracal.repo @@ -0,0 +1,18 @@ +# CentOS 9 OpenStack repos + +# Please see https://trunk.rdoproject.org/ and +# https://trunk.rdoproject.org/centos9-caracal/report.html for more information + +[delorean-caracal-testing] +name=dlrn-caracal-testing +baseurl=https://trunk.rdoproject.org/centos9-caracal/deps/latest/ +enabled=1 +gpgcheck=0 +module_hotfixes=1 + +[centos9-opstools] +name=centos9-opstools +baseurl=http://mirror.stream.centos.org/SIGs/9-stream/opstools/$basearch/collectd-5/ +enabled=1 +gpgcheck=0 +module_hotfixes=1 diff --git a/build/repos/opstools.repo b/build/repos/opstools.repo deleted file mode 100644 index 2d95a92d..00000000 --- a/build/repos/opstools.repo +++ /dev/null @@ -1,19 +0,0 @@ -# CentOS-OpsTools.repo -# -# Please see http://wiki.centos.org/SpecialInterestGroup/OpsTools for more -# information - -[centos-opstools-testing] -name=CentOS-OpsTools - testing repo -baseurl=https://buildlogs.centos.org/centos/$releasever-stream/opstools/$basearch/collectd-5/ -gpgcheck=0 -enabled=0 - -[centos-opstools] -name=CentOS-OpsTools - collectd -#mirrorlist=http://mirrorlist.centos.org/?arch=$basearch&release=$releasever-stream&repo=opstools-collectd-5 -baseurl=http://vault.centos.org/$releasever-stream/opstools/$basearch/collectd-5/ -gpgcheck=0 -enabled=1 -skip_if_unavailable=1 -gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-SIG-OpsTools diff --git a/ci/integration/logging/run_bridge.sh b/ci/integration/logging/run_bridge.sh index fcd734f3..92915dab 100644 --- a/ci/integration/logging/run_bridge.sh +++ b/ci/integration/logging/run_bridge.sh @@ -1,12 +1,11 @@ #!/bin/env bash -# CI script for UBI8 job +# CI script for UBI9 job # purpose: spawn sg-bridge for message bus connection set -ex # enable required repo(s) -curl -o /etc/yum.repos.d/CentOS-OpsTools.repo $OPSTOOLS_REPO -sed -i 's/gpgcheck=1/gpgcheck=0/g' /etc/yum.repos.d/CentOS-OpsTools.repo +curl -o /etc/yum.repos.d/centos9-caracal.repo $OPENSTACK_REPO dnf install -y git gcc make qpid-proton-c-devel redhat-rpm-config diff --git a/ci/integration/logging/run_rsyslog.sh b/ci/integration/logging/run_rsyslog.sh index fcca70b8..f25e062d 100644 --- a/ci/integration/logging/run_rsyslog.sh +++ b/ci/integration/logging/run_rsyslog.sh @@ -1,5 +1,5 @@ #!/bin/env bash -# CI script for UBI8 job +# CI script for UBI9 job # purpose: spawn rsyslog with omamqp1 plugin and simulate log records creation set -ex diff --git a/ci/integration/logging/run_sg.sh b/ci/integration/logging/run_sg.sh index eb23fe19..1df293d2 100644 --- a/ci/integration/logging/run_sg.sh +++ b/ci/integration/logging/run_sg.sh @@ -1,26 +1,22 @@ #!/bin/env bash -# CI script for UBI8 job +# CI script for UBI9 job # purpose: spawn sg-core to process messages sent by rsyslog set -ex # enable required repo(s) -curl -o /etc/yum.repos.d/CentOS-OpsTools.repo $OPSTOOLS_REPO -sed -i 's/gpgcheck=1/gpgcheck=0/g' /etc/yum.repos.d/CentOS-OpsTools.repo -# Update to use the vault mirror since Centos 8s is EOL -sed -i 's/^#baseurl.*$/baseurl=http:\/\/vault.centos.org\/$releasever-stream\/opstools\/$basearch\/collectd-5/g' /etc/yum.repos.d/CentOS-OpsTools.repo -sed -i 's/^mirror/#mirror/g' /etc/yum.repos.d/CentOS-OpsTools.repo +curl -o /etc/yum.repos.d/centos9-caracal.repo $OPENSTACK_REPO dnf install -y git golang gcc make qpid-proton-c-devel export GOBIN=$GOPATH/bin export PATH=$PATH:$GOBIN -go install golang.org/dl/go1.20@latest -go1.20 download +go install golang.org/dl/go1.21.13@latest +go1.21.13 download # install sg-core and start sg-core mkdir -p /usr/lib64/sg-core -PLUGIN_DIR=/usr/lib64/sg-core/ GOCMD=go1.20 BUILD_ARGS=-buildvcs=false ./build.sh +PLUGIN_DIR=/usr/lib64/sg-core/ GOCMD=go1.21.13 BUILD_ARGS=-buildvcs=false ./build.sh ./sg-core -config ./ci/integration/logging/sg_config.yaml diff --git a/ci/integration/logging/run_validation.sh b/ci/integration/logging/run_validation.sh index 20eb2811..43de5f48 100644 --- a/ci/integration/logging/run_validation.sh +++ b/ci/integration/logging/run_validation.sh @@ -1,5 +1,5 @@ #!/bin/env bash -# CI script for UBI8 job +# CI script for UBI9 job # purpose: verify the expected logging data is saved in supported storage types diff --git a/ci/integration/metrics/ceilometer/bridge/run_sg.sh b/ci/integration/metrics/ceilometer/bridge/run_sg.sh index 747d3362..1b2c86a5 100644 --- a/ci/integration/metrics/ceilometer/bridge/run_sg.sh +++ b/ci/integration/metrics/ceilometer/bridge/run_sg.sh @@ -1,23 +1,22 @@ #!/bin/env bash -# CI script for UBI8 job +# CI script for UBI9 job # purpose: spawn sg-core to process messages sent by rsyslog set -ex # enable required repo(s) -curl -o /etc/yum.repos.d/CentOS-OpsTools.repo $OPSTOOLS_REPO -sed -i 's/gpgcheck=1/gpgcheck=0/g' /etc/yum.repos.d/CentOS-OpsTools.repo +curl -o /etc/yum.repos.d/centos9-caracal.repo $OPENSTACK_REPO dnf install -y git golang gcc make qpid-proton-c-devel export GOBIN=$GOPATH/bin export PATH=$PATH:$GOBIN -go install golang.org/dl/go1.20@latest -go1.20 download +go install golang.org/dl/go1.21.13@latest +go1.21.13 download # install sg-core and start sg-core mkdir -p /usr/lib64/sg-core -PLUGIN_DIR=/usr/lib64/sg-core/ GOCMD=go1.20 BUILD_ARGS=-buildvcs=false ./build.sh +PLUGIN_DIR=/usr/lib64/sg-core/ GOCMD=go1.21.13 BUILD_ARGS=-buildvcs=false ./build.sh ./sg-core -config ./ci/integration/metrics/ceilometer/bridge/sg_config.yaml diff --git a/ci/integration/metrics/ceilometer/run_validation.sh b/ci/integration/metrics/ceilometer/run_validation.sh index 0c9b5724..5bdd3295 100644 --- a/ci/integration/metrics/ceilometer/run_validation.sh +++ b/ci/integration/metrics/ceilometer/run_validation.sh @@ -1,5 +1,5 @@ #!/bin/env bash -# CI script for UBI8 job +# CI script for UBI9 job # purpose: verify the expected metric data is scraped by Prometheus set -ex diff --git a/ci/integration/metrics/ceilometer/tcp/run_sg.sh b/ci/integration/metrics/ceilometer/tcp/run_sg.sh index 1ef16839..2958b5ed 100644 --- a/ci/integration/metrics/ceilometer/tcp/run_sg.sh +++ b/ci/integration/metrics/ceilometer/tcp/run_sg.sh @@ -1,23 +1,23 @@ #!/bin/env bash -# CI script for UBI8 job +# CI script for UBI9 job # purpose: spawn sg-core to process messages sent by rsyslog set -ex # enable required repo(s) -curl -o /etc/yum.repos.d/CentOS-OpsTools.repo $OPSTOOLS_REPO -sed -i 's/gpgcheck=1/gpgcheck=0/g' /etc/yum.repos.d/CentOS-OpsTools.repo +curl -o /etc/yum.repos.d/centos9-caracal.repo $OPENSTACK_REPO +sed -i 's/gpgcheck=1/gpgcheck=0/g' /etc/yum.repos.d/centos9-caracal.repo dnf install -y git golang gcc make qpid-proton-c-devel export GOBIN=$GOPATH/bin export PATH=$PATH:$GOBIN -go install golang.org/dl/go1.20@latest -go1.20 download +go install golang.org/dl/go1.21.13@latest +go1.21.13 download # install sg-core and start sg-core mkdir -p /usr/lib64/sg-core -PLUGIN_DIR=/usr/lib64/sg-core/ GOCMD=go1.20 BUILD_ARGS=-buildvcs=false ./build.sh +PLUGIN_DIR=/usr/lib64/sg-core/ GOCMD=go1.21.13 BUILD_ARGS=-buildvcs=false ./build.sh ./sg-core -config ./ci/integration/metrics/ceilometer/tcp/sg_config.yaml diff --git a/ci/integration/metrics/collectd/run_sg.sh b/ci/integration/metrics/collectd/run_sg.sh index ea1cd4cc..c1b0b0ef 100644 --- a/ci/integration/metrics/collectd/run_sg.sh +++ b/ci/integration/metrics/collectd/run_sg.sh @@ -1,23 +1,22 @@ #!/bin/env bash -# CI script for UBI8 job +# CI script for UBI9 job # purpose: spawn sg-core to process messages sent by rsyslog set -ex # enable required repo(s) -curl -o /etc/yum.repos.d/CentOS-OpsTools.repo $OPSTOOLS_REPO -sed -i 's/gpgcheck=1/gpgcheck=0/g' /etc/yum.repos.d/CentOS-OpsTools.repo +curl -o /etc/yum.repos.d/centos9-caracal.repo $OPENSTACK_REPO dnf install -y git golang gcc make qpid-proton-c-devel export GOBIN=$GOPATH/bin export PATH=$PATH:$GOBIN -go install golang.org/dl/go1.20@latest -go1.20 download +go install golang.org/dl/go1.21.13@latest +go1.21.13 download # install sg-core and start sg-core mkdir -p /usr/lib64/sg-core -PLUGIN_DIR=/usr/lib64/sg-core/ GOCMD=go1.20 BUILD_ARGS=-buildvcs=false ./build.sh +PLUGIN_DIR=/usr/lib64/sg-core/ GOCMD=go1.21.13 BUILD_ARGS=-buildvcs=false ./build.sh ./sg-core -config ./ci/integration/metrics/collectd/sg_config.yaml diff --git a/ci/integration/metrics/collectd/run_validation.sh b/ci/integration/metrics/collectd/run_validation.sh index d13ccc21..7e0bbc8c 100644 --- a/ci/integration/metrics/collectd/run_validation.sh +++ b/ci/integration/metrics/collectd/run_validation.sh @@ -1,5 +1,5 @@ #!/bin/env bash -# CI script for UBI8 job +# CI script for UBI9 job # purpose: verify the expected metric data is scraped by Prometheus set -ex diff --git a/ci/integration/metrics/run_bridge.sh b/ci/integration/metrics/run_bridge.sh index e8c94efc..5aeeecb1 100644 --- a/ci/integration/metrics/run_bridge.sh +++ b/ci/integration/metrics/run_bridge.sh @@ -1,5 +1,5 @@ #!/bin/env bash -# CI script for UBI8 job +# CI script for UBI9 job # purpose: spawn sg-bridge for message bus connection set -ex @@ -7,8 +7,7 @@ set -ex CHANNEL=$QDR_CHANNEL # enable required repo(s) -curl -o /etc/yum.repos.d/CentOS-OpsTools.repo $OPSTOOLS_REPO -sed -i 's/gpgcheck=1/gpgcheck=0/g' /etc/yum.repos.d/CentOS-OpsTools.repo +curl -o /etc/yum.repos.d/centos9-caracal.repo $OPENSTACK_REPO dnf install -y git gcc make qpid-proton-c-devel redhat-rpm-config diff --git a/ci/unit/run_tests.sh b/ci/unit/run_tests.sh index 83a4c92e..e92cfb6f 100644 --- a/ci/unit/run_tests.sh +++ b/ci/unit/run_tests.sh @@ -1,12 +1,11 @@ #!/bin/env bash -# CI script for CentOS8 job -# purpose: runt unit test suite and submit code coverage +# CI script for CentOS9 job +# purpose: run unit test suite and submit code coverage set -ex # enable required repo(s) -curl -o /etc/yum.repos.d/CentOS-OpsTools.repo $OPSTOOLS_REPO -sed -i 's/gpgcheck=1/gpgcheck=0/g' /etc/yum.repos.d/CentOS-OpsTools.repo +curl -o /etc/yum.repos.d/centos9-caracal.repo $OPENSTACK_REPO # without glibc-langpack-en locale setting in CentOS8 is broken without this package yum install -y git golang gcc make glibc-langpack-en qpid-proton-c-devel @@ -14,8 +13,8 @@ yum install -y git golang gcc make glibc-langpack-en qpid-proton-c-devel export GOBIN=$GOPATH/bin export PATH=$PATH:$GOBIN -go install golang.org/dl/go1.20@latest -go1.20 download +go install golang.org/dl/go1.21.13@latest +go1.21.13 download -go1.20 test -v -coverprofile=profile.cov ./... +go1.21.13 test -v -coverprofile=profile.cov ./... diff --git a/go.mod b/go.mod index d42be7bc..c55d4901 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,6 @@ module github.com/infrawatch/sg-core -go 1.20 +go 1.21.13 require ( collectd.org v0.5.0 diff --git a/plugins/application/elasticsearch/pkg/lib/client_test.go b/plugins/application/elasticsearch/pkg/lib/client_test.go index 628a9091..d7506a8f 100644 --- a/plugins/application/elasticsearch/pkg/lib/client_test.go +++ b/plugins/application/elasticsearch/pkg/lib/client_test.go @@ -73,7 +73,7 @@ jqo9oA+Nf0x2skN5IRDaRbG1pJiQNgMWfvTfhJFIpLhLm+vEVmiPD3XoWhAnYErw 7f5lcspAI9sun4veId/ox9eGbrz9ldw46grPy/Zkflk2eFTUStME1Pt8GAXEF/pb /5f2IAPbX29zG1UGfS5YmNLLLQYZl/oFaR3ZKNAyvklectylEjmM -----END RSA PRIVATE KEY----- -` +` // #nosec G101 testCa = `-----BEGIN CERTIFICATE----- MIIGCTCCA/GgAwIBAgIUWMjYXk9MYDUih4QmKOnWOkS1Q8gwDQYJKoZIhvcNAQEL BQAwgZMxCzAJBgNVBAYTAkN6MRAwDgYDVQQIDAdCcmVjbGF2MRAwDgYDVQQHDAdN