Skip to content

Commit 6674bd9

Browse files
committed
Merge branch 'main' into rhel-enabling
2 parents 9884528 + 5ac46c9 commit 6674bd9

121 files changed

Lines changed: 13998 additions & 412 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.

.coverage-threshold

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
64.2
1+
65.5
Lines changed: 95 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,95 @@
1+
name: Build Azure Linux Raw Image - ARM
2+
on:
3+
workflow_dispatch: # Manual runs
4+
push:
5+
inputs:
6+
ref:
7+
description: "Branch or SHA to test (e.g. feature/x or a1b2c3)"
8+
required: false
9+
run_qemu_test:
10+
description: "Run QEMU boot test after build"
11+
required: false
12+
default: "false"
13+
type: choice
14+
options:
15+
- "true"
16+
- "false"
17+
permissions:
18+
contents: read
19+
20+
jobs:
21+
build-azl3-arm-raw:
22+
runs-on: ubuntu-24.04-arm
23+
steps:
24+
- name: Checkout code
25+
uses: actions/checkout@v4
26+
with:
27+
persist-credentials: false
28+
29+
- name: Set up Docker Buildx
30+
uses: docker/setup-buildx-action@v3
31+
32+
- name: Install Earthly
33+
uses: earthly/actions-setup@v1
34+
with:
35+
github-token: ${{ secrets.GITHUB_TOKEN }}
36+
version: "latest"
37+
38+
- name: Install system deps
39+
run: |
40+
sudo apt-get update
41+
sudo apt-get install -y qemu-system-aarch64 ovmf tree jq systemd-ukify mmdebstrap systemd-boot qemu-efi-aarch64
42+
43+
- name: Set up Go
44+
uses: actions/setup-go@v5
45+
with:
46+
go-version: stable
47+
48+
- name: Prepare build script
49+
run: |
50+
if [ ! -f scripts/build_azl3_arm_raw.sh ]; then
51+
echo "scripts/build_azl3_arm_raw.sh not found!"
52+
exit 1
53+
fi
54+
chmod +x scripts/build_azl3_arm_raw.sh
55+
56+
- name: Run azl3 Raw Image Build
57+
env:
58+
#RUN_QEMU_TEST: ${{ github.event.push }}
59+
RUN_QEMU_TEST: false
60+
run: |
61+
echo "Starting azl3 raw image build..."
62+
# Ensure script has access to docker group for Earthly
63+
sudo usermod -aG docker $USER
64+
65+
# Prepare arguments with input validation
66+
ARGS=""
67+
case "${RUN_QEMU_TEST}" in
68+
"true")
69+
ARGS="--qemu-test"
70+
echo "QEMU boot test will be run after build"
71+
;;
72+
"false"|"")
73+
echo "QEMU boot test will be skipped"
74+
;;
75+
*)
76+
echo "Invalid input for run_qemu_test: ${RUN_QEMU_TEST}"
77+
exit 1
78+
;;
79+
esac
80+
81+
# Run the azl3 raw image build script
82+
./scripts/build_azl3_arm_raw.sh $ARGS
83+
echo "azl3 raw image build completed."
84+
85+
- name: Set file permissions for artifacts
86+
run: |
87+
sudo chmod -R 755 workspace/ || true
88+
find workspace/*/imagebuild/*/ -name "*.raw*" -exec chmod 777 {} \; || true
89+
- name: GitHub Upload Release Artifacts
90+
uses: actions/upload-artifact@v4
91+
with:
92+
name: azl3-arm-raw-image
93+
path: |
94+
workspace/*/imagebuild/*/*.raw*
95+
retention-days: 30
Lines changed: 102 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,102 @@
1+
name: Build ELXR12 Raw Image - ARM
2+
on:
3+
workflow_dispatch: # Manual runs
4+
inputs:
5+
ref:
6+
description: "Branch or SHA to test (e.g. feature/x or a1b2c3)"
7+
required: false
8+
run_qemu_test:
9+
description: "Run QEMU boot test after build"
10+
required: false
11+
default: "false"
12+
type: choice
13+
options:
14+
- "true"
15+
- "false"
16+
push:
17+
branches:
18+
- main
19+
pull_request:
20+
branches:
21+
- main
22+
23+
permissions:
24+
contents: read
25+
26+
jobs:
27+
build-elxr12-arm-raw:
28+
runs-on: ubuntu-24.04-arm
29+
steps:
30+
- name: Checkout code
31+
uses: actions/checkout@v4
32+
with:
33+
persist-credentials: false
34+
ref: ${{ github.event.inputs.ref || github.ref }}
35+
36+
- name: Set up Docker Buildx
37+
uses: docker/setup-buildx-action@v3
38+
39+
- name: Install Earthly
40+
uses: earthly/actions-setup@v1
41+
with:
42+
github-token: ${{ secrets.GITHUB_TOKEN }}
43+
version: "latest"
44+
45+
- name: Install system deps
46+
run: |
47+
sudo apt-get update
48+
sudo apt-get install -y qemu-system-aarch64 ovmf tree jq systemd-ukify mmdebstrap systemd-boot qemu-efi-aarch64
49+
50+
- name: Set up Go
51+
uses: actions/setup-go@v5
52+
with:
53+
go-version: stable
54+
55+
- name: Prepare build script
56+
run: |
57+
if [ ! -f scripts/build_elxr12_arm_raw.sh ]; then
58+
echo "scripts/build_elxr12_arm_raw.sh not found!"
59+
exit 1
60+
fi
61+
chmod +x scripts/build_elxr12_arm_raw.sh
62+
63+
- name: Run ARM ELXR12 Raw Image Build
64+
env:
65+
#RUN_QEMU_TEST: ${{ github.event.inputs.run_qemu_test }}
66+
RUN_QEMU_TEST: false
67+
run: |
68+
echo "Starting ARM ELXR12 raw image build..."
69+
# Ensure script has access to docker group for Earthly
70+
sudo usermod -aG docker $USER
71+
72+
# Prepare arguments with input validation
73+
ARGS=""
74+
case "${RUN_QEMU_TEST}" in
75+
"true")
76+
ARGS="--qemu-test"
77+
echo "QEMU boot test will be run after build"
78+
;;
79+
"false"|"")
80+
echo "QEMU boot test will be skipped"
81+
;;
82+
*)
83+
echo "Invalid input for run_qemu_test: ${RUN_QEMU_TEST}"
84+
exit 1
85+
;;
86+
esac
87+
88+
# Run the ELXR12 raw image build script
89+
./scripts/build_elxr12_arm_raw.sh $ARGS
90+
echo "ELXR12 raw image build completed."
91+
- name: Set file permissions for artifacts
92+
run: |
93+
sudo chmod -R 755 workspace/ || true
94+
find workspace/*/imagebuild/*/ -name "*.raw*" -exec chmod 777 {} \; || true
95+
96+
- name: GitHub Upload Release Artifacts
97+
uses: actions/upload-artifact@v4
98+
with:
99+
name: elxr12-arm-raw-image
100+
path: |
101+
workspace/*/imagebuild/*/*.raw*
102+
retention-days: 30

.github/workflows/build-elxr12-raw.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,4 +104,4 @@ jobs:
104104
-H "Authorization: Bearer $GITHUB_TOKEN" \
105105
-H "Accept: application/vnd.github.v3+json" \
106106
--data "{\"body\": \"$COMMENT_BODY\"}" \
107-
"https://api.github.com/repos/${{ github.repository }}/issues/${{ github.event.pull_request.number }}/comments"
107+
"https://api.github.com/repos/${{ github.repository }}/issues/${{ github.event.pull_request.number }}/comments"
Lines changed: 96 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,96 @@
1+
name: Build Ubuntu24 Raw Image - ARM
2+
on:
3+
workflow_dispatch: # Manual runs
4+
push:
5+
inputs:
6+
ref:
7+
description: "Branch or SHA to test (e.g. feature/x or a1b2c3)"
8+
required: false
9+
run_qemu_test:
10+
description: "Run QEMU boot test after build"
11+
required: false
12+
default: "false"
13+
type: choice
14+
options:
15+
- "true"
16+
- "false"
17+
18+
permissions:
19+
contents: read
20+
21+
jobs:
22+
build-ubuntu24-arm-raw:
23+
runs-on: ubuntu-24.04-arm
24+
steps:
25+
- name: Checkout code
26+
uses: actions/checkout@v4
27+
with:
28+
persist-credentials: false
29+
30+
- name: Set up Docker Buildx
31+
uses: docker/setup-buildx-action@v3
32+
33+
- name: Install Earthly
34+
uses: earthly/actions-setup@v1
35+
with:
36+
github-token: ${{ secrets.GITHUB_TOKEN }}
37+
version: "latest"
38+
39+
- name: Install system deps
40+
run: |
41+
sudo apt-get update
42+
sudo apt-get install -y qemu-system-aarch64 ovmf tree jq systemd-ukify mmdebstrap systemd-boot qemu-efi-aarch64
43+
44+
- name: Set up Go
45+
uses: actions/setup-go@v5
46+
with:
47+
go-version: stable
48+
49+
- name: Prepare build script
50+
run: |
51+
if [ ! -f scripts/build_ubuntu24_arm_raw.sh ]; then
52+
echo "scripts/build_ubuntu24_arm_raw.sh not found!"
53+
exit 1
54+
fi
55+
chmod +x scripts/build_ubuntu24_arm_raw.sh
56+
57+
- name: Run Ubuntu24 Raw Image Build
58+
env:
59+
#RUN_QEMU_TEST: ${{ github.event.push }}
60+
RUN_QEMU_TEST: false
61+
run: |
62+
echo "Starting Ubuntu24 raw image build..."
63+
# Ensure script has access to docker group for Earthly
64+
sudo usermod -aG docker $USER
65+
66+
# Prepare arguments with input validation
67+
ARGS=""
68+
case "${RUN_QEMU_TEST}" in
69+
"true")
70+
ARGS="--qemu-test"
71+
echo "QEMU boot test will be run after build"
72+
;;
73+
"false"|"")
74+
echo "QEMU boot test will be skipped"
75+
;;
76+
*)
77+
echo "Invalid input for run_qemu_test: ${RUN_QEMU_TEST}"
78+
exit 1
79+
;;
80+
esac
81+
82+
# Run the Ubuntu24 raw image build script
83+
./scripts/build_ubuntu24_arm_raw.sh $ARGS
84+
echo "Ubuntu24 raw image build completed."
85+
- name: Set file permissions for artifacts
86+
run: |
87+
sudo chmod -R 755 workspace/ || true
88+
find workspace/*/imagebuild/minimal/ -name "*.raw*" -exec chmod 777 {} \; || true
89+
90+
- name: GitHub Upload Release Artifacts
91+
uses: actions/upload-artifact@v4
92+
with:
93+
name: ubuntu24-arm-raw-image
94+
path: |
95+
workspace/*/imagebuild/minimal/*.raw*
96+
retention-days: 30

.github/workflows/unit-test-and-coverage-gate.yml

Lines changed: 12 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -185,22 +185,21 @@ jobs:
185185
# Only update if new threshold is higher than old threshold
186186
if (( $(echo "$NEW_THRESHOLD > $OLD_THRESHOLD" | bc -l) )); then
187187
echo "Updating threshold: ${OLD_THRESHOLD}% -> ${NEW_THRESHOLD}%"
188-
echo "${NEW_THRESHOLD}" > .coverage-threshold
189188
190-
# Configure git
191-
git config user.name "github-actions[bot]"
192-
git config user.email "github-actions[bot]@users.noreply.github.com"
189+
# Update threshold file content
190+
echo "${NEW_THRESHOLD}" > .coverage-threshold
193191
194-
# Fetch and checkout the branch
195-
git fetch origin "${BRANCH}"
196-
git checkout "${BRANCH}"
197-
# Ensure branch is up to date in case it changed after the workflow started
198-
git pull --rebase origin "${BRANCH}"
192+
# Use GitHub API to create a signed commit
193+
# Get current file SHA
194+
FILE_SHA=$(gh api repos/${{ github.repository }}/contents/.coverage-threshold?ref=${BRANCH} --jq '.sha')
199195
200-
# Stage and commit
201-
git add .coverage-threshold
202-
git commit -m "chore: auto-update coverage threshold to ${NEW_THRESHOLD}% (was ${OLD_THRESHOLD}%)"
203-
git push origin "${BRANCH}"
196+
# Create commit using GitHub API (automatically signed)
197+
gh api repos/${{ github.repository }}/contents/.coverage-threshold \
198+
-X PUT \
199+
-f message="chore: auto-update coverage threshold to ${NEW_THRESHOLD}% (was ${OLD_THRESHOLD}%)" \
200+
-f content="$(echo -n "${NEW_THRESHOLD}" | base64)" \
201+
-f branch="${BRANCH}" \
202+
-f sha="${FILE_SHA}"
204203
205204
echo "::notice::Coverage threshold updated to ${NEW_THRESHOLD}% on branch ${BRANCH}"
206205
else

.gitignore

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
1-
# ignore everything under the downloads folder
1+
# ignore build artifacts, cache files, and temporary files
22
downloads/
33
builds/
44
cache/
5-
tmp/
5+
tmp/
6+
workspace/
7+
# AI embedding cache
8+
.ai-cache/

0 commit comments

Comments
 (0)