Skip to content

Commit 020e856

Browse files
authored
Migrate CI from Travis to GitHub Actions (main branch)
1 parent 24c1dc1 commit 020e856

7 files changed

Lines changed: 126 additions & 19 deletions

File tree

.ci/docker-compose.override.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ services:
88
- ELASTIC_STACK_VERSION=$ELASTIC_STACK_VERSION
99
- INTEGRATION=${INTEGRATION:-false}
1010
- SECURE_INTEGRATION=${SECURE_INTEGRATION:-false}
11-
- ELASTIC_SECURITY_ENABLED=$ELASTIC_SECURITY_ENABLED
12-
- ELASTIC_PASSWORD=$ELASTIC_PASSWORD
11+
- ELASTIC_SECURITY_ENABLED=${ELASTIC_SECURITY_ENABLED:-${SECURE_INTEGRATION:-false}}
12+
- ELASTIC_PASSWORD=${ELASTIC_PASSWORD:-password}
1313
- ES_SSL_SUPPORTED_PROTOCOLS=$ES_SSL_SUPPORTED_PROTOCOLS
1414

1515
elasticsearch:
@@ -22,8 +22,8 @@ services:
2222
- SECURE_INTEGRATION=${SECURE_INTEGRATION:-false}
2323
- ES_SSL_SUPPORTED_PROTOCOLS=$ES_SSL_SUPPORTED_PROTOCOLS
2424
environment:
25-
- ELASTIC_PASSWORD=$ELASTIC_PASSWORD
26-
- xpack.security.enabled=${ELASTIC_SECURITY_ENABLED:-false}
25+
- ELASTIC_PASSWORD=${ELASTIC_PASSWORD:-password}
26+
- xpack.security.enabled=${ELASTIC_SECURITY_ENABLED:-${SECURE_INTEGRATION:-false}}
2727
- bootstrap.memory_lock=true
2828
- discovery.type=single-node
2929
- ES_JAVA_OPTS=-Xms640m -Xmx640m

.ci/docker-run.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ set -ex
66
cd .ci
77

88
if [ "$INTEGRATION" == "true" ]; then
9-
docker-compose up --exit-code-from logstash
9+
docker compose up --exit-code-from logstash
1010
else
11-
docker-compose up --exit-code-from logstash logstash
11+
docker compose up --exit-code-from logstash logstash
1212
fi
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
name: Integration Tests
2+
3+
on:
4+
push:
5+
branches: ['3.x', main]
6+
pull_request:
7+
branches: ['3.x', main]
8+
schedule:
9+
# Daily run that fans out across every active branch via the matrix
10+
# job below. GitHub only fires `schedule:` from the workflow file on
11+
# the default branch (main); copies of this file on
12+
# non-default branches keep the block for symmetry but it is dormant
13+
# there.
14+
- cron: '0 8 * * *'
15+
workflow_dispatch:
16+
17+
jobs:
18+
tests:
19+
if: github.event_name != 'schedule'
20+
uses: logstash-plugins/.ci/.github/workflows/integration-tests.yml@1.x
21+
secrets: inherit
22+
concurrency:
23+
group: ${{ github.workflow }}-${{ github.ref }}
24+
cancel-in-progress: ${{ github.ref != 'refs/heads/3.x' && github.ref != 'refs/heads/main' }}
25+
with:
26+
timeout-minutes: 60
27+
28+
scheduled:
29+
if: github.event_name == 'schedule'
30+
strategy:
31+
fail-fast: false
32+
matrix:
33+
branch: ['3.x', main]
34+
uses: logstash-plugins/.ci/.github/workflows/integration-tests.yml@1.x
35+
secrets: inherit
36+
with:
37+
ref: ${{ matrix.branch }}
38+
timeout-minutes: 60
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
name: Secure Integration Tests
2+
3+
on:
4+
push:
5+
branches: ['3.x', main]
6+
pull_request:
7+
branches: ['3.x', main]
8+
schedule:
9+
# Daily run that fans out across every active branch via the matrix
10+
# job below. GitHub only fires `schedule:` from the workflow file on
11+
# the default branch (main); copies of this file on
12+
# non-default branches keep the block for symmetry but it is dormant
13+
# there.
14+
- cron: '0 8 * * *'
15+
workflow_dispatch:
16+
17+
jobs:
18+
tests:
19+
if: github.event_name != 'schedule'
20+
uses: logstash-plugins/.ci/.github/workflows/secure-integration-tests.yml@1.x
21+
secrets: inherit
22+
concurrency:
23+
group: ${{ github.workflow }}-${{ github.ref }}
24+
cancel-in-progress: ${{ github.ref != 'refs/heads/3.x' && github.ref != 'refs/heads/main' }}
25+
with:
26+
timeout-minutes: 60
27+
28+
scheduled:
29+
if: github.event_name == 'schedule'
30+
strategy:
31+
fail-fast: false
32+
matrix:
33+
branch: ['3.x', main]
34+
uses: logstash-plugins/.ci/.github/workflows/secure-integration-tests.yml@1.x
35+
secrets: inherit
36+
with:
37+
ref: ${{ matrix.branch }}
38+
timeout-minutes: 60

.github/workflows/unit-tests.yml

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
name: Unit Tests
2+
3+
on:
4+
push:
5+
branches: ['3.x', main]
6+
pull_request:
7+
branches: ['3.x', main]
8+
schedule:
9+
# Daily run that fans out across every active branch via the matrix
10+
# job below. GitHub only fires `schedule:` from the workflow file on
11+
# the default branch (main); copies of this file on
12+
# non-default branches keep the block for symmetry but it is dormant
13+
# there.
14+
- cron: '0 8 * * *'
15+
workflow_dispatch:
16+
17+
jobs:
18+
tests:
19+
if: github.event_name != 'schedule'
20+
uses: logstash-plugins/.ci/.github/workflows/unit-tests.yml@1.x
21+
# Forward org/repo secrets (e.g. SLACK_BOT_TOKEN used by the reusable's
22+
# failure-notification step). The reusable does not declare a
23+
# workflow_call.secrets block, so `inherit` is required.
24+
secrets: inherit
25+
concurrency:
26+
group: ${{ github.workflow }}-${{ github.ref }}
27+
cancel-in-progress: ${{ github.ref != 'refs/heads/3.x' && github.ref != 'refs/heads/main' }}
28+
with:
29+
timeout-minutes: 60
30+
31+
scheduled:
32+
if: github.event_name == 'schedule'
33+
strategy:
34+
fail-fast: false
35+
matrix:
36+
branch: ['3.x', main]
37+
uses: logstash-plugins/.ci/.github/workflows/unit-tests.yml@1.x
38+
secrets: inherit
39+
with:
40+
ref: ${{ matrix.branch }}
41+
timeout-minutes: 60

.travis.yml

Lines changed: 0 additions & 12 deletions
This file was deleted.

README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
# Logstash Plugin
22

3-
[![Travis Build Status](https://travis-ci.com/logstash-plugins/logstash-filter-elasticsearch.svg)](https://travis-ci.com/logstash-plugins/logstash-filter-elasticsearch)
3+
[![Unit Tests](https://github.com/logstash-plugins/logstash-filter-elasticsearch/actions/workflows/unit-tests.yml/badge.svg?branch=main)](https://github.com/logstash-plugins/logstash-filter-elasticsearch/actions/workflows/unit-tests.yml)
4+
[![Integration Tests](https://github.com/logstash-plugins/logstash-filter-elasticsearch/actions/workflows/integration-tests.yml/badge.svg?branch=main)](https://github.com/logstash-plugins/logstash-filter-elasticsearch/actions/workflows/integration-tests.yml)
5+
[![Secure Integration Tests](https://github.com/logstash-plugins/logstash-filter-elasticsearch/actions/workflows/secure-integration-tests.yml/badge.svg?branch=main)](https://github.com/logstash-plugins/logstash-filter-elasticsearch/actions/workflows/secure-integration-tests.yml)
46

57
This is a plugin for [Logstash](https://github.com/elastic/logstash).
68

0 commit comments

Comments
 (0)