Skip to content

Commit 66fa894

Browse files
committed
use re-usable workflow layer
1 parent ab1bcb4 commit 66fa894

3 files changed

Lines changed: 10 additions & 155 deletions

File tree

.github/workflows/integration-tests.yml

Lines changed: 3 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -7,47 +7,12 @@ on:
77
- main
88
workflow_dispatch:
99

10-
## Concurrency only allowed in the main branch.
11-
## So old builds running for old commits within the same Pull Request are cancelled
1210
concurrency:
1311
group: ${{ github.workflow }}-${{ github.ref }}
1412
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}
1513

16-
permissions:
17-
contents: read
18-
1914
jobs:
2015
integration-tests:
21-
name: Integration Test - ES ${{ matrix.elastic-stack-version }} ${{ matrix.snapshot && '(Snapshot)' || '' }}
22-
runs-on: ubuntu-latest
23-
timeout-minutes: 60
24-
strategy:
25-
fail-fast: false
26-
matrix:
27-
elastic-stack-version:
28-
- '8.current'
29-
- '9.current'
30-
snapshot: [false, true]
31-
include:
32-
- elastic-stack-version: '9.next'
33-
snapshot: true
34-
- elastic-stack-version: 'main'
35-
snapshot: true
36-
37-
steps:
38-
- name: Checkout code
39-
uses: actions/checkout@v6
40-
41-
- name: Setup test environment
42-
id: setup
43-
uses: logstash-plugins/.ci/setup@feature/github-actions
44-
with:
45-
elastic-stack-version: ${{ matrix.elastic-stack-version }}
46-
snapshot: ${{ matrix.snapshot }}
47-
integration: true
48-
49-
- name: Run integration tests
50-
if: steps.setup.outputs.skip != 'true'
51-
run: bash .ci/docker-run.sh
52-
53-
# NOTE: no cleanup needed when running on ephemeral runners
16+
uses: logstash-plugins/.ci/.github/workflows/integration-tests.yml@feature/github-actions
17+
with:
18+
timeout-minutes: 60

.github/workflows/secure-integration-tests.yml

Lines changed: 3 additions & 74 deletions
Original file line numberDiff line numberDiff line change
@@ -7,83 +7,12 @@ on:
77
- main
88
workflow_dispatch:
99

10-
## Concurrency only allowed in the main branch.
11-
## So old builds running for old commits within the same Pull Request are cancelled
1210
concurrency:
1311
group: ${{ github.workflow }}-${{ github.ref }}
1412
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}
1513

16-
permissions:
17-
contents: read
18-
1914
jobs:
2015
secure-integration-tests:
21-
name: Secure Integration Test - ES ${{ matrix.elastic-stack-version }} ${{ matrix.snapshot && '(Snapshot)' || '' }}${{ matrix.es-ssl-key-invalid == 'true' && ' (Invalid SSL)' || '' }}${{ matrix.es-ssl-supported-protocols != '' && format(' ({0})', matrix.es-ssl-supported-protocols) || '' }}
22-
runs-on: ubuntu-latest
23-
timeout-minutes: 60
24-
strategy:
25-
fail-fast: false
26-
matrix:
27-
elastic-stack-version:
28-
- '8.current'
29-
- '9.current'
30-
snapshot: [false]
31-
es-ssl-key-invalid: ['false']
32-
es-ssl-supported-protocols: ['']
33-
include:
34-
# SSL key invalid variants
35-
- elastic-stack-version: '8.current'
36-
snapshot: false
37-
es-ssl-key-invalid: 'true'
38-
es-ssl-supported-protocols: ''
39-
- elastic-stack-version: '9.current'
40-
snapshot: false
41-
es-ssl-key-invalid: 'true'
42-
es-ssl-supported-protocols: ''
43-
# TLSv1.3 variants
44-
- elastic-stack-version: '8.current'
45-
snapshot: false
46-
es-ssl-key-invalid: 'false'
47-
es-ssl-supported-protocols: 'TLSv1.3'
48-
- elastic-stack-version: '9.current'
49-
snapshot: false
50-
es-ssl-key-invalid: 'false'
51-
es-ssl-supported-protocols: 'TLSv1.3'
52-
# Snapshot variants
53-
- elastic-stack-version: '8.current'
54-
snapshot: true
55-
es-ssl-key-invalid: 'false'
56-
es-ssl-supported-protocols: ''
57-
- elastic-stack-version: '9.current'
58-
snapshot: true
59-
es-ssl-key-invalid: 'false'
60-
es-ssl-supported-protocols: ''
61-
- elastic-stack-version: '9.next'
62-
snapshot: true
63-
es-ssl-key-invalid: 'false'
64-
es-ssl-supported-protocols: ''
65-
- elastic-stack-version: 'main'
66-
snapshot: true
67-
es-ssl-key-invalid: 'false'
68-
es-ssl-supported-protocols: ''
69-
70-
steps:
71-
- name: Checkout code
72-
uses: actions/checkout@v6
73-
74-
- name: Setup test environment
75-
id: setup
76-
uses: logstash-plugins/.ci/setup@feature/github-actions
77-
with:
78-
elastic-stack-version: ${{ matrix.elastic-stack-version }}
79-
snapshot: ${{ matrix.snapshot }}
80-
integration: true
81-
secure-integration: true
82-
es-ssl-key-invalid: ${{ matrix.es-ssl-key-invalid }}
83-
es-ssl-supported-protocols: ${{ matrix.es-ssl-supported-protocols }}
84-
85-
- name: Run secure integration tests
86-
if: steps.setup.outputs.skip != 'true'
87-
run: bash .ci/docker-run.sh
88-
89-
# NOTE: no cleanup needed when running on ephemeral runners
16+
uses: logstash-plugins/.ci/.github/workflows/secure-integration-tests.yml@feature/github-actions
17+
with:
18+
timeout-minutes: 60

.github/workflows/tests.yml

Lines changed: 4 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -7,51 +7,12 @@ on:
77
- main
88
workflow_dispatch:
99

10-
## Concurrency only allowed in the main branch.
11-
## So old builds running for old commits within the same Pull Request are cancelled
1210
concurrency:
1311
group: ${{ github.workflow }}-${{ github.ref }}
1412
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}
1513

16-
permissions:
17-
contents: read
18-
1914
jobs:
20-
test:
21-
name: Test - ES ${{ matrix.elastic-stack-version }}${{ matrix.snapshot && ' (Snapshot)' || '' }}
22-
runs-on: ubuntu-latest
23-
timeout-minutes: 120
24-
strategy:
25-
fail-fast: false
26-
matrix:
27-
elastic-stack-version:
28-
- '8.current'
29-
- '9.previous'
30-
- '9.current'
31-
- '9.next'
32-
- 'main'
33-
snapshot: [false, true]
34-
docker-env: ['dockerjdk21.env']
35-
exclude:
36-
# 9.next and main only run as snapshot
37-
- elastic-stack-version: '9.next'
38-
snapshot: false
39-
- elastic-stack-version: 'main'
40-
snapshot: false
41-
42-
steps:
43-
- name: Checkout code
44-
uses: actions/checkout@v6
45-
46-
- name: Setup test environment
47-
id: setup
48-
uses: logstash-plugins/.ci/setup@feature/github-actions
49-
with:
50-
elastic-stack-version: ${{ matrix.elastic-stack-version }}
51-
snapshot: ${{ matrix.snapshot }}
52-
docker-env: ${{ matrix.docker-env }}
53-
54-
- name: Run tests
55-
if: steps.setup.outputs.skip != 'true'
56-
timeout-minutes: 60
57-
run: bash .ci/docker-run.sh
15+
tests:
16+
uses: logstash-plugins/.ci/.github/workflows/test.yml@feature/github-actions
17+
with:
18+
timeout-minutes: 60

0 commit comments

Comments
 (0)