Skip to content

Commit 062ed31

Browse files
authored
Merge branch 'main' into domain-name-regex-characters-not-scaped
2 parents e26c9a6 + 3f6866d commit 062ed31

545 files changed

Lines changed: 26214 additions & 7305 deletions

File tree

Some content is hidden

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

.asf.yaml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,10 +50,13 @@ github:
5050
rebase: false
5151

5252
collaborators:
53-
- gpordeus
53+
- ingox
54+
- gp-santos
5455
- erikbocks
5556
- Imvedansh
5657
- Damans227
58+
- jmsperu
59+
- GaOrtiga
5760

5861
protected_branches: ~
5962

.github/CODEOWNERS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717

1818
/plugins/storage/volume/linstor @rp-
1919
/plugins/storage/volume/storpool @slavkap
20+
/plugins/storage/volume/ontap @rajiv1 @sandeeplocharla @piyush5 @suryag
2021

2122
.pre-commit-config.yaml @jbampton
2223
/.github/linters/ @jbampton
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
# Licensed to the Apache Software Foundation (ASF) under one
2+
# or more contributor license agreements. See the NOTICE file
3+
# distributed with this work for additional information
4+
# regarding copyright ownership. The ASF licenses this file
5+
# to you under the Apache License, Version 2.0 (the
6+
# "License"); you may not use this file except in compliance
7+
# with 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,
12+
# software distributed under the License is distributed on an
13+
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14+
# KIND, either express or implied. See the License for the
15+
# specific language governing permissions and limitations
16+
# under the License.
17+
18+
name: 'Install CloudStack Non-OSS'
19+
description: 'Clones and installs the shapeblue/cloudstack-nonoss repository.'
20+
21+
runs:
22+
using: "composite"
23+
steps:
24+
- name: Install cloudstack-nonoss
25+
shell: bash
26+
run: |
27+
git clone --depth 1 https://github.com/shapeblue/cloudstack-nonoss.git nonoss
28+
cd nonoss
29+
bash -x install-non-oss.sh
30+
cd ..
31+
rm -fr nonoss
Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
# Licensed to the Apache Software Foundation (ASF) under one
2+
# or more contributor license agreements. See the NOTICE file
3+
# distributed with this work for additional information
4+
# regarding copyright ownership. The ASF licenses this file
5+
# to you under the Apache License, Version 2.0 (the
6+
# "License"); you may not use this file except in compliance
7+
# with 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,
12+
# software distributed under the License is distributed on an
13+
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14+
# KIND, either express or implied. See the License for the
15+
# specific language governing permissions and limitations
16+
# under the License.
17+
18+
name: 'Setup CloudStack Environment'
19+
description: 'Sets up JDK (with Maven cache), optionally Python, and optionally APT build dependencies for CloudStack.'
20+
21+
inputs:
22+
java-version:
23+
description: 'The JDK version to use'
24+
required: false
25+
default: '17'
26+
install-python:
27+
description: 'Whether to install Python 3.10'
28+
required: false
29+
default: 'false'
30+
install-apt-deps:
31+
description: 'Whether to install CloudStack APT build dependencies'
32+
required: false
33+
default: 'false'
34+
35+
runs:
36+
using: "composite"
37+
steps:
38+
- name: Set up JDK ${{ inputs.java-version }}
39+
uses: actions/setup-java@be666c2fcd27ec809703dec50e508c2fdc7f6654 # v5.2.0
40+
with:
41+
java-version: ${{ inputs.java-version }}
42+
distribution: 'adopt'
43+
architecture: x64
44+
cache: 'maven'
45+
46+
- name: Set up Python
47+
if: ${{ inputs.install-python == 'true' }}
48+
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
49+
with:
50+
python-version: '3.10'
51+
architecture: x64
52+
53+
- name: Install Build Dependencies
54+
if: ${{ inputs.install-apt-deps == 'true' }}
55+
shell: bash
56+
run: |
57+
sudo apt-get update
58+
sudo apt-get install -y git uuid-runtime genisoimage netcat-openbsd ipmitool build-essential libgcrypt20 libgpg-error-dev libgpg-error0 libopenipmi0 libpython3-dev libssl-dev libffi-dev python3-openssl python3-dev python3-setuptools

.github/workflows/build.yml

Lines changed: 13 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -16,40 +16,27 @@
1616
# under the License.
1717

1818
name: Build
19-
20-
on: [push, pull_request]
21-
19+
on:
20+
- push
21+
- pull_request
2222
concurrency:
2323
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
24-
cancel-in-progress: true
25-
24+
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}
2625
permissions:
2726
contents: read
28-
2927
jobs:
3028
build:
31-
runs-on: ubuntu-22.04
29+
runs-on: ubuntu-24.04
3230
steps:
33-
- uses: actions/checkout@v6
34-
35-
- name: Set up JDK 17
36-
uses: actions/setup-java@v5
31+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
3732
with:
38-
distribution: 'temurin'
39-
java-version: '17'
40-
cache: 'maven'
33+
persist-credentials: false
4134

42-
- name: Set up Python
43-
uses: actions/setup-python@v6
35+
- name: Setup Environment
36+
uses: ./.github/actions/setup-env
4437
with:
45-
python-version: '3.10'
46-
architecture: 'x64'
47-
48-
- name: Install Build Dependencies
49-
run: |
50-
sudo apt-get update
51-
sudo apt-get install -y git uuid-runtime genisoimage netcat ipmitool build-essential libgcrypt20 libgpg-error-dev libgpg-error0 libopenipmi0 ipmitool libpython3-dev libssl-dev libffi-dev python3-openssl python3-dev python3-setuptools
52-
38+
install-python: 'true'
39+
install-apt-deps: 'true'
5340
- name: Env details
5441
run: |
5542
uname -a
@@ -60,9 +47,8 @@ jobs:
6047
free -m
6148
nproc
6249
git status
63-
50+
- name: Install Non-OSS
51+
uses: ./.github/actions/install-nonoss
6452
- name: Noredist Build
6553
run: |
66-
git clone https://github.com/shapeblue/cloudstack-nonoss.git nonoss && cd nonoss && bash -x install-non-oss.sh && cd ..
67-
rm -fr nonoss
6854
mvn -B -P developer,systemvm -Dsimulator -Dnoredist clean install -T$(nproc)

.github/workflows/ci.yml

Lines changed: 59 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -16,21 +16,56 @@
1616
# under the License.
1717

1818
name: Simulator CI
19-
20-
on: [push, pull_request]
21-
19+
on:
20+
- push
21+
- pull_request
2222
concurrency:
2323
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
24-
cancel-in-progress: true
25-
24+
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}
2625
permissions:
2726
contents: read
28-
2927
jobs:
3028
build:
3129
if: github.repository == 'apache/cloudstack'
3230
runs-on: ubuntu-24.04
33-
31+
steps:
32+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
33+
with:
34+
fetch-depth: 0
35+
persist-credentials: false
36+
- name: Setup Environment
37+
uses: ./.github/actions/setup-env
38+
with:
39+
install-python: 'true'
40+
install-apt-deps: 'true'
41+
- name: Env details
42+
run: |
43+
uname -a
44+
whoami
45+
javac -version
46+
mvn -v
47+
python3 --version
48+
free -m
49+
nproc
50+
git status
51+
ipmitool -V
52+
- name: Build with Maven
53+
run: |
54+
mvn -B -P developer,systemvm -Dsimulator clean install -DskipTests=true -T$(nproc)
55+
- name: Archive artifacts
56+
run: |
57+
mkdir -p /tmp/artifacts
58+
tar -czf /tmp/artifacts/targets.tar.gz $(find . -name "target" -type d) tools/marvin/dist engine/schema/dist utils/conf
59+
tar -czf /tmp/artifacts/m2-cloudstack.tar.gz -C ~/.m2/repository org/apache/cloudstack
60+
- name: Upload artifacts
61+
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
62+
with:
63+
name: build-artifacts
64+
path: /tmp/artifacts/
65+
test:
66+
needs: build
67+
if: github.repository == 'apache/cloudstack'
68+
runs-on: ubuntu-24.04
3469
strategy:
3570
fail-fast: false
3671
matrix:
@@ -215,30 +250,16 @@ jobs:
215250
smoke/test_list_service_offerings
216251
smoke/test_list_storage_pools
217252
smoke/test_list_volumes"]
218-
219253
steps:
220-
- uses: actions/checkout@v6
254+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
221255
with:
222256
fetch-depth: 0
223-
224-
- name: Set up JDK 17
225-
uses: actions/setup-java@v5
257+
persist-credentials: false
258+
- name: Setup Environment
259+
uses: ./.github/actions/setup-env
226260
with:
227-
distribution: 'temurin'
228-
java-version: '17'
229-
cache: 'maven'
230-
231-
- name: Set up Python
232-
uses: actions/setup-python@v6
233-
with:
234-
python-version: '3.10'
235-
architecture: 'x64'
236-
237-
- name: Install Build Dependencies
238-
run: |
239-
sudo apt-get update
240-
sudo apt-get install -y git uuid-runtime genisoimage netcat-openbsd ipmitool build-essential libgcrypt20 libgpg-error-dev libgpg-error0 libopenipmi0 ipmitool libpython3-dev libssl-dev libffi-dev python3-openssl python3-dev python3-setuptools
241-
261+
install-python: 'true'
262+
install-apt-deps: 'true'
242263
- name: Setup IPMI Tool for CloudStack
243264
run: |
244265
# Create cloudstack-common directory if it doesn't exist
@@ -256,55 +277,43 @@ jobs:
256277
/usr/share/cloudstack-common/ipmitool -C3 $@
257278
EOF
258279
sudo chmod 755 /usr/bin/ipmitool
259-
260280
- name: Install Python dependencies
261281
run: |
262282
python3 -m pip install --user --upgrade urllib3 lxml paramiko nose texttable ipmisim pyopenssl pycryptodome mock flask netaddr pylint pycodestyle six astroid pynose
263-
264283
- name: Install jacoco dependencies
265284
run: |
266285
wget https://github.com/jacoco/jacoco/releases/download/v0.8.10/jacoco-0.8.10.zip
267286
unzip jacoco-0.8.10.zip -d jacoco
268-
269-
- name: Env details
270-
run: |
271-
uname -a
272-
whoami
273-
javac -version
274-
mvn -v
275-
python3 --version
276-
free -m
277-
nproc
278-
git status
279-
ipmitool -V
280-
281287
- name: Setup MySQL Server
282288
run: |
283289
# https://github.com/actions/runner-images/blob/main/images/linux/Ubuntu2004-Readme.md#mysql
284290
sudo apt-get install -y mysql-server
285291
sudo systemctl start mysql
286-
sudo mysql -uroot -proot -e "ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY ''; FLUSH PRIVILEGES;"
292+
sudo mysql -uroot -proot -e "ALTER USER 'root'@'localhost' IDENTIFIED WITH caching_sha2_password BY ''; FLUSH PRIVILEGES;"
287293
sudo systemctl restart mysql
288294
sudo mysql -uroot -e "SELECT VERSION();"
289-
290-
- name: Build with Maven
295+
- name: Download artifacts
296+
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
297+
with:
298+
name: build-artifacts
299+
path: /tmp/artifacts/
300+
- name: Extract artifacts
291301
run: |
292-
mvn -B -P developer,systemvm -Dsimulator clean install -DskipTests=true -T$(nproc)
293-
302+
tar -xzf /tmp/artifacts/targets.tar.gz
303+
mkdir -p ~/.m2/repository
304+
tar -xzf /tmp/artifacts/m2-cloudstack.tar.gz -C ~/.m2/repository
294305
- name: Setup Simulator Prerequisites
295306
run: |
296307
sudo python3 -m pip install --upgrade netaddr mysql-connector-python
297308
python3 -m pip install --user --upgrade tools/marvin/dist/[mM]arvin-*.tar.gz
298309
mvn -q -Pdeveloper -pl developer -Ddeploydb
299310
mvn -q -Pdeveloper -pl developer -Ddeploydb-simulator
300-
301311
- name: Generate jacoco-coverage.sh
302312
run: |
303313
echo "java -jar jacoco/lib/jacococli.jar report jacoco-it.exec \\" > jacoco-report.sh
304314
find . | grep "target/classes" | sed 's/\/classes\//\/classes /g' | awk '{print "--classfiles", $1, "\\"}' | sort |uniq >> jacoco-report.sh
305315
find . | grep "src/main/java" | sed 's/\/java\//\/java /g' | awk '{print "--sourcefiles", $1, "\\"}' | sort | uniq >> jacoco-report.sh
306316
echo "--xml jacoco-coverage.xml" >> jacoco-report.sh
307-
308317
- name: Start CloudStack Management Server with Simulator
309318
run: |
310319
export MAVEN_OPTS="-Xmx4096m -XX:MaxMetaspaceSize=800m -Djava.security.egd=file:/dev/urandom -javaagent:jacoco/lib/jacocoagent.jar=address=*,port=36320,output=tcpserver --add-opens=java.base/java.lang=ALL-UNNAMED --add-exports=java.base/sun.security.x509=ALL-UNNAMED --add-opens=java.base/jdk.internal.reflect=ALL-UNNAMED"
@@ -315,7 +324,6 @@ jobs:
315324
set -e
316325
echo -e "\nStarting Advanced Zone DataCenter deployment"
317326
python3 tools/marvin/marvin/deployDataCenter.py -i setup/dev/advdualzone.cfg 2>&1 || true
318-
319327
- name: Run Integration Tests with Simulator
320328
run: |
321329
mkdir -p integration-test-results/smoke/misc
@@ -335,13 +343,12 @@ jobs:
335343
bash jacoco-report.sh
336344
mvn -Dsimulator -pl client jetty:stop 2>&1
337345
find /tmp//MarvinLogs -type f -exec echo -e "Printing marvin logs {} :\n" \; -exec cat {} \;
338-
339346
- name: Integration Tests Result
340347
run: |
341348
echo -e "Simulator CI Test Results: (only failures listed)\n"
342349
python3 ./tools/marvin/xunit-reader.py integration-test-results/
343350
344-
- uses: codecov/codecov-action@v4
351+
- uses: codecov/codecov-action@e79a6962e0d4c0c17b229090214935d2e33f8354 # v6.0.1
345352
with:
346353
files: jacoco-coverage.xml
347354
fail_ci_if_error: true

0 commit comments

Comments
 (0)