Skip to content

Commit 7e82cd2

Browse files
authored
Build with the logging-parent reusable workflows (#470)
* Build with the `logging-parent` reusable workflows Flume no longer maintains its own checkout, JDK and Maven steps, and gains snapshot/release deployment and reproducibility verification in exchange. Assisted-By: Claude Fable 5 <noreply@anthropic.com> * Skip Taildir tests on non-POSIX file systems TaildirSource tracks files by inode, so its tests cannot pass when the default file system lacks a `unix` attribute view (e.g. on Windows). Document that requirement in the user guide. Assisted-By: Claude Fable 5 <noreply@anthropic.com> * Formatting * Fix race condition in TestSyslogTcpSource.testSSLMessages The test read from the channel immediately after closing the client socket, but the source delivers events asynchronously, so the take could return null on slow machines (first seen on Windows CI). Wait for the source counter with Awaitility and close the TLS socket gracefully, flushing before close. Assisted-By: Claude Fable 5 <noreply@anthropic.com> * Keep the client socket open until the syslog event is committed The Windows CI logs show the TLS handshake succeeding and the connection aborting one millisecond later: the client never reads the TLS 1.3 session tickets sent by the server, so close() aborts the connection with a TCP RST, which on Windows discards the syslog record before the server reads it. Assisted-By: Claude Fable 5 <noreply@anthropic.com> * Reflow comment
1 parent ae6c7db commit 7e82cd2

2 files changed

Lines changed: 90 additions & 77 deletions

File tree

.github/workflows/build.yaml

Lines changed: 90 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,90 @@
1+
#
2+
# Licensed to the Apache Software Foundation (ASF) under one or more
3+
# contributor license agreements. See the NOTICE file distributed with
4+
# this work for additional information regarding copyright ownership.
5+
# The ASF licenses this file to you under the Apache License, Version 2.0
6+
# (the "License"); you may not use this file except in compliance with
7+
# the License. You may obtain a copy of the License at
8+
#
9+
# http://www.apache.org/licenses/LICENSE-2.0
10+
#
11+
# Unless required by applicable law or agreed to in writing, software
12+
# distributed under the License is distributed on an "AS IS" BASIS,
13+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
# See the License for the specific language governing permissions and
15+
# limitations under the License.
16+
#
17+
18+
name: build
19+
20+
on:
21+
push:
22+
branches:
23+
- "trunk"
24+
- "release/*"
25+
pull_request:
26+
27+
# Disable all permissions by defaults:
28+
# Permissions are enabled on a per-job basis.
29+
permissions: { }
30+
31+
concurrency:
32+
# One group per PR, or per ref for branch pushes.
33+
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
34+
# Cancel in-progress runs for PRs only, so release branch builds always complete.
35+
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
36+
37+
jobs:
38+
39+
build:
40+
uses: apache/logging-parent/.github/workflows/build-reusable.yaml@gha/v0
41+
with:
42+
java-version: 17
43+
site-enabled: true
44+
reproducibility-check-enabled: false
45+
46+
deploy-snapshot:
47+
needs: build
48+
if: github.repository == 'apache/logging-flume' && github.ref_name == 'trunk'
49+
uses: apache/logging-parent/.github/workflows/deploy-snapshot-reusable.yaml@gha/v0
50+
# Secrets for deployments
51+
secrets:
52+
NEXUS_USERNAME: ${{ secrets.LOGGING_STAGE_DEPLOYER_USER }}
53+
NEXUS_PASSWORD: ${{ secrets.LOGGING_STAGE_DEPLOYER_PW }}
54+
with:
55+
java-version: 17
56+
57+
deploy-release:
58+
needs: build
59+
if: github.repository == 'apache/logging-flume' && startsWith(github.ref_name, 'release/')
60+
uses: apache/logging-parent/.github/workflows/deploy-release-reusable.yaml@gha/v0
61+
# Secrets for deployments
62+
secrets:
63+
GPG_SECRET_KEY: ${{ secrets.LOGGING_GPG_SECRET_KEY }}
64+
NEXUS_USERNAME: ${{ secrets.LOGGING_STAGE_DEPLOYER_USER }}
65+
NEXUS_PASSWORD: ${{ secrets.LOGGING_STAGE_DEPLOYER_PW }}
66+
SVN_USERNAME: ${{ secrets.LOGGING_SVN_DEV_USERNAME }}
67+
SVN_PASSWORD: ${{ secrets.LOGGING_SVN_DEV_PASSWORD }}
68+
# Write permissions to allow the Maven `revision` property update, changelog release, etc.
69+
permissions:
70+
contents: write
71+
with:
72+
java-version: 17
73+
project-id: flume
74+
75+
verify-reproducibility-snapshot:
76+
needs: deploy-snapshot
77+
uses: apache/logging-parent/.github/workflows/verify-reproducibility-reusable.yaml@gha/v0
78+
with:
79+
java-version: 17
80+
# Compare against the repository `deploy-snapshot` uploaded as a run artifact, so that
81+
# the check does not depend on the snapshot having propagated to the Nexus group repository.
82+
reference-artifact-name: ${{ needs.deploy-snapshot.outputs.repository-artifact-name }}
83+
84+
verify-reproducibility-release:
85+
needs: deploy-release
86+
uses: apache/logging-parent/.github/workflows/verify-reproducibility-reusable.yaml@gha/v0
87+
with:
88+
java-version: 17
89+
# `deploy-release` publishes no run artifact, so the staging repository is the reference.
90+
nexus-url: ${{ needs.deploy-release.outputs.nexus-url }}

.github/workflows/build.yml

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

0 commit comments

Comments
 (0)