Skip to content

Commit

Permalink
Ci opstools fix (#85) (#87)
Browse files Browse the repository at this point in the history
* Fix centos-opstools repo in CI

* Avoid gpgcheck for centos repo

* ... also in repo file

* Update .github/workflows/integration.yml

Co-authored-by: Matthias Runge <[email protected]>

* Update .github/workflows/tests.yml

Co-authored-by: Matthias Runge <[email protected]>

Co-authored-by: Leif Madsen <[email protected]>
Co-authored-by: Matthias Runge <[email protected]>
(cherry picked from commit 04fc691)
  • Loading branch information
paramite authored Feb 3, 2022
1 parent e6c9935 commit 33d4121
Show file tree
Hide file tree
Showing 6 changed files with 27 additions and 30 deletions.
5 changes: 3 additions & 2 deletions .github/workflows/integration.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
name: Integration testing
env:
PROJECT_ROOT: /root/go/src/github.com/infrawatch/sg-core
OPSTOOLS_REPO: https://git.centos.org/rpms/centos-release-opstools/raw/c8s-sig-opstools/f/SOURCES/CentOS-OpsTools.repo

QDR_IMAGE: quay.io/interconnectedcloud/qdrouterd:1.15.0
QDR_VOLUME: "--volume=${{ github.workspace }}/ci/service_configs/qdr:/etc/qpid-dispatch:ro"
Expand Down Expand Up @@ -57,7 +58,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 \
docker run --name=sgbridge $BRIDGE_VOLUME -d -uroot --network host -e OPSTOOLS_REPO \
-e GITHUB_REF -e BRIDGE_SOCKET --workdir=$(dirname $BRIDGE_SOCKET) \
$TEST_IMAGE bash $PROJECT_ROOT/ci/integration/logging/run_bridge.sh
- name: Run rsyslog to produce log messages
Expand Down Expand Up @@ -119,7 +120,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 \
docker run --name=sgcore -d -uroot --network host $TEST_PORT $BRIDGE_VOLUME -e OPSTOOLS_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
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
name: CI
env:
PROJECT_ROOT: /root/go/src/github.com/infrawatch/sg-core
OPSTOOLS_REPO: https://git.centos.org/rpms/centos-release-opstools/raw/c8s-sig-opstools/f/SOURCES/CentOS-OpsTools.repo

LOKI_IMAGE: grafana/loki:2.1.0
LOKI_VOLUME: "--volume=${{ github.workspace }}/ci/service_configs/loki:/etc/loki:ro"
Expand Down Expand Up @@ -64,7 +65,7 @@ jobs:
docker logs loki
- name: Run sg-core unit test suite
run: |
docker run --name=testsuite -uroot --network host -e COVERALLS_REPO_TOKEN \
docker run --name=testsuite -uroot --network host -e COVERALLS_REPO_TOKEN -e OPSTOOLS_REPO \
--volume ${{ github.workspace }}:$PROJECT_ROOT:z --workdir $PROJECT_ROOT \
$TEST_IMAGE bash $PROJECT_ROOT/ci/unit/run_tests.sh
- name: Send coverage
Expand Down
19 changes: 16 additions & 3 deletions build/repos/opstools.repo
Original file line number Diff line number Diff line change
@@ -1,6 +1,19 @@
# 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=opstools
baseurl=http://mirror.centos.org/centos/8/opstools/$basearch/collectd-5/
name=CentOS-OpsTools - collectd
mirrorlist=http://mirrorlist.centos.org/?arch=$basearch&release=$releasever-stream&repo=opstools-collectd-5
#baseurl=http://mirror.centos.org/$contentdir/$releasever-stream/opstools/$basearch/collectd-5/
gpgcheck=0
enabled=1
module_hotfixes=1
skip_if_unavailable=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-SIG-OpsTools
10 changes: 2 additions & 8 deletions ci/integration/logging/run_bridge.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,8 @@
set -ex

# enable required repo(s)
cat > /etc/yum.repos.d/fedora-eln.repo <<EOF
[centos-opstools]
name=opstools
baseurl=http://mirror.centos.org/centos/8/opstools/\$basearch/collectd-5/
gpgcheck=0
enabled=1
module_hotfixes=1
EOF
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

dnf install -y git gcc make qpid-proton-c-devel

Expand Down
10 changes: 2 additions & 8 deletions ci/integration/logging/run_sg.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,8 @@
set -ex

# enable required repo(s)
cat > /etc/yum.repos.d/fedora-eln.repo <<EOF
[centos-opstools]
name=opstools
baseurl=http://mirror.centos.org/centos/8/opstools/\$basearch/collectd-5/
gpgcheck=0
enabled=1
module_hotfixes=1
EOF
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

dnf install -y git golang gcc make qpid-proton-c-devel

Expand Down
10 changes: 2 additions & 8 deletions ci/unit/run_tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,8 @@
set -ex

# enable required repo(s)
cat > /etc/yum.repos.d/fedora-eln.repo <<EOF
[centos-opstools]
name=opstools
baseurl=http://mirror.centos.org/centos/8/opstools/\$basearch/collectd-5/
gpgcheck=0
enabled=1
module_hotfixes=1
EOF
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

# 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
Expand Down

0 comments on commit 33d4121

Please sign in to comment.