From fad55947ca0973ad70d74a1f8f569b9c1d94e500 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Fri, 29 May 2026 22:55:56 +0000 Subject: [PATCH 01/10] Initial plan From 1ec30cc8a39e8301dbf0b729d99715db08af36b0 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Fri, 29 May 2026 22:58:51 +0000 Subject: [PATCH 02/10] Migrate CI from Travis to GitHub Actions - Add .github/workflows/unit-tests.yml calling shared reusable workflow - Replace Travis badge in README.md with GitHub Actions badge - Delete .travis.yml --- .github/workflows/unit-tests.yml | 17 +++++++++++++++++ .travis.yml | 2 -- README.md | 2 +- 3 files changed, 18 insertions(+), 3 deletions(-) create mode 100644 .github/workflows/unit-tests.yml delete mode 100644 .travis.yml diff --git a/.github/workflows/unit-tests.yml b/.github/workflows/unit-tests.yml new file mode 100644 index 00000000..aa66de32 --- /dev/null +++ b/.github/workflows/unit-tests.yml @@ -0,0 +1,17 @@ +name: Unit Tests + +on: + push: + pull_request: + branches: + - main + workflow_dispatch: + +jobs: + tests: + uses: logstash-plugins/.ci/.github/workflows/unit-tests.yml@1.x + concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: ${{ github.ref != 'refs/heads/main' }} + with: + timeout-minutes: 60 diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index a50fc739..00000000 --- a/.travis.yml +++ /dev/null @@ -1,2 +0,0 @@ -import: -- logstash-plugins/.ci:travis/travis.yml@1.x \ No newline at end of file diff --git a/README.md b/README.md index 6c74816b..f5842130 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # Logstash Plugin -[![Travis Build Status](https://travis-ci.com/logstash-plugins/logstash-input-beats.svg)](https://travis-ci.com/logstash-plugins/logstash-input-beats) +[![Unit Tests](https://github.com/logstash-plugins/logstash-input-beats/actions/workflows/unit-tests.yml/badge.svg)](https://github.com/logstash-plugins/logstash-input-beats/actions/workflows/unit-tests.yml) This is a plugin for [Logstash](https://github.com/elastic/logstash). From 507bc75ded7879edd7c05819d60be00f1a498dff Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Mon, 1 Jun 2026 20:24:56 +0000 Subject: [PATCH 03/10] Fix CI setup script sudo usage for GitHub Actions --- .ci/setup.sh | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/.ci/setup.sh b/.ci/setup.sh index 1ac23635..bce906ee 100755 --- a/.ci/setup.sh +++ b/.ci/setup.sh @@ -1,7 +1,18 @@ #!/bin/bash -if [ $(command -v apt) ]; then - sudo apt install -y openssl +set -euo pipefail + +if command -v sudo >/dev/null 2>&1; then + SUDO="sudo" +else + SUDO="" +fi + +if command -v apt >/dev/null 2>&1; then + ${SUDO} apt install -y openssl +elif command -v microdnf >/dev/null 2>&1; then + ${SUDO} microdnf install -y openssl else - sudo microdnf install -y openssl + echo "No supported package manager found (expected apt or microdnf)" >&2 + exit 1 fi From a1d4912080b36168b05da02f58085d2fa119f165 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Mon, 1 Jun 2026 20:25:47 +0000 Subject: [PATCH 04/10] Handle optional sudo in CI setup script --- .ci/setup.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.ci/setup.sh b/.ci/setup.sh index bce906ee..4637fc89 100755 --- a/.ci/setup.sh +++ b/.ci/setup.sh @@ -3,15 +3,15 @@ set -euo pipefail if command -v sudo >/dev/null 2>&1; then - SUDO="sudo" + CMD_PREFIX=(sudo) else - SUDO="" + CMD_PREFIX=() fi if command -v apt >/dev/null 2>&1; then - ${SUDO} apt install -y openssl + "${CMD_PREFIX[@]}" apt install -y openssl elif command -v microdnf >/dev/null 2>&1; then - ${SUDO} microdnf install -y openssl + "${CMD_PREFIX[@]}" microdnf install -y openssl else echo "No supported package manager found (expected apt or microdnf)" >&2 exit 1 From 7a5464103164efda72d352a2cf307d4c849bcfb1 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Mon, 1 Jun 2026 20:26:24 +0000 Subject: [PATCH 05/10] Refactor optional sudo handling in CI setup script --- .ci/setup.sh | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/.ci/setup.sh b/.ci/setup.sh index 4637fc89..94564866 100755 --- a/.ci/setup.sh +++ b/.ci/setup.sh @@ -2,16 +2,18 @@ set -euo pipefail -if command -v sudo >/dev/null 2>&1; then - CMD_PREFIX=(sudo) -else - CMD_PREFIX=() -fi +run_with_optional_sudo() { + if command -v sudo >/dev/null 2>&1; then + sudo "$@" + else + "$@" + fi +} if command -v apt >/dev/null 2>&1; then - "${CMD_PREFIX[@]}" apt install -y openssl + run_with_optional_sudo apt install -y openssl elif command -v microdnf >/dev/null 2>&1; then - "${CMD_PREFIX[@]}" microdnf install -y openssl + run_with_optional_sudo microdnf install -y openssl else echo "No supported package manager found (expected apt or microdnf)" >&2 exit 1 From 642a7b553d4f12d9bba51863bc8c9525d944354f Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 2 Jun 2026 19:45:30 +0000 Subject: [PATCH 06/10] Restrict CI setup to apt on GitHub Actions runner --- .ci/setup.sh | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/.ci/setup.sh b/.ci/setup.sh index 94564866..165c8f5b 100755 --- a/.ci/setup.sh +++ b/.ci/setup.sh @@ -10,11 +10,9 @@ run_with_optional_sudo() { fi } -if command -v apt >/dev/null 2>&1; then - run_with_optional_sudo apt install -y openssl -elif command -v microdnf >/dev/null 2>&1; then - run_with_optional_sudo microdnf install -y openssl -else - echo "No supported package manager found (expected apt or microdnf)" >&2 +if ! command -v apt >/dev/null 2>&1; then + echo "Expected apt on GitHub Actions runner, but it was not found" >&2 exit 1 fi + +run_with_optional_sudo apt install -y openssl From 7610af6a8ffe154a1a020217ce077cd349ca6dc6 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 2 Jun 2026 19:49:57 +0000 Subject: [PATCH 07/10] Restore multi-PM support in setup.sh for Travis and GHA compatibility --- .ci/setup.sh | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/.ci/setup.sh b/.ci/setup.sh index 165c8f5b..94564866 100755 --- a/.ci/setup.sh +++ b/.ci/setup.sh @@ -10,9 +10,11 @@ run_with_optional_sudo() { fi } -if ! command -v apt >/dev/null 2>&1; then - echo "Expected apt on GitHub Actions runner, but it was not found" >&2 +if command -v apt >/dev/null 2>&1; then + run_with_optional_sudo apt install -y openssl +elif command -v microdnf >/dev/null 2>&1; then + run_with_optional_sudo microdnf install -y openssl +else + echo "No supported package manager found (expected apt or microdnf)" >&2 exit 1 fi - -run_with_optional_sudo apt install -y openssl From 364e003b220cdc6e67feb346111f1b04e64ff1d3 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 2 Jun 2026 20:08:56 +0000 Subject: [PATCH 08/10] Restore setup.sh to pre-workaround state --- .ci/setup.sh | 19 +++---------------- 1 file changed, 3 insertions(+), 16 deletions(-) diff --git a/.ci/setup.sh b/.ci/setup.sh index 94564866..1ac23635 100755 --- a/.ci/setup.sh +++ b/.ci/setup.sh @@ -1,20 +1,7 @@ #!/bin/bash -set -euo pipefail - -run_with_optional_sudo() { - if command -v sudo >/dev/null 2>&1; then - sudo "$@" - else - "$@" - fi -} - -if command -v apt >/dev/null 2>&1; then - run_with_optional_sudo apt install -y openssl -elif command -v microdnf >/dev/null 2>&1; then - run_with_optional_sudo microdnf install -y openssl +if [ $(command -v apt) ]; then + sudo apt install -y openssl else - echo "No supported package manager found (expected apt or microdnf)" >&2 - exit 1 + sudo microdnf install -y openssl fi From f3985b6ad2988dee5efcd20e111973fb3f2d5895 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 2 Jun 2026 20:13:20 +0000 Subject: [PATCH 09/10] Use better-sudo branch of logstash-plugins/.ci in unit tests workflow --- .github/workflows/unit-tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/unit-tests.yml b/.github/workflows/unit-tests.yml index aa66de32..0ab60fcc 100644 --- a/.github/workflows/unit-tests.yml +++ b/.github/workflows/unit-tests.yml @@ -9,7 +9,7 @@ on: jobs: tests: - uses: logstash-plugins/.ci/.github/workflows/unit-tests.yml@1.x + uses: logstash-plugins/.ci/.github/workflows/unit-tests.yml@better-sudo concurrency: group: ${{ github.workflow }}-${{ github.ref }} cancel-in-progress: ${{ github.ref != 'refs/heads/main' }} From c438cb87b1b001c81e0c5fce2da796bee3b36dd0 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 2 Jun 2026 22:23:01 +0000 Subject: [PATCH 10/10] Revert unit tests workflow back to .ci 1.x --- .github/workflows/unit-tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/unit-tests.yml b/.github/workflows/unit-tests.yml index 0ab60fcc..aa66de32 100644 --- a/.github/workflows/unit-tests.yml +++ b/.github/workflows/unit-tests.yml @@ -9,7 +9,7 @@ on: jobs: tests: - uses: logstash-plugins/.ci/.github/workflows/unit-tests.yml@better-sudo + uses: logstash-plugins/.ci/.github/workflows/unit-tests.yml@1.x concurrency: group: ${{ github.workflow }}-${{ github.ref }} cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}