From f47b7e6b48592d04638553a0cea2332d461016e2 Mon Sep 17 00:00:00 2001 From: Marc Fournier Date: Mon, 11 Feb 2019 22:04:54 +0100 Subject: [PATCH 01/26] add README --- README.md | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 README.md diff --git a/README.md b/README.md new file mode 100644 index 0000000..b19c19e --- /dev/null +++ b/README.md @@ -0,0 +1,32 @@ +Helper images for building collectd +=================================== + +Here is a collection of manifests used to build the Docker images hosted at: + + +There is one branch per distribution/architecture pair which collectd is tested +against. Common bits are stored in the master branch, and merged into the +distro branches when needed. + +Each Dockerfile contains a list of package names (mostly support libraries) to +install, and a list of plugins collectd *master* is expected to build based on +them. We want to stick to the official repositories, and only install packages +found there, to ensure collectd releases integrate smoothly in these +distributions. + +Travis-CI takes care of building these images and pushing them to +cloud.docker.com. NB: Debian/sid and Fedora/rawhide built are triggered once +per day (as these distributions change constantly). You'll find the build logs +there: + +The goal is to have the resulting images fit in the collectd project's CI, but +they are free to use for any other case. Only patches related to the CI will be +considered, though. + +Here's an example of how you could build collectd in an Ubuntu/Xenial +environment: +``` +git clone https://github.com/collectd/collectd +docker run -it --rm -v $PWD/collectd:/collectd -w /collectd collectd/ci:xenial_amd64 +./build.sh && ./configure && make && make check +``` From 5ad9214c060f247acc018da981aad14db25705ab Mon Sep 17 00:00:00 2001 From: Florian Forster Date: Tue, 1 Sep 2020 09:49:54 +0200 Subject: [PATCH 02/26] travis-ci.sh: Print an error if TRAVIS_BRANCH, DOCKER_PASSWORD, or DOCKER_LOGIN is undefined or empty. --- travis-ci.sh | 23 ++++++++++------------- 1 file changed, 10 insertions(+), 13 deletions(-) diff --git a/travis-ci.sh b/travis-ci.sh index 7c86b34..ebc5d09 100755 --- a/travis-ci.sh +++ b/travis-ci.sh @@ -1,18 +1,15 @@ -#!/bin/sh -e +#!/bin/bash -if [ "${TRAVIS_PULL_REQUEST}" != "false" ]; then +set -ex + +if [[ "${TRAVIS_PULL_REQUEST}" != "false" ]]; then echo "Not building docker images out of Pull Requests" exit 0 fi -if [ ! -z "${TRAVIS_BRANCH}" ]; then - SLUG="collectd/ci:${TRAVIS_BRANCH}" - docker build --pull -t "${SLUG}" . - docker inspect "${SLUG}" - docker history "${SLUG}" - echo "${DOCKER_PASSWORD}" | docker login --username "${DOCKER_LOGIN}" --password-stdin - docker push "${SLUG}" -else - echo 'no $TRAVIS_BRANCH defined, exiting' - exit 1 -fi +declare -r SLUG="collectd/ci:${TRAVIS_BRANCH:?}" +docker build --pull -t "${SLUG}" . +docker inspect "${SLUG}" +docker history "${SLUG}" +echo "${DOCKER_PASSWORD:?}" | docker login --username "${DOCKER_LOGIN:?}" --password-stdin +docker push "${SLUG}" From 498f3284632af166eeb7940156da36e9ce5c78bc Mon Sep 17 00:00:00 2001 From: Florian Forster Date: Mon, 14 Sep 2020 15:10:20 +0200 Subject: [PATCH 03/26] checks/check-built-plugins.sh: Improve check output. Particularly, cut the too verbose "ldd" output. --- checks/check-built-plugins.sh | 59 ++++++++++++++++++++--------------- 1 file changed, 33 insertions(+), 26 deletions(-) diff --git a/checks/check-built-plugins.sh b/checks/check-built-plugins.sh index 7d29a11..6f223e4 100755 --- a/checks/check-built-plugins.sh +++ b/checks/check-built-plugins.sh @@ -1,32 +1,39 @@ -#!/bin/sh -e +#!/bin/bash -echo "### Checking whether all known working plugins on this platform have been built ###" -STATUS=0 -for i in ${SUPPORTED_PLUGIN_LIST}; do - echo "$i plugin:" - if test -f "src/$i.c"; then - if test -f ."libs/${i}.so"; then - ldd ".libs/${i}.so" || STATUS=1 - else - ldd "src/.libs/${i}.so" || STATUS=1 - fi - else - echo "... doesn't exist in this version" - fi +set -e + +declare -A want +for p in ${SUPPORTED_PLUGIN_LIST}; do + want["${p}"]=1 done -echo "### Looking for any plugins previously unsupported on this platform ###" -for i in .libs/*.so src/libs/*.so; do - plugin="$(basename $i)" - [ "${plugin}" = '*.so' ] && continue - FOUND=0 - for j in ${SUPPORTED_PLUGIN_LIST}; do - [ "x${plugin}" = "x${j}.so" ] && FOUND=1 - done - if [ $FOUND -eq 0 ]; then - echo "found this new plugin: ${plugin}" - ldd "${i}" +declare -A got +for f in .libs/*.so; do + p="$(basename "${f}" .so)" + + if [[ -v want["${p}"] ]]; then + unset want["${p}"] + continue fi + + echo "p=${p}" + got["${p}"]=1 done -exit $STATUS +if [[ ${#got[@]} > 0 ]]; then + echo "## The following EXTRA plugins were built:" + echo "" + for p in "${!got[@]}"; do + echo " * ${p}" + done | sort + echo "" +fi + +if [[ ${#want[@]} > 0 ]]; then + echo "## The following expected plugins are MISSING:" + echo "" + for p in "${!want[@]}"; do + echo " * ${p}" + done | sort + exit 1 +fi From a5b9d38b9fe0d5e55840a1beb32f0d863c413179 Mon Sep 17 00:00:00 2001 From: Florian Forster Date: Mon, 14 Sep 2020 15:30:11 +0200 Subject: [PATCH 04/26] checks/check-built-plugins.sh: Remove left-over echo debugging. --- checks/check-built-plugins.sh | 1 - 1 file changed, 1 deletion(-) diff --git a/checks/check-built-plugins.sh b/checks/check-built-plugins.sh index 6f223e4..147050d 100755 --- a/checks/check-built-plugins.sh +++ b/checks/check-built-plugins.sh @@ -16,7 +16,6 @@ for f in .libs/*.so; do continue fi - echo "p=${p}" got["${p}"]=1 done From 2de5969f11b8c01a339d4f2f9811f9721bb266d4 Mon Sep 17 00:00:00 2001 From: Matthias Runge Date: Thu, 16 Sep 2021 11:41:51 +0200 Subject: [PATCH 05/26] Create docker-image.yml --- .github/workflows/docker-image.yml | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 .github/workflows/docker-image.yml diff --git a/.github/workflows/docker-image.yml b/.github/workflows/docker-image.yml new file mode 100644 index 0000000..8529334 --- /dev/null +++ b/.github/workflows/docker-image.yml @@ -0,0 +1,18 @@ +name: Docker Image CI + +on: + push: + branches: [ main ] + pull_request: + branches: [ main ] + +jobs: + + build: + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + - name: Build the Docker image + run: docker build . --file Dockerfile --tag my-image-name:$(date +%s) From 5753bcd714e78deb635b66fbbdbf02597433b56e Mon Sep 17 00:00:00 2001 From: Emma Foley Date: Fri, 17 Sep 2021 16:17:27 +0100 Subject: [PATCH 06/26] [gha] Add no-op jobs for each set of actions These will act as a template and allow new actions to be tested when changes are pushed to dev branches. --- .github/workflows/daily-jobs.yml | 25 ++++++++++++++++++ .github/workflows/docker-image.yml | 18 ------------- .github/workflows/merge-jobs.yml | 20 +++++++++++++++ .github/workflows/pr-jobs.yml | 16 ++++++++++++ .github/workflows/weekly-jobs.yml | 41 ++++++++++++++++++++++++++++++ 5 files changed, 102 insertions(+), 18 deletions(-) create mode 100644 .github/workflows/daily-jobs.yml delete mode 100644 .github/workflows/docker-image.yml create mode 100644 .github/workflows/merge-jobs.yml create mode 100644 .github/workflows/pr-jobs.yml create mode 100644 .github/workflows/weekly-jobs.yml diff --git a/.github/workflows/daily-jobs.yml b/.github/workflows/daily-jobs.yml new file mode 100644 index 0000000..74e83c8 --- /dev/null +++ b/.github/workflows/daily-jobs.yml @@ -0,0 +1,25 @@ +name: Daily container builds + +on: + # These push/pr options will be removed one they are proven to work (one PR/push ought to do it) + pull_request: + branches: main + push: + branches: main + schedule: + - cron: '0 0 * * *' + +jobs: + build: + + runs-on: ubuntu-latest + + strategy: + # Don't stop other in-progress jobs when one fails + fail-fast: false + + env: + SLUG: "collectd/ci:${{ matrix.branch }}" + + steps: + - run: echo "Eventually, this will build and push ${SLUG}" diff --git a/.github/workflows/docker-image.yml b/.github/workflows/docker-image.yml deleted file mode 100644 index 8529334..0000000 --- a/.github/workflows/docker-image.yml +++ /dev/null @@ -1,18 +0,0 @@ -name: Docker Image CI - -on: - push: - branches: [ main ] - pull_request: - branches: [ main ] - -jobs: - - build: - - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v2 - - name: Build the Docker image - run: docker build . --file Dockerfile --tag my-image-name:$(date +%s) diff --git a/.github/workflows/merge-jobs.yml b/.github/workflows/merge-jobs.yml new file mode 100644 index 0000000..b60075f --- /dev/null +++ b/.github/workflows/merge-jobs.yml @@ -0,0 +1,20 @@ +name: Merge jobs + +on: + push: + branches-ignore: + - main + # topic branches (e.g. fix/something) + - '**/**' + +jobs: + build_and_publish_container: + runs-on: ubuntu-latest + steps: + - name: Get branch name + run: | + export BRANCH="$(${{ github.ref }} | rev | cut -d '/' -f1 | rev ) + - run: + export SLUG="collectd/ci:${BRANCH}" + - run: | + echo "Eventually, this will build ${SLUG}, on merge to ${BRANCH}" diff --git a/.github/workflows/pr-jobs.yml b/.github/workflows/pr-jobs.yml new file mode 100644 index 0000000..75b3cd8 --- /dev/null +++ b/.github/workflows/pr-jobs.yml @@ -0,0 +1,16 @@ +name: PR jobs + +on: + pull_request: + branches-ignore: + - main + +jobs: + # Build and test container for each PR submitted to that branch + build_and_test_container: + + runs-on: ubuntu-latest + env: + SLUG: "collectd/ci:test" + steps: + - run: echo "Eventually, this will build and test the container for each PR" diff --git a/.github/workflows/weekly-jobs.yml b/.github/workflows/weekly-jobs.yml new file mode 100644 index 0000000..95f277e --- /dev/null +++ b/.github/workflows/weekly-jobs.yml @@ -0,0 +1,41 @@ +name: Weekly container builds for stable distro releases + +on: + # These push/pr options will be removed one they are proven to work (one PR/push ought to do it) + pull_request: + branches: main + push: + branches: main + schedule: + - cron: '0 0 * * 0' + +jobs: + build: + + runs-on: ubuntu-latest + + strategy: + # Don't stop other in-progress jobs when one fails + fail-fast: false + matrix: + branch: + # Debian + # Debian 10 + - buster_amd64 + # Debian 9 + - stretch_amd64 + # Debian 8 + - jessie_amd64 + # Ubuntu + # Ubuntu 16.04 + - xenial_amd64 + # Ubuntu 14.04 + - trusty_amd64 + # CentOS + - el7_x86_64 + + env: + SLUG: "collectd/ci:${{ matrix.branch }}" + + steps: + - run: echo "Eventually, this will build and push ${SLUG}" From ba81149fc4e56297b55a771c12d264518f6303f8 Mon Sep 17 00:00:00 2001 From: Emma Foley Date: Tue, 14 Sep 2021 12:46:01 +0100 Subject: [PATCH 07/26] [githubactions] Add a periodic jobs for contaienr builds This consist of two sets of jobs: * daily builds that build unstable/rolling distros * weekly job for stable distros Both jobs will: * Build each of the specified containers * Push the container images to dockerhub --- .github/workflows/daily-jobs.yml | 20 +++++++++++++++++++- .github/workflows/weekly-jobs.yml | 17 +++++++++++++++-- 2 files changed, 34 insertions(+), 3 deletions(-) diff --git a/.github/workflows/daily-jobs.yml b/.github/workflows/daily-jobs.yml index 74e83c8..6bcbd61 100644 --- a/.github/workflows/daily-jobs.yml +++ b/.github/workflows/daily-jobs.yml @@ -18,8 +18,26 @@ jobs: # Don't stop other in-progress jobs when one fails fail-fast: false + matrix: + branch: + - sid_amd64 + - fedora_rawhide_x86_64 + env: SLUG: "collectd/ci:${{ matrix.branch }}" steps: - - run: echo "Eventually, this will build and push ${SLUG}" + - uses: actions/checkout@v2 + with: + ref: ${{ matrix.branch }} + - name: Build container + run: + docker build --pull -t "${SLUG}" . + - run: docker inspect "${SLUG}" + - run: docker history "${SLUG}" + - name: Log into the container registry + uses: docker/login-action@v1 + with: + username: ${{ secrets.DOCKER_USERNAME }} + password: ${{ secrets.DOCKER_PASSWORD }} + - run: docker push "${SLUG}" diff --git a/.github/workflows/weekly-jobs.yml b/.github/workflows/weekly-jobs.yml index 95f277e..4c90caa 100644 --- a/.github/workflows/weekly-jobs.yml +++ b/.github/workflows/weekly-jobs.yml @@ -1,4 +1,4 @@ -name: Weekly container builds for stable distro releases +name: Weekly container builds on: # These push/pr options will be removed one they are proven to work (one PR/push ought to do it) @@ -38,4 +38,17 @@ jobs: SLUG: "collectd/ci:${{ matrix.branch }}" steps: - - run: echo "Eventually, this will build and push ${SLUG}" + - uses: actions/checkout@v2 + with: + ref: ${{ matrix.branch }} + - name: Build container + run: + docker build --pull -t "${SLUG}" . + - run: docker inspect "${SLUG}" + - run: docker history "${SLUG}" + - name: Log into the container registry + uses: docker/login-action@v1 + with: + username: ${{ secrets.DOCKER_USERNAME }} + password: ${{ secrets.DOCKER_PASSWORD }} + - run: docker push "${SLUG}" From 13f6c4c9d1c80daae796ef4316721f53668db42a Mon Sep 17 00:00:00 2001 From: Emma Foley Date: Tue, 21 Sep 2021 13:59:19 +0100 Subject: [PATCH 08/26] [githubactions] Add a job for PRs to container branches (#19) * [gha] Add no-op jobs for each set of actions These will act as a template and allow new actions to be tested when changes are pushed to dev branches. * [githubactions] Add a job for PRs to container branches Add a job that builds on each PR to a non-main branch (i.e. distro/flavor branches). The workflow will: * Build the container * Run the container * Try to compile collectd in the container to verify that it works This workflow does NOT publish the container. --- .github/workflows/pr-jobs.yml | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/.github/workflows/pr-jobs.yml b/.github/workflows/pr-jobs.yml index 75b3cd8..39287e8 100644 --- a/.github/workflows/pr-jobs.yml +++ b/.github/workflows/pr-jobs.yml @@ -13,4 +13,16 @@ jobs: env: SLUG: "collectd/ci:test" steps: - - run: echo "Eventually, this will build and test the container for each PR" + - uses: actions/checkout@v2 + - name: Build container + run: docker build -t "${SLUG}" . + - run: docker inspect "${SLUG}" + - name: Check out the latest verison of collectd + uses: actions/checkout@v2 + with: + repository: collectd/collectd + ref: main + path: ${{ github.workspace }}/collectd + - name: Make sure collectd builds on the container + run: | + docker run -v "${GITHUB_WORKSPACE}/collectd:/collectd" -w /collectd "${SLUG}" bash -c './build.sh && ./configure && make && make test' From 0cd3c0a2c2c9ad51eca3654900370b28d237260d Mon Sep 17 00:00:00 2001 From: Matthias Runge Date: Tue, 28 Sep 2021 10:59:22 +0200 Subject: [PATCH 09/26] Build Fedora 34 instead of rawhide for now (#24) Building rawhide in github actions fails for some strange reason. --- .github/workflows/daily-jobs.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/daily-jobs.yml b/.github/workflows/daily-jobs.yml index 6bcbd61..74a99aa 100644 --- a/.github/workflows/daily-jobs.yml +++ b/.github/workflows/daily-jobs.yml @@ -21,7 +21,7 @@ jobs: matrix: branch: - sid_amd64 - - fedora_rawhide_x86_64 + - fedora34_x86_64 env: SLUG: "collectd/ci:${{ matrix.branch }}" From 8a806ef548393a128a8278b0abc50d4e467ef36b Mon Sep 17 00:00:00 2001 From: Emma Foley Date: Tue, 28 Sep 2021 10:01:42 +0100 Subject: [PATCH 10/26] [githubactions] Add a merge job to build and publish containers (#20) The job will run when there's a push (i.e. PR merged) to any branch other than main. The job will: * Build the container * Publish the container image to dockerhub --- .github/workflows/merge-jobs.yml | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/.github/workflows/merge-jobs.yml b/.github/workflows/merge-jobs.yml index b60075f..840eaa8 100644 --- a/.github/workflows/merge-jobs.yml +++ b/.github/workflows/merge-jobs.yml @@ -11,10 +11,21 @@ jobs: build_and_publish_container: runs-on: ubuntu-latest steps: + - uses: actions/checkout@v2 - name: Get branch name run: | export BRANCH="$(${{ github.ref }} | rev | cut -d '/' -f1 | rev ) - run: export SLUG="collectd/ci:${BRANCH}" - - run: | - echo "Eventually, this will build ${SLUG}, on merge to ${BRANCH}" + - name: Build container + run: + docker build --pull -t "${SLUG}" . + - run: docker inspect "${SLUG}" + - run: docker history "${SLUG}" + - run: docker images + - name: Log into the container registry + uses: docker/login-action@v1 + with: + username: ${{ secrets.DOCKER_USERNAME }} + password: ${{ secrets.DOCKER_PASSWORD }} + - run: docker push "${SLUG}" From 7ddb5c4275dba006947a9813be7a6b23addb86fc Mon Sep 17 00:00:00 2001 From: Matthias Runge Date: Tue, 28 Sep 2021 11:21:10 +0200 Subject: [PATCH 11/26] Update weekly-jobs.yml Use Debian 11 (bullseye) and drop Debian 8 (Jessie) and Debian 9 (stretch), which are both out of support. --- .github/workflows/weekly-jobs.yml | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/.github/workflows/weekly-jobs.yml b/.github/workflows/weekly-jobs.yml index 4c90caa..29c9ac0 100644 --- a/.github/workflows/weekly-jobs.yml +++ b/.github/workflows/weekly-jobs.yml @@ -20,12 +20,10 @@ jobs: matrix: branch: # Debian + # Debian 11 + - bullseye_amd64 # Debian 10 - buster_amd64 - # Debian 9 - - stretch_amd64 - # Debian 8 - - jessie_amd64 # Ubuntu # Ubuntu 16.04 - xenial_amd64 From 26a876b659af64bf9c55056ed4fa88b4c8e0756a Mon Sep 17 00:00:00 2001 From: Matthias Runge Date: Thu, 30 Sep 2021 11:00:15 +0200 Subject: [PATCH 12/26] Add CentOS 8 weekly job (#26) --- .github/workflows/weekly-jobs.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/weekly-jobs.yml b/.github/workflows/weekly-jobs.yml index 29c9ac0..8beb7a7 100644 --- a/.github/workflows/weekly-jobs.yml +++ b/.github/workflows/weekly-jobs.yml @@ -31,6 +31,7 @@ jobs: - trusty_amd64 # CentOS - el7_x86_64 + - el8_x86_64 env: SLUG: "collectd/ci:${{ matrix.branch }}" From 686cce81f3404272018f139d767235d51a01e418 Mon Sep 17 00:00:00 2001 From: Emma Foley Date: Thu, 30 Sep 2021 10:22:47 +0100 Subject: [PATCH 13/26] [PR jobs] Update incorrect command (#34) Replace ``make test`` with ``make check`` --- .github/workflows/pr-jobs.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pr-jobs.yml b/.github/workflows/pr-jobs.yml index 39287e8..ae8fe52 100644 --- a/.github/workflows/pr-jobs.yml +++ b/.github/workflows/pr-jobs.yml @@ -25,4 +25,4 @@ jobs: path: ${{ github.workspace }}/collectd - name: Make sure collectd builds on the container run: | - docker run -v "${GITHUB_WORKSPACE}/collectd:/collectd" -w /collectd "${SLUG}" bash -c './build.sh && ./configure && make && make test' + docker run -v "${GITHUB_WORKSPACE}/collectd:/collectd" -w /collectd "${SLUG}" bash -c './build.sh && ./configure && make && make check' From 44066f30ac0f9f357638bcbc792a0bbb79902e11 Mon Sep 17 00:00:00 2001 From: Emma Foley Date: Thu, 30 Sep 2021 10:23:50 +0100 Subject: [PATCH 14/26] [gha][periodic] Remove other triggers from schedulled jobs (#23) Remove the push and pull_request triggers from periodic jobs These triggers were there for testing intially. --- .github/workflows/daily-jobs.yml | 5 ----- .github/workflows/weekly-jobs.yml | 5 ----- 2 files changed, 10 deletions(-) diff --git a/.github/workflows/daily-jobs.yml b/.github/workflows/daily-jobs.yml index 74a99aa..3b0e0f2 100644 --- a/.github/workflows/daily-jobs.yml +++ b/.github/workflows/daily-jobs.yml @@ -1,11 +1,6 @@ name: Daily container builds on: - # These push/pr options will be removed one they are proven to work (one PR/push ought to do it) - pull_request: - branches: main - push: - branches: main schedule: - cron: '0 0 * * *' diff --git a/.github/workflows/weekly-jobs.yml b/.github/workflows/weekly-jobs.yml index 8beb7a7..2752750 100644 --- a/.github/workflows/weekly-jobs.yml +++ b/.github/workflows/weekly-jobs.yml @@ -1,11 +1,6 @@ name: Weekly container builds on: - # These push/pr options will be removed one they are proven to work (one PR/push ought to do it) - pull_request: - branches: main - push: - branches: main schedule: - cron: '0 0 * * 0' From e5d343fef0e2f2fd1ac35165259ae0c84b5641dd Mon Sep 17 00:00:00 2001 From: Emma Foley Date: Thu, 30 Sep 2021 10:24:50 +0100 Subject: [PATCH 15/26] [weekly-jobs] Add Fedora 34 to weekly build (#37) --- .github/workflows/weekly-jobs.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/weekly-jobs.yml b/.github/workflows/weekly-jobs.yml index 2752750..fbdb156 100644 --- a/.github/workflows/weekly-jobs.yml +++ b/.github/workflows/weekly-jobs.yml @@ -24,6 +24,8 @@ jobs: - xenial_amd64 # Ubuntu 14.04 - trusty_amd64 + # Fedora + - fedora34_x86_64 # CentOS - el7_x86_64 - el8_x86_64 From a0a1a27331d4ed9f0351c36ea8c7fc7fabb6cccb Mon Sep 17 00:00:00 2001 From: Emma Foley Date: Wed, 6 Oct 2021 16:38:25 +0100 Subject: [PATCH 16/26] [gha][weekly] Add bionic_amd64 to the weekly container builds --- .github/workflows/weekly-jobs.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/weekly-jobs.yml b/.github/workflows/weekly-jobs.yml index fbdb156..6395e4f 100644 --- a/.github/workflows/weekly-jobs.yml +++ b/.github/workflows/weekly-jobs.yml @@ -20,6 +20,8 @@ jobs: # Debian 10 - buster_amd64 # Ubuntu + # Ubuntu 18.04 + - bionic_amd64 # Ubuntu 16.04 - xenial_amd64 # Ubuntu 14.04 From e4b1c92bb36f08f12a776a4bae696d72860c5d2e Mon Sep 17 00:00:00 2001 From: Emma Foley Date: Mon, 8 Nov 2021 16:12:20 +0000 Subject: [PATCH 17/26] [gha][weekly] Add focal_amd64 to the weekly container builds --- .github/workflows/weekly-jobs.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/weekly-jobs.yml b/.github/workflows/weekly-jobs.yml index 6395e4f..0f6ebfa 100644 --- a/.github/workflows/weekly-jobs.yml +++ b/.github/workflows/weekly-jobs.yml @@ -20,6 +20,8 @@ jobs: # Debian 10 - buster_amd64 # Ubuntu + # Ubuntu 20.04 + - focal_amd64 # Ubuntu 18.04 - bionic_amd64 # Ubuntu 16.04 From 58e255c2a4cd0db1536400955c5e5e4da92b7409 Mon Sep 17 00:00:00 2001 From: Emma Foley Date: Mon, 14 Feb 2022 21:27:03 +0000 Subject: [PATCH 18/26] [gha] Update triggers for on-merge action The on-merge action did not work, when collectd/ci-docker#55 was merged. Trigger has been updated, based on the example in [1]. [1] https://github.community/t/trigger-workflow-only-on-pull-request-merge/17359/4 --- .github/workflows/merge-jobs.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/merge-jobs.yml b/.github/workflows/merge-jobs.yml index 840eaa8..ce054b6 100644 --- a/.github/workflows/merge-jobs.yml +++ b/.github/workflows/merge-jobs.yml @@ -1,7 +1,8 @@ name: Merge jobs on: - push: + pull_request: + types: [closed] branches-ignore: - main # topic branches (e.g. fix/something) @@ -10,6 +11,7 @@ on: jobs: build_and_publish_container: runs-on: ubuntu-latest + if: github.event.pull_request.merged == true steps: - uses: actions/checkout@v2 - name: Get branch name From aad1d37c00982771807ea0470b117cb5245513b4 Mon Sep 17 00:00:00 2001 From: Emma Foley Date: Mon, 21 Feb 2022 18:09:13 +0000 Subject: [PATCH 19/26] [ci][pr-jobs] Add valgrind opts Add ``--errors-for-leak-kinds=definite`` valgrind opt so ``make check`` doesn't fail on possible memory leaks --- .github/workflows/pr-jobs.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/pr-jobs.yml b/.github/workflows/pr-jobs.yml index ae8fe52..7fba93b 100644 --- a/.github/workflows/pr-jobs.yml +++ b/.github/workflows/pr-jobs.yml @@ -12,6 +12,7 @@ jobs: runs-on: ubuntu-latest env: SLUG: "collectd/ci:test" + VALGRIND_OPTS: "--errors-for-leak-kinds=definite" steps: - uses: actions/checkout@v2 - name: Build container From 6df3239bb141f61b467d2a4226b7868f044409e5 Mon Sep 17 00:00:00 2001 From: Emma Foley Date: Thu, 28 Apr 2022 19:38:14 +0100 Subject: [PATCH 20/26] [gha][PR] Update the PR tests to split tests (#44) * [gha][PR] Update the PR tests to split tests This change splits the build and test stages into separate steps. The purpose of this is to make it easier to make a step as optional. This change is being added because some distros don't reliably pass the unit tests in the gate. A secondary benifit of this is that the jobs can be easily be extended later by adding additional steps, instead of adding the commands into a monolithic super step. Another benifit of this is better reporting, as it is easier to see what stage the tests fail on, and allow independant test steps to continue to run even if previous tests failed. * Update .github/workflows/pr-jobs.yml Co-authored-by: Matthias Runge Co-authored-by: Matthias Runge --- .github/workflows/pr-jobs.yml | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/.github/workflows/pr-jobs.yml b/.github/workflows/pr-jobs.yml index 7fba93b..763dc13 100644 --- a/.github/workflows/pr-jobs.yml +++ b/.github/workflows/pr-jobs.yml @@ -24,6 +24,13 @@ jobs: repository: collectd/collectd ref: main path: ${{ github.workspace }}/collectd + - name: Create the test container + run: | + docker run -itd --name collectd-pr-test -v "${GITHUB_WORKSPACE}/collectd:/collectd" -w /collectd "${SLUG}" - name: Make sure collectd builds on the container run: | - docker run -v "${GITHUB_WORKSPACE}/collectd:/collectd" -w /collectd "${SLUG}" bash -c './build.sh && ./configure && make && make check' + docker exec -w /collectd collectd-pr-test bash -c './build.sh && ./configure && make' + - name: Run collectd unit tests + continue-on-error: true + run: | + docker exec -w /collectd collectd-pr-test make check From bfce637035ae56267c9c2c404d39267d7de9c7ef Mon Sep 17 00:00:00 2001 From: Matthias Runge Date: Wed, 8 Jun 2022 15:59:38 +0200 Subject: [PATCH 21/26] Add newer fedora builds including rawhide This adds Fedora 35 and 36; Fedora 34 is out of support and will be dropped soon. --- .github/workflows/daily-jobs.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/daily-jobs.yml b/.github/workflows/daily-jobs.yml index 3b0e0f2..24a68cd 100644 --- a/.github/workflows/daily-jobs.yml +++ b/.github/workflows/daily-jobs.yml @@ -16,7 +16,10 @@ jobs: matrix: branch: - sid_amd64 - - fedora34_x86_64 + - fedora34_x86_64 + - fedora35_x86_64 + - fedora36_x86_64 + - fedora_rawhide_x86_64 env: SLUG: "collectd/ci:${{ matrix.branch }}" From c82d54a5f196db7c47e8bbc3d39d6c4146ef9347 Mon Sep 17 00:00:00 2001 From: Emma Foley Date: Thu, 9 Jun 2022 18:39:59 +0100 Subject: [PATCH 22/26] [gha] Add el9_x86_64 container to weekly builds --- .github/workflows/weekly-jobs.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/weekly-jobs.yml b/.github/workflows/weekly-jobs.yml index 0f6ebfa..2aefc41 100644 --- a/.github/workflows/weekly-jobs.yml +++ b/.github/workflows/weekly-jobs.yml @@ -33,6 +33,7 @@ jobs: # CentOS - el7_x86_64 - el8_x86_64 + - el9_x86_64 env: SLUG: "collectd/ci:${{ matrix.branch }}" From 379f4a765c5a07f85fb7a73645431f04fa69113d Mon Sep 17 00:00:00 2001 From: Emma Foley Date: Thu, 9 Jun 2022 14:43:08 +0100 Subject: [PATCH 23/26] [f24] Stop building fedora 24 daily --- .github/workflows/daily-jobs.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/daily-jobs.yml b/.github/workflows/daily-jobs.yml index 24a68cd..cecd0d8 100644 --- a/.github/workflows/daily-jobs.yml +++ b/.github/workflows/daily-jobs.yml @@ -16,7 +16,6 @@ jobs: matrix: branch: - sid_amd64 - - fedora34_x86_64 - fedora35_x86_64 - fedora36_x86_64 - fedora_rawhide_x86_64 From bf7860a67d1f9461e9fcf56bcefc9aaf8624bded Mon Sep 17 00:00:00 2001 From: Matthias Runge Date: Sun, 23 Apr 2023 16:00:17 +0200 Subject: [PATCH 24/26] Update releases for CI testing --- .github/workflows/daily-jobs.yml | 3 +-- .github/workflows/weekly-jobs.yml | 4 +--- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/.github/workflows/daily-jobs.yml b/.github/workflows/daily-jobs.yml index cecd0d8..70050d7 100644 --- a/.github/workflows/daily-jobs.yml +++ b/.github/workflows/daily-jobs.yml @@ -16,8 +16,7 @@ jobs: matrix: branch: - sid_amd64 - - fedora35_x86_64 - - fedora36_x86_64 + - fedora38_x86_64 - fedora_rawhide_x86_64 env: diff --git a/.github/workflows/weekly-jobs.yml b/.github/workflows/weekly-jobs.yml index 2aefc41..bda5012 100644 --- a/.github/workflows/weekly-jobs.yml +++ b/.github/workflows/weekly-jobs.yml @@ -29,10 +29,8 @@ jobs: # Ubuntu 14.04 - trusty_amd64 # Fedora - - fedora34_x86_64 + - fedora36_x86_64 # CentOS - - el7_x86_64 - - el8_x86_64 - el9_x86_64 env: From b840013cb9756a9d436a7cc21a905bc7a329785f Mon Sep 17 00:00:00 2001 From: Matthias Runge Date: Mon, 24 Apr 2023 08:29:37 +0200 Subject: [PATCH 25/26] Remove conflicting java package --- Dockerfile | 5 ----- 1 file changed, 5 deletions(-) diff --git a/Dockerfile b/Dockerfile index 97d24eb..01ac277 100644 --- a/Dockerfile +++ b/Dockerfile @@ -13,8 +13,6 @@ ENV EXTRA_PACKAGES="\ intel-cmt-cat-devel \ iproute-devel \ iptables-devel \ - java-latest-openjdk-devel \ - jpackage-utils \ libatasmart-devel \ libcap-devel \ libcurl-devel \ @@ -49,7 +47,6 @@ ENV EXTRA_PACKAGES="\ riemann-c-client-devel \ rrdtool-devel \ varnish-libs-devel \ - xen-devel \ xfsprogs-devel \ yajl-devel \ " @@ -100,7 +97,6 @@ ENV SUPPORTED_PLUGIN_LIST="\ iptables \ ipvs \ irq \ - java \ load \ log_logstash \ logfile \ @@ -190,7 +186,6 @@ ENV SUPPORTED_PLUGIN_LIST="\ write_riemann \ write_sensu \ write_tsdb \ - xencpu \ zfs_arc \ zookeeper \ " From d80d48988101febbfe21f01d9ab6b601c3f6d477 Mon Sep 17 00:00:00 2001 From: Matthias Runge Date: Mon, 24 Apr 2023 09:53:43 +0200 Subject: [PATCH 26/26] Change to f38 instead of rawhide Remove amqp for now --- Dockerfile | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 01ac277..dda0821 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM fedora:rawhide +FROM fedora:38 ADD redhat.sh /redhat.sh COPY /checks/*.sh /checks/ @@ -54,7 +54,6 @@ ENV EXTRA_PACKAGES="\ ENV SUPPORTED_PLUGIN_LIST="\ libcollectdclient \ aggregation \ - amqp \ apache \ apcups \ ascent \