Skip to content

Commit db15245

Browse files
committed
Use Apache Logging Services reusable workflows
This PR switches Flume to use the reusable workflows from apache/logging-parent.
1 parent 8f12c90 commit db15245

7 files changed

+246
-148
lines changed

.github/dependabot.yaml

+40
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
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+
version: 2
18+
# Add Maven Central explicitly to work around:
19+
# https://github.com/dependabot/dependabot-core/issues/8329
20+
registries:
21+
maven-central:
22+
type: maven-repository
23+
url: https://repo.maven.apache.org/maven2
24+
25+
updates:
26+
27+
- package-ecosystem: maven
28+
directory: "/"
29+
open-pull-requests-limit: 10
30+
schedule:
31+
interval: "daily"
32+
target-branch: "trunk"
33+
registries:
34+
- maven-central
35+
36+
- package-ecosystem: github-actions
37+
directory: "/"
38+
schedule:
39+
interval: "daily"
40+
target-branch: "trunk"

.github/workflows/build.yaml

+79
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
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+
paths-ignore:
26+
- "**.adoc"
27+
- "**.md"
28+
- "**.txt"
29+
pull_request:
30+
paths-ignore:
31+
- "**.adoc"
32+
- "**.md"
33+
- "**.txt"
34+
35+
# If the branch is 'trunk' run once per commit.
36+
# If the branch is 'release/*' allow only one concurrent run.
37+
concurrency:
38+
group: ${{ github.ref_name == 'trunk' && github.ref || github.ref_name }}
39+
cancel-in-progress: true
40+
41+
permissions: read-all
42+
43+
jobs:
44+
45+
build:
46+
if: github.actor != 'dependabot[bot]'
47+
uses: apache/logging-parent/.github/workflows/build-reusable.yaml@e45457c683302242be5e8e7c3c33edf8f0e0ec0e # 10.4.0
48+
with:
49+
java-version: 8
50+
51+
deploy-snapshot:
52+
needs: build
53+
if: github.repository == 'apache/flume' && github.ref == 'refs/heads/trunk'
54+
uses: apache/logging-parent/.github/workflows/deploy-snapshot-reusable.yaml@e45457c683302242be5e8e7c3c33edf8f0e0ec0e # 10.4.0
55+
# Secrets for deployments
56+
secrets:
57+
NEXUS_USER: ${{ secrets.NEXUS_USER }}
58+
NEXUS_PW: ${{ secrets.NEXUS_PW }}
59+
with:
60+
java-version: 8
61+
62+
deploy-release:
63+
needs: build
64+
if: github.repository == 'apache/flume' && startsWith(github.ref_name, 'release/')
65+
uses: apache/logging-parent/.github/workflows/deploy-release-reusable.yaml@e45457c683302242be5e8e7c3c33edf8f0e0ec0e # 10.4.0
66+
# Secrets for deployments
67+
secrets:
68+
GPG_SECRET_KEY: ${{ secrets.LOGGING_GPG_SECRET_KEY }}
69+
LOGGING_STAGE_DEPLOYER_USER: ${{ secrets.LOGGING_STAGE_DEPLOYER_USER }}
70+
LOGGING_STAGE_DEPLOYER_PW: ${{ secrets.LOGGING_STAGE_DEPLOYER_PW }}
71+
SVN_USERNAME: ${{ secrets.LOGGING_SVN_DEV_USERNAME }}
72+
SVN_PASSWORD: ${{ secrets.LOGGING_SVN_DEV_PASSWORD }}
73+
# Write permissions to allow the Maven `revision` property update, changelog release, etc.
74+
permissions:
75+
contents: write
76+
with:
77+
java-version: 8
78+
project-id: flume
79+
site-enabled: true

.github/workflows/build.yml

-78
This file was deleted.
+41
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
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: codeql-analysis
19+
20+
on:
21+
push:
22+
branches: [ 'trunk' ]
23+
pull_request:
24+
# The branches below must be a subset of the branches provided in `on.push.branches`
25+
branches: [ 'trunk' ]
26+
schedule:
27+
- cron: '32 12 * * 5'
28+
29+
permissions: read-all
30+
31+
jobs:
32+
33+
analyze:
34+
uses: apache/logging-parent/.github/workflows/codeql-analysis-reusable.yaml@e45457c683302242be5e8e7c3c33edf8f0e0ec0e # 10.4.0
35+
# Permissions required to publish Security Alerts
36+
permissions:
37+
actions: read
38+
contents: read
39+
security-events: write
40+
with:
41+
java-version: 8

.github/workflows/codeql-analysis.yml

-70
This file was deleted.
+46
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
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: merge-dependabot
19+
20+
on:
21+
pull_request_target:
22+
paths-ignore:
23+
- "**.adoc"
24+
- "**.md"
25+
- "**.txt"
26+
27+
permissions: read-all
28+
29+
jobs:
30+
31+
build:
32+
if: github.repository == 'apache/flume' && github.event_name == 'pull_request_target' && github.actor == 'dependabot[bot]'
33+
uses: apache/logging-parent/.github/workflows/build-reusable.yaml@e45457c683302242be5e8e7c3c33edf8f0e0ec0e # 10.4.0
34+
with:
35+
java-version: 8
36+
37+
merge-dependabot:
38+
needs: build
39+
uses: apache/logging-parent/.github/workflows/merge-dependabot-reusable.yaml@e45457c683302242be5e8e7c3c33edf8f0e0ec0e # 10.4.0
40+
permissions:
41+
contents: write # to push changelog commits
42+
pull-requests: write # to close the PR
43+
secrets:
44+
GPG_SECRET_KEY: ${{ secrets.LOGGING_GPG_SECRET_KEY }} # to sign commits
45+
with:
46+
java-version: 8

0 commit comments

Comments
 (0)