Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
steps:
- uses: actions/setup-go@v5
with:
go-version: '1.21.13'
go-version: '1.24.11'
- uses: actions/checkout@v4.1.3
#- name: download libraries
# run: go mod download
Expand All @@ -32,7 +32,7 @@ jobs:
# 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.59.1
version: v1.64.2
unit-tests:
name: Unit tests
runs-on: ubuntu-latest
Expand Down Expand Up @@ -77,7 +77,7 @@ jobs:
- uses: actions/checkout@v4.1.3
- uses: actions/setup-go@v5
with:
go-version: '1.21.13'
go-version: '1.24.11'
- name: Verify image builds
run: |
docker build --tag infrawatch/sg-core:latest --file build/Dockerfile .
Expand Down
27 changes: 20 additions & 7 deletions .github/workflows/updates.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,18 +17,31 @@ jobs:
# (github.event.issue.author_association == 'MEMBER')
# )
runs-on: ubuntu-latest
permissions:
pull-requests: write
issues: write
steps:
- name: update PR with coveralls badge
uses: actions/github-script@v7.0.1
continue-on-error: true
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
var BRANCH_NAME = process.env.BRANCH_NAME;
github.rest.issues.createComment({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
body: `[![Coverage Status](https://coveralls.io/repos/github/${context.repo.owner}/${context.repo.repo}/badge.svg?branch=${BRANCH_NAME})](https://coveralls.io/github/${context.repo.owner}/${context.repo.repo}?branch=${BRANCH_NAME})`
})
const branchName = process.env.BRANCH_NAME;
if (!branchName) {
console.log("No branch name found, skipping badge update.");
return;
}

try {
await github.rest.issues.createComment({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
body: `[![Coverage Status](https://coveralls.io/repos/github/${context.repo.owner}/${context.repo.repo}/badge.svg?branch=${branchName})](https://coveralls.io/github/${context.repo.owner}/${context.repo.repo}?branch=${branchName})`
});
} catch (error) {
console.log("Could not post comment: ", error.message);
}
env:
BRANCH_NAME: ${{ github.event.pull_request.head.ref }}
4 changes: 2 additions & 2 deletions .golangci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ linters:
- dupl
- errcheck
# - exhaustive
- exportloopref
- copyloopvar
# - gochecknoinits
- goconst
- gocritic
Expand All @@ -61,5 +61,5 @@ linters:
- unconvert
# NOTE: not all application plugins use ability to emit internal events through
# passed bus function in it's constructor.
#- unparam
# - unparam
# - whitespace
2 changes: 1 addition & 1 deletion build/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ COPY . $D/
COPY build/repos/opstools.repo /etc/yum.repos.d/CentOS-OpsTools.repo

RUN dnf install golang git qpid-proton-c-devel -y --setopt=tsflags=nodocs
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
RUN go install golang.org/dl/go1.24.11@latest && /go/bin/go1.24.11 download && PRODUCTION_BUILD=false CONTAINER_BUILD=true GOCMD=/go/bin/go1.24.11 ./build.sh

# --- end build, create smart gateway layer ---
FROM registry.access.redhat.com/ubi9-minimal:latest
Expand Down
6 changes: 3 additions & 3 deletions ci/integration/logging/run_sg.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@ 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.21.13@latest
go1.21.13 download
go install golang.org/dl/go1.24.11@latest
go1.24.11 download

# install sg-core and start sg-core
mkdir -p /usr/lib64/sg-core
PLUGIN_DIR=/usr/lib64/sg-core/ GOCMD=go1.21.13 BUILD_ARGS=-buildvcs=false ./build.sh
PLUGIN_DIR=/usr/lib64/sg-core/ GOCMD=go1.24.11 BUILD_ARGS=-buildvcs=false ./build.sh

./sg-core -config ./ci/integration/logging/sg_config.yaml
6 changes: 3 additions & 3 deletions ci/integration/metrics/ceilometer/bridge/run_sg.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@ 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.21.13@latest
go1.21.13 download
go install golang.org/dl/go1.24.11@latest
go1.24.11 download

# install sg-core and start sg-core
mkdir -p /usr/lib64/sg-core
PLUGIN_DIR=/usr/lib64/sg-core/ GOCMD=go1.21.13 BUILD_ARGS=-buildvcs=false ./build.sh
PLUGIN_DIR=/usr/lib64/sg-core/ GOCMD=go1.24.11 BUILD_ARGS=-buildvcs=false ./build.sh

./sg-core -config ./ci/integration/metrics/ceilometer/bridge/sg_config.yaml
6 changes: 3 additions & 3 deletions ci/integration/metrics/ceilometer/tcp/run_sg.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@ 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.21.13@latest
go1.21.13 download
go install golang.org/dl/go1.24.11@latest
go1.24.11 download

# install sg-core and start sg-core
mkdir -p /usr/lib64/sg-core
PLUGIN_DIR=/usr/lib64/sg-core/ GOCMD=go1.21.13 BUILD_ARGS=-buildvcs=false ./build.sh
PLUGIN_DIR=/usr/lib64/sg-core/ GOCMD=go1.24.11 BUILD_ARGS=-buildvcs=false ./build.sh

./sg-core -config ./ci/integration/metrics/ceilometer/tcp/sg_config.yaml
6 changes: 3 additions & 3 deletions ci/integration/metrics/collectd/run_sg.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@ 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.21.13@latest
go1.21.13 download
go install golang.org/dl/go1.24.11@latest
go1.24.11 download

# install sg-core and start sg-core
mkdir -p /usr/lib64/sg-core
PLUGIN_DIR=/usr/lib64/sg-core/ GOCMD=go1.21.13 BUILD_ARGS=-buildvcs=false ./build.sh
PLUGIN_DIR=/usr/lib64/sg-core/ GOCMD=go1.24.11 BUILD_ARGS=-buildvcs=false ./build.sh

./sg-core -config ./ci/integration/metrics/collectd/sg_config.yaml
2 changes: 1 addition & 1 deletion ci/integration/metrics/local.conf
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ RABBIT_PASSWORD=$ADMIN_PASSWORD
SERVICE_PASSWORD=$ADMIN_PASSWORD
REDIS_PASSWORD=$ADMIN_PASSWORD

enable_plugin ceilometer https://opendev.org/openstack/ceilometer.git
enable_plugin ceilometer https://opendev.org/openstack/ceilometer.git stable/2024.2
CEILOMETER_BACKEND=none
CEILOMETER_PIPELINE_INTERVAL=60
enable_service ceilometer-acompute ceilometer-acentral ceilometer-anotification
Expand Down
6 changes: 3 additions & 3 deletions ci/unit/run_tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,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.21.13@latest
go1.21.13 download
go install golang.org/dl/go1.24.11@latest
go1.24.11 download


go1.21.13 test -v -coverprofile=profile.cov ./...
go1.24.11 test -v -coverprofile=profile.cov ./...
Loading
Loading