Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump golang to 1.21 #133

Closed
wants to merge 3 commits into from
Closed
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,12 +22,12 @@ jobs:
steps:
- uses: actions/setup-go@v5
with:
go-version: '1.20'
go-version: '1.21'
- 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@v5.1.0
with:
# Caching conflicts happen in GHA, so just disable for now
skip-cache: true
Expand Down Expand Up @@ -77,7 +77,7 @@ jobs:
- uses: actions/checkout@v4.1.3
- uses: actions/setup-go@v5
with:
go-version: '1.20'
go-version: '1.21'
- name: Verify image builds
run: |
docker build --tag infrawatch/sg-core:latest --file build/Dockerfile .
Expand Down
12 changes: 6 additions & 6 deletions build/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
# --- 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
ENV SGCORE_DIR=/go/src/github.com/infrawatch/sg-core

WORKDIR $D
COPY . $D/
WORKDIR $SGCORE_DIR
COPY . $SGCORE_DIR/

# dependencies for qpid-proton-c
COPY build/repos/opstools.repo /etc/yum.repos.d/opstools.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.0@latest && /go/bin/go1.21.0 download && PRODUCTION_BUILD=false CONTAINER_BUILD=true GOCMD=/go/bin/go1.21.0 ./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" \
Expand Down
27 changes: 13 additions & 14 deletions build/repos/opstools.repo
Original file line number Diff line number Diff line change
@@ -1,19 +1,18 @@
# CentOS-OpsTools.repo
# CentOS 9 OpenStack repos
#
# Please see http://wiki.centos.org/SpecialInterestGroup/OpsTools for more
# information
# Please see https://trunk.rdoproject.org/ and
# https://trunk.rdoproject.org/centos9-caracal/report.html for more information

[centos-opstools-testing]
name=CentOS-OpsTools - testing repo
baseurl=https://buildlogs.centos.org/centos/$releasever-stream/opstools/$basearch/collectd-5/
[delorean-caracal-testing]
name=dlrn-caracal-testing
baseurl=https://trunk.rdoproject.org/centos9-caracal/deps/latest/
enabled=1
gpgcheck=0
enabled=0
module_hotfixes=1

[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
[centos9-opstools]
name=centos9-opstools
baseurl=http://mirror.stream.centos.org/SIGs/9-stream/opstools/$basearch/collectd-5/
enabled=1
skip_if_unavailable=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-SIG-OpsTools
gpgcheck=0
module_hotfixes=1
6 changes: 3 additions & 3 deletions ci/integration/logging/run_sg.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,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.20@latest
go1.20 download
go install golang.org/dl/go1.21@latest
go1.21 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 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 @@ -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.20@latest
go1.20 download
go install golang.org/dl/go1.21@latest
go1.21 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 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.20@latest
go1.20 download
go install golang.org/dl/go1.21@latest
go1.21 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 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 @@ -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.20@latest
go1.20 download
go install golang.org/dl/go1.21@latest
go1.21 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 BUILD_ARGS=-buildvcs=false ./build.sh

./sg-core -config ./ci/integration/metrics/collectd/sg_config.yaml
6 changes: 3 additions & 3 deletions ci/unit/run_tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,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@latest
go1.21 download


go1.20 test -v -coverprofile=profile.cov ./...
go1.21 test -v -coverprofile=profile.cov ./...
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/infrawatch/sg-core

go 1.20
go 1.21

require (
collectd.org v0.5.0
Expand Down
Loading