Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .github/actions/build/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ inputs:
docker_image:
description: Docker image
required: true
default: kmake-image:latest
workspace_path:
description: Workspace path
required: true
Expand Down
17 changes: 10 additions & 7 deletions .github/actions/build_ubuntu/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,9 @@ inputs:
firmware:
description: Firmware file to use for the build
required: true
docker_image:
description: Full docker image name with tag (e.g. kmake-image-ubuntu-noble-arm64:ver.1.0)
required: true

outputs:
artifacts_location:
Expand All @@ -56,8 +59,8 @@ runs:
- name: Pull Docker image for building Ubuntu packages
uses: qualcomm-linux/kernel-config/.github/actions/pull_docker_image@main
with:
image: kmake-image-ubuntu-noble-arm64:ver.1.0
tag: ubuntu-noble-arm64
image: ${{ inputs.docker_image }}
registry: artifacts.codelinaro.org/clo-420-qli-registry

- name: Setup git config and Logging
shell: bash
Expand Down Expand Up @@ -124,7 +127,7 @@ runs:
echo "==>Logging to $LOGFILE"
echo "=== Kernel Build Log ===" >> "$LOGFILE"
docker run -i \
--privileged --rm -v $PWD:$PWD --workdir="$PWD" kmake-image:ubuntu-noble-arm64 \
--privileged --rm -v $PWD:$PWD --workdir="$PWD" ${{ inputs.docker_image }} \
-c '
cd kernel
export BUILD_TOP=${{ env.build_top }}
Expand All @@ -139,7 +142,7 @@ runs:
run: |
echo "::group::$(printf '__________ %-100s' 'Generate Kernel Debian Package' | tr ' ' _)"
docker run -i \
--privileged --rm -v $PWD:$PWD --workdir="$PWD" kmake-image:ubuntu-noble-arm64 \
--privileged --rm -v $PWD:$PWD --workdir="$PWD" ${{ inputs.docker_image }} \
-c '
cd kernel
# Run build-kernel-deb.sh and pass as argument the directory where kernel build artifacts were deployed (out/)
Expand Down Expand Up @@ -178,7 +181,7 @@ runs:
echo "==>Logging to $LOGFILE"
echo "=== Ubuntu Rootfs Build Log ===" >> "$LOGFILE"
docker run -i \
--privileged --rm -v /dev:/dev -v $PWD:$PWD --workdir="$PWD" kmake-image:ubuntu-noble-arm64 \
--privileged --rm -v /dev:/dev -v $PWD:$PWD --workdir="$PWD" ${{ inputs.docker_image }} \
-c '
FIRMWARE="${{ inputs.firmware }}"
firmware=$(basename "$FIRMWARE")
Expand All @@ -194,7 +197,7 @@ runs:
run: |
echo "::group::$(printf '__________ %-100s' 'Generate dtb.bin' | tr ' ' _)"
docker run -i \
--privileged --rm -v $PWD:$PWD --workdir="$PWD" kmake-image:ubuntu-noble-arm64 \
--privileged --rm -v $PWD:$PWD --workdir="$PWD" ${{ inputs.docker_image }} \
-c "
sed -i 's/\r$//' /usr/bin/generate_boot_bins.sh
generate_boot_bins.sh dtb --input kernel/out/${{ inputs.machine }}.dtb --output images
Expand Down Expand Up @@ -323,7 +326,7 @@ runs:
shell: bash
run: |
docker run -i \
--privileged --rm -v $PWD:$PWD --workdir="$PWD" kmake-image:ubuntu-noble-arm64 \
--privileged --rm -v $PWD:$PWD --workdir="$PWD" ${{ inputs.docker_image }} \
-c 'rm -rf ${{ github.workspace }}/*'

- name: Update Summary
Expand Down
1 change: 0 additions & 1 deletion .github/actions/lava_job_render/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ inputs:
docker_image:
description: Docker image
required: true
default: kmake-image:ver.1.0
kernel_version:
description: Kernel Version
required: true
Expand Down
36 changes: 27 additions & 9 deletions .github/actions/pull_docker_image/action.yml
Comment thread
prouthu-qti marked this conversation as resolved.
Original file line number Diff line number Diff line change
Expand Up @@ -5,20 +5,38 @@ inputs:
image:
description: The docker image to pull
required: true
default: kmake-image:ver.1.0

tag:
description: The tag to apply to the pulled image
required: false
default: ver.1.0
registry:
description: "Registry to pull from. E.g. '<account>.dkr.ecr.<region>.amazonaws.com' or 'artifacts.codelinaro.org/clo-420-qli-registry'"
required: true

runs:
using: "composite"
steps:
- name: Authenticate to registry (ECR only)
shell: bash
run: |
REGISTRY="${{ inputs.registry }}"
if [[ "$REGISTRY" == *.dkr.ecr.*.amazonaws.com ]]; then
echo "ECR registry detected — authenticating..."
REGION=$(echo "$REGISTRY" | grep -oP '(?<=dkr\.ecr\.)[^.]+')
aws ecr get-login-password --region "$REGION" | \
docker login --username AWS --password-stdin "$REGISTRY"
else
echo "Non-ECR registry — skipping authentication."
fi

- name: Pull Docker image
shell: bash
run: |
echo "Pulling Docker image: ${{ inputs.image }}"
docker pull artifacts.codelinaro.org/clo-420-qli-registry/${{ inputs.image }}
echo "Docker image pulled successfully:"
docker tag artifacts.codelinaro.org/clo-420-qli-registry/${{ inputs.image }} kmake-image:${{ inputs.tag }}
echo "Pulling Docker image: ${{ inputs.registry }}/${{ inputs.image }}"
docker pull "${{ inputs.registry }}/${{ inputs.image }}"
echo "Docker image pulled successfully."

- name: Retag image locally
shell: bash
run: |
FULL_IMAGE="${{ inputs.registry }}/${{ inputs.image }}"
# Retag using the original image name (strips registry prefix, preserves original tag)
docker tag "$FULL_IMAGE" "${{ inputs.image }}"
echo "Image tagged as ${{ inputs.image }} successfully."
2 changes: 1 addition & 1 deletion .github/workflows/build-yocto.yml
Original file line number Diff line number Diff line change
Expand Up @@ -99,4 +99,4 @@ jobs:
token: ${{ secrets.PAT }}
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_REGION: us-west-2
AWS_REGION: ${{ secrets.AWS_REGION }}
3 changes: 2 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ jobs:
uses: qualcomm-linux/kernel-config/.github/actions/pull_docker_image@main
with:
image: ${{ inputs.docker_image }}
registry: ${{ secrets.AWS_ACCOUNT_ID }}.dkr.ecr.${{ secrets.AWS_REGION }}.amazonaws.com

- name: Build workspace
id: build_workspace
Expand Down Expand Up @@ -114,7 +115,7 @@ jobs:
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_REGION: us-west-2
AWS_REGION: ${{ secrets.AWS_REGION }}

- name: Upload artifacts
id: upload-artifacts
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/build_rt.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ jobs:
uses: qualcomm-linux/kernel-config/.github/actions/pull_docker_image@main
with:
image: ${{ inputs.docker_image }}
registry: ${{ secrets.AWS_ACCOUNT_ID }}.dkr.ecr.${{ secrets.AWS_REGION }}.amazonaws.com

- name: Build workspace
id: build_workspace
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/pre_merge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ jobs:
uses: qualcomm-linux/kernel-config/.github/workflows/build.yml@main
secrets: inherit
with:
docker_image: kmake-image:ver.1.0
docker_image: ${{ vars.TECH_TEAM_NAMESPACE }}/kmake-image:${{ vars.KMAKE_IMAGE_VERSION }}
pr_number: ${{ inputs.pr }}
branch: ${{ inputs.ref }}
repo: ${{ inputs.repo }}
Expand All @@ -55,7 +55,7 @@ jobs:
uses: qualcomm-linux/kernel-config/.github/workflows/build_rt.yml@main
secrets: inherit
with:
docker_image: kmake-image:ver.1.0
docker_image: ${{ vars.TECH_TEAM_NAMESPACE }}/kmake-image:${{ vars.KMAKE_IMAGE_VERSION }}
pr_number: ${{ inputs.pr }}
branch: ${{ inputs.ref }}
repo: ${{ inputs.repo }}
Expand All @@ -80,7 +80,7 @@ jobs:
uses: qualcomm-linux/kernel-config/.github/workflows/test.yml@main
secrets: inherit
with:
docker_image: kmake-image:ver.1.0
docker_image: ${{vars.TECH_TEAM_NAMESPACE}}/kmake-image:${{vars.KMAKE_IMAGE_VERSION}}
rootfs_matrix: ${{ needs.loading.outputs.rootfs_matrix }}
kernel_version: ${{ needs.build.outputs.kernel_version }}
commit_SHA: ${{ inputs.sha }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ on:
description: Docker image
type: string
required: true
default: kmake-image:ver.1.0

rootfs_matrix:
description: Full matrix containing lava description
Expand Down Expand Up @@ -66,6 +65,7 @@ jobs:
uses: qualcomm-linux/kernel-config/.github/actions/pull_docker_image@main
with:
image: ${{ inputs.docker_image }}
registry: ${{ secrets.AWS_ACCOUNT_ID }}.dkr.ecr.${{ secrets.AWS_REGION }}.amazonaws.com

- name: Download URLs list
if: ${{ inputs.build_type == 'kbdev' }}
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/ubuntu-package-generation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,9 @@ jobs:
target: ${{ matrix.ubuntu_matrix.target }}
efi: ${{ matrix.ubuntu_matrix.efi }}
firmware: ${{ matrix.ubuntu_matrix.firmware }}
docker_image: ${{ vars.TECH_TEAM_NAMESPACE }}/kmake-image-ubuntu-noble-arm64:${{ vars.KMAKE_UBUNTU_IMAGE_VERSION }}
env:
token: ${{ secrets.PAT }}
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_REGION: us-west-2
AWS_REGION: ${{ secrets.AWS_REGION }}