This repository has been archived by the owner on Apr 15, 2024. It is now read-only.
forked from apache/bookkeeper
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'apache:branch-4.15' into branch-4.15
- Loading branch information
Showing
628 changed files
with
12,987 additions
and
8,218 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
# | ||
# Licensed to the Apache Software Foundation (ASF) under one | ||
# or more contributor license agreements. See the NOTICE file | ||
# distributed with this work for additional information | ||
# regarding copyright ownership. The ASF licenses this file | ||
# to you under the Apache License, Version 2.0 (the | ||
# "License"); you may not use this file except in compliance | ||
# with the License. You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, | ||
# software distributed under the License is distributed on an | ||
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||
# KIND, either express or implied. See the License for the | ||
# specific language governing permissions and limitations | ||
# under the License. | ||
# | ||
|
||
name: clean disk | ||
description: makes some more space available on the disk by removing files | ||
inputs: | ||
mode: | ||
description: "Use 'full' to clean as much as possible" | ||
required: false | ||
runs: | ||
using: composite | ||
steps: | ||
- run: | | ||
if [[ "$OSTYPE" == "linux-gnu"* ]]; then | ||
directories=(/usr/local/lib/android /opt/ghc) | ||
if [[ "${{ inputs.mode }}" == "full" ]]; then | ||
# remove these directories only when mode is 'full' | ||
directories+=(/usr/share/dotnet /opt/hostedtoolcache/CodeQL) | ||
fi | ||
emptydir=/tmp/empty$$/ | ||
mkdir $emptydir | ||
echo "::group::Available diskspace" | ||
time df -BM / /mnt | ||
echo "::endgroup::" | ||
for directory in "${directories[@]}"; do | ||
echo "::group::Removing $directory" | ||
# fast way to delete a lot of files on linux | ||
time sudo eatmydata rsync -a --delete $emptydir ${directory}/ | ||
time sudo eatmydata rm -rf ${directory} | ||
time df -BM / /mnt | ||
echo "::endgroup::" | ||
done | ||
echo "::group::Cleaning apt state" | ||
time sudo bash -c "apt-get clean; apt-get autoclean; apt-get -y --purge autoremove" | ||
time df -BM / /mnt | ||
echo "::endgroup::" | ||
fi | ||
echo "::group::Available diskspace" | ||
time df -BM / /mnt | ||
echo "::endgroup::" | ||
shell: bash |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
# contains pattern definitions used in workflows "changes" step | ||
# pattern syntax: https://github.com/micromatch/picomatch | ||
all: | ||
- '**' | ||
docs: | ||
- 'site3/**' | ||
- '.asf.yaml' | ||
- '*.md' | ||
- '**/*.md' | ||
- '.github/changes-filter.yaml' | ||
- '.github/ISSUE_TEMPLATE/**' | ||
need_owasp: | ||
- 'pom.xml' | ||
- '**/pom.xml' | ||
- 'src/owasp-dependency-check-false-positives.xml' | ||
- 'src/owasp-dependency-check-suppressions.xml' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
<!-- | ||
Licensed to the Apache Software Foundation (ASF) under one | ||
or more contributor license agreements. See the NOTICE file | ||
distributed with this work for additional information | ||
regarding copyright ownership. The ASF licenses this file | ||
to you under the Apache License, Version 2.0 (the | ||
"License"); you may not use this file except in compliance | ||
with the License. You may obtain a copy of the License at | ||
http://www.apache.org/licenses/LICENSE-2.0 | ||
Unless required by applicable law or agreed to in writing, | ||
software distributed under the License is distributed on an | ||
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||
KIND, either express or implied. See the License for the | ||
specific language governing permissions and limitations | ||
under the License. | ||
--> | ||
|
||
## GitHub Workflows | ||
|
||
This directory contains all BookKeeper CI checks. | ||
|
||
### Required Workflows | ||
|
||
When adding new CI workflows, please update the [.asf.yaml](../../.asf.yaml) if the workflow is required to pass before | ||
a PR can be merged. Instructions on how to update the file are below. | ||
|
||
This project uses the [.asf.yaml](../../.asf.yaml) to configure which workflows are required to pass before a PR can | ||
be merged. In the `.asf.yaml`, the required contexts are defined in the `github.protected_branches.*.required_status_checks.contexts.[]` | ||
where * is any key in the `protected_branches` map. | ||
|
||
You can view the currently required status checks by running the following command: | ||
|
||
```shell | ||
curl -s -H 'Accept: application/vnd.github.v3+json' https://api.github.com/repos/apache/bookkeeper/branches/master | \ | ||
jq .protection | ||
``` | ||
|
||
These contexts get their names in one of two ways depending on how the workflow file is written in this directory. The | ||
following command will print out the names of each file and the associated with the check. If the `name` field is `null`, | ||
the context will be named by the `id`. | ||
|
||
```shell | ||
for f in .github/workflows/*.yaml .github/workflows/*.yml; \ | ||
do FILE=$f yq eval -o j '.jobs | to_entries | {"file": env(FILE),"id":.[].key, "name":.[].value.name}' $f; \ | ||
done | ||
``` | ||
|
||
Duplicate names are allowed, and all checks with the same name will be treated the same (required or not required). | ||
|
||
When working on workflow changes, one way to find out the names of the status checks is to retrieve the names | ||
from the PR build run. The "check-runs" can be found by commit id. Here's an example: | ||
|
||
```shell | ||
curl -s "https://api.github.com/repos/apache/bookkeeper/commits/$(git rev-parse HEAD)/check-runs" | \ | ||
jq -r '.check_runs | .[] | .name' |sort | ||
``` |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.