Skip to content

Commit 89cadbe

Browse files
authored
Merge branch 'apache:master' into master
2 parents 48fcf9b + f835ca2 commit 89cadbe

File tree

2,013 files changed

+151227
-155433
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

2,013 files changed

+151227
-155433
lines changed

.asf.yaml

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -31,11 +31,14 @@ github:
3131
squash: true
3232
merge: false
3333
rebase: false
34-
notifications:
35-
commits: commits@ranger.apache.org
36-
issues: dev@ranger.apache.org
37-
pullrequests: dev@ranger.apache.org
38-
pullrequests_comment: dev@ranger.apache.org
39-
jira_options: worklog link label
34+
ghp_branch: gh-pages
35+
ghp_path: /
4036
protected_branches:
4137
master: {}
38+
39+
notifications:
40+
commits: commits@ranger.apache.org
41+
issues: dev@ranger.apache.org
42+
pullrequests: dev@ranger.apache.org
43+
pullrequests_comment: dev@ranger.apache.org
44+
jira_options: worklog link label

.github/workflows/ci.yml

Lines changed: 263 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,263 @@
1+
# Licensed to the Apache Software Foundation (ASF) under one or more
2+
# contributor license agreements. See the NOTICE file distributed with
3+
# this work for additional information regarding copyright ownership.
4+
# The ASF licenses this file to You under the Apache License, Version 2.0
5+
# (the "License"); you may not use this file except in compliance with
6+
# the License. You may obtain a copy of the License at
7+
#
8+
# http://www.apache.org/licenses/LICENSE-2.0
9+
#
10+
# Unless required by applicable law or agreed to in writing, software
11+
# distributed under the License is distributed on an "AS IS" BASIS,
12+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
# See the License for the specific language governing permissions and
14+
# limitations under the License.
15+
16+
17+
# This workflow will build a Java project with Maven, and cache/restore any dependencies to improve the workflow execution time
18+
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-java-with-maven
19+
20+
# This workflow uses actions that are not certified by GitHub.
21+
# They are provided by a third-party and are governed by
22+
# separate terms of service, privacy policy, and support
23+
# documentation.
24+
25+
name: CI
26+
27+
on:
28+
push:
29+
pull_request:
30+
branches: [ "master" ]
31+
32+
env:
33+
MAVEN_OPTS: -Dhttp.keepAlive=false -Dmaven.wagon.http.pool=false -Dmaven.wagon.http.retryHandler.class=standard -Dmaven.wagon.http.retryHandler.count=3
34+
35+
jobs:
36+
build-8:
37+
runs-on: ubuntu-22.04
38+
timeout-minutes: 60
39+
steps:
40+
- uses: actions/checkout@v4
41+
- name: Cache for maven dependencies
42+
uses: actions/cache@v4
43+
with:
44+
path: |
45+
~/.m2/repository/*/*/*
46+
!~/.m2/repository/org/apache/ranger
47+
key: maven-repo-${{ hashFiles('**/pom.xml') }}
48+
restore-keys: |
49+
maven-repo-
50+
- name: Set up JDK 8
51+
uses: actions/setup-java@v4
52+
with:
53+
java-version: '8'
54+
distribution: 'temurin'
55+
- name: build (8)
56+
run: mvn -T 8 clean verify --no-transfer-progress -B -V
57+
58+
- name: run code coverage
59+
run: |
60+
cd dev-support/checks
61+
chmod +x coverage.sh && ./coverage.sh
62+
63+
- name: upload coverage results
64+
uses: actions/upload-artifact@v4
65+
with:
66+
name: jacoco
67+
path: target/coverage/all/*
68+
69+
- name: Upload artifacts
70+
uses: actions/upload-artifact@v4
71+
with:
72+
name: target-8
73+
path: target/*
74+
75+
build-11:
76+
needs:
77+
- build-8
78+
runs-on: ubuntu-22.04
79+
timeout-minutes: 60
80+
steps:
81+
- uses: actions/checkout@v4
82+
- name: Cache for maven dependencies
83+
uses: actions/cache/restore@v4
84+
with:
85+
path: |
86+
~/.m2/repository/*/*/*
87+
!~/.m2/repository/org/apache/ranger
88+
key: maven-repo-${{ hashFiles('**/pom.xml') }}
89+
restore-keys: |
90+
maven-repo-
91+
- name: Set up JDK 11
92+
uses: actions/setup-java@v4
93+
with:
94+
java-version: '11'
95+
distribution: 'temurin'
96+
- name: build (11)
97+
run: mvn -T 8 clean verify -pl '!knox-agent' --no-transfer-progress -B -V
98+
- name: Upload artifacts
99+
uses: actions/upload-artifact@v4
100+
with:
101+
name: target-11
102+
path: target/*
103+
104+
services-docker-build:
105+
needs:
106+
- build-8
107+
runs-on: ubuntu-24.04 # bumping os version for more disk space
108+
timeout-minutes: 60 # bumping timeout to allow containers to come up
109+
steps:
110+
- uses: actions/checkout@v4
111+
- name: Download build-8 artifacts
112+
uses: actions/download-artifact@v4
113+
with:
114+
name: target-8
115+
116+
- name: Copy artifacts for docker build
117+
run: |
118+
mv ranger-*-admin.tar.gz dev-support/ranger-docker/dist
119+
mv ranger-*-usersync.tar.gz dev-support/ranger-docker/dist
120+
mv ranger-*-tagsync.tar.gz dev-support/ranger-docker/dist
121+
mv ranger-*-kms.tar.gz dev-support/ranger-docker/dist
122+
mv ranger-*-solr-plugin.tar.gz dev-support/ranger-docker/dist
123+
mv version dev-support/ranger-docker/dist
124+
rm -f ranger-*.tar.gz # clean up workspace
125+
126+
- name: Free up disk space
127+
run: docker system prune --all --force --volumes
128+
129+
- name: Download DB and Log4J connectors
130+
run: |
131+
cd dev-support/ranger-docker
132+
./download-archives.sh none
133+
134+
- name: Build all ranger-service images
135+
run: |
136+
cd dev-support/ranger-docker
137+
export RANGER_DB_TYPE=postgres
138+
docker compose \
139+
-f docker-compose.ranger.yml \
140+
-f docker-compose.ranger-usersync.yml \
141+
-f docker-compose.ranger-tagsync.yml \
142+
-f docker-compose.ranger-kms.yml build
143+
144+
- name: Bring up ranger-service containers
145+
run: |
146+
cd dev-support/ranger-docker
147+
export RANGER_DB_TYPE=postgres
148+
docker compose \
149+
-f docker-compose.ranger.yml \
150+
-f docker-compose.ranger-usersync.yml \
151+
-f docker-compose.ranger-tagsync.yml \
152+
-f docker-compose.ranger-kms.yml up -d
153+
154+
- name: Check status of containers and remove them
155+
run: |
156+
sleep 60
157+
containers=(ranger ranger-zk ranger-solr ranger-postgres ranger-usersync ranger-tagsync ranger-kms);
158+
flag=true;
159+
for container in "${containers[@]}"; do
160+
if [[ $(docker inspect -f '{{.State.Running}}' $container 2>/dev/null) == "true" ]]; then
161+
echo "Container $container is running!";
162+
else
163+
flag=false;
164+
echo "Container $container is NOT running! Status: $(docker inspect -f '{{.State.Status}}' $container 2>/dev/null)";
165+
echo "docker logs $container:";
166+
docker logs $container
167+
fi
168+
done
169+
170+
if [[ $flag == true ]]; then
171+
echo "All required containers are up and running";
172+
docker stop $(docker ps -q) && docker rm $(docker ps -aq);
173+
else
174+
docker stop $(docker ps -q) && docker rm $(docker ps -aq);
175+
exit 1;
176+
fi
177+
178+
plugins-docker-build:
179+
needs:
180+
- build-8
181+
runs-on: ubuntu-24.04 # bumping os version for more disk space
182+
timeout-minutes: 60 # bumping timeout to allow containers to come up
183+
steps:
184+
- uses: actions/checkout@v4
185+
- name: Download build-8 artifacts
186+
uses: actions/download-artifact@v4
187+
with:
188+
name: target-8
189+
190+
- name: Copy artifacts for docker build
191+
run: |
192+
mv ranger-*-admin.tar.gz dev-support/ranger-docker/dist
193+
mv ranger-*-plugin.tar.gz dev-support/ranger-docker/dist
194+
mv version dev-support/ranger-docker/dist
195+
rm -f ranger-*.tar.gz # clean up workspace
196+
197+
- name: Free up disk space
198+
run: docker system prune --all --force --volumes
199+
200+
- name: Cache downloaded archives
201+
uses: actions/cache@v4
202+
with:
203+
path: dev-support/ranger-docker/downloads
204+
key: ${{ runner.os }}-ranger-downloads-${{ hashFiles('dev-support/ranger-docker/.env') }}
205+
restore-keys: |
206+
${{ runner.os }}-ranger-downloads-
207+
208+
- name: Run download-archives.sh
209+
run: |
210+
cd dev-support/ranger-docker
211+
rm -rf downloads/ozone-*
212+
./download-archives.sh hadoop hive hbase kafka knox ozone
213+
214+
- name: Build all ranger-plugin images
215+
run: |
216+
cd dev-support/ranger-docker
217+
export RANGER_DB_TYPE=postgres
218+
docker compose \
219+
-f docker-compose.ranger.yml \
220+
-f docker-compose.ranger-hadoop.yml \
221+
-f docker-compose.ranger-hbase.yml \
222+
-f docker-compose.ranger-kafka.yml \
223+
-f docker-compose.ranger-hive.yml \
224+
-f docker-compose.ranger-knox.yml \
225+
-f docker-compose.ranger-ozone.yml build
226+
227+
- name: Bring up ranger-plugin containers
228+
run: |
229+
cd dev-support/ranger-docker
230+
./scripts/ozone/ozone-plugin-docker-setup.sh
231+
export RANGER_DB_TYPE=postgres
232+
docker compose \
233+
-f docker-compose.ranger.yml \
234+
-f docker-compose.ranger-hadoop.yml \
235+
-f docker-compose.ranger-hbase.yml \
236+
-f docker-compose.ranger-kafka.yml \
237+
-f docker-compose.ranger-hive.yml \
238+
-f docker-compose.ranger-knox.yml \
239+
-f docker-compose.ranger-ozone.yml up -d
240+
241+
- name: Check status of containers and remove them
242+
run: |
243+
sleep 60
244+
containers=(ranger ranger-zk ranger-solr ranger-postgres ranger-hadoop ranger-hbase ranger-kafka ranger-hive ranger-knox ozone-om ozone-scm ozone-datanode);
245+
flag=true;
246+
for container in "${containers[@]}"; do
247+
if [[ $(docker inspect -f '{{.State.Running}}' $container 2>/dev/null) == "true" ]]; then
248+
echo "Container $container is running!";
249+
else
250+
flag=false;
251+
echo "Container $container is NOT running! Status: $(docker inspect -f '{{.State.Status}}' $container 2>/dev/null)";
252+
echo "docker logs $container:";
253+
docker logs $container
254+
fi
255+
done
256+
257+
if [[ $flag == true ]]; then
258+
echo "All required containers are up and running";
259+
docker stop $(docker ps -q) && docker rm $(docker ps -aq);
260+
else
261+
docker stop $(docker ps -q) && docker rm $(docker ps -aq);
262+
exit 1;
263+
fi

.github/workflows/docs.yml

Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
# Licensed to the Apache Software Foundation (ASF) under one or more
2+
# contributor license agreements. See the NOTICE file distributed with
3+
# this work for additional information regarding copyright ownership.
4+
# The ASF licenses this file to You under the Apache License, Version 2.0
5+
# (the "License"); you may not use this file except in compliance with
6+
# the License. You may obtain a copy of the License at
7+
#
8+
# http://www.apache.org/licenses/LICENSE-2.0
9+
#
10+
# Unless required by applicable law or agreed to in writing, software
11+
# distributed under the License is distributed on an "AS IS" BASIS,
12+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
# See the License for the specific language governing permissions and
14+
# limitations under the License.
15+
16+
# This workflow will build and deploy the MkDocs documentation to GitHub Pages on pushes to specific branches.
17+
name: docs
18+
19+
on:
20+
push:
21+
branches: [ ranger_5353, master ]
22+
23+
permissions:
24+
contents: write
25+
26+
concurrency:
27+
group: docs-${{ github.ref }}
28+
cancel-in-progress: true
29+
30+
jobs:
31+
deploy:
32+
runs-on: ubuntu-latest
33+
steps:
34+
- uses: actions/checkout@v4
35+
with:
36+
fetch-depth: 0
37+
38+
- name: Configure Git author
39+
run: |
40+
git config user.name "github-actions[bot]"
41+
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
42+
43+
- uses: actions/setup-python@v5
44+
with:
45+
python-version: '3.x'
46+
47+
# weekly cache for mkdocs' .cache to speed up rebuilds
48+
- name: Compute cache key
49+
run: echo "cache_id=$(date --utc +%V)" >> "$GITHUB_ENV"
50+
51+
- uses: actions/cache@v4
52+
with:
53+
key: mkdocs-material-${{ env.cache_id }}
54+
path: .cache
55+
restore-keys: |
56+
mkdocs-material-
57+
58+
- name: Install dependencies
59+
run: |
60+
cd mkdocs
61+
pip install --upgrade pip
62+
pip install -r requirements.txt
63+
64+
# enable strict mode later
65+
- name: Build (fail on warnings)
66+
run: |
67+
cd mkdocs
68+
mkdocs build
69+
70+
- name: Deploy to GitHub Pages
71+
run: |
72+
cd mkdocs
73+
mkdocs gh-deploy --force

0 commit comments

Comments
 (0)