Please follow the below rules while contributing your build script to this repo.
- Always start your build-script with shabang statement (#!/bin/bash or #!/bin/sh or #!/bin/ksh). Shabang statement should be at first line of your build-script, otherwise, ci check will fail with
exec user process caused "exec format error"error. - Below header is mandatory for the build-script:
If the build-script doesn't contain any of the field in above header, that leads to
# ----------------------------------------------------------------------------- # # Package : <Package-Name> # Version : <Default package version current build-script is going to support/validate> # Source repo : <Package source repo URL> # Tested on : <Linux OS distribution details on which build-script implemented/validated> # Language : <Programming language in which Package is implemented> # Ci-Check : <True: If build-script can be validated via ci build on docker container.> # Script License: Apache License, Version 2 or later # Maintainer : <Maintainer name along with official email-id> # # Disclaimer: This script has been tested in **root/non-root** mode on given # ========== platform using the mentioned version of the package. # It may not work as expected with newer versions of the # package and/or distribution. In such case, please # contact "Maintainer" of this script. # # ----------------------------------------------------------------------------ValueErrorin ci check. - Please mention in notes that, whether the script is made for root user or non-root user.
- Always keep the package version/commitID in variable. Try to take version as parameter otherwise take a default version number you are working on. Below is the example:
VERSION=${1:-v5.0.2} # v5.0.2 is the default version, in case of no parameter passed to the script.
- Check if package/component directory already exists and add new file into it. If not, create a directory for new package/component and place LICENSE file into it.
- Package name & Filenames must be in lowercase.
- Get Legal approvals incase of any code change/patch.
- Build script templates can be found here.
- Make sure to include test step for package so build get validated with available test's in source.
- Test the build script on clean UBI container before raising PR. Include test logs as part of PR.
- Try to create a branch on your forked repo for each PR.
- Pull Request
- Manual workflow dispatch
- Validate build scripts using CI checks:
- Shebang must be present
- Mandatory header fields must exist
- Naming conventions must be followed
- Directory structure must be correct
- Identify changed files in the PR
- Locate and parse
build_info.json - Extract flags:
wheel_builddocker_build
- Build the package using
gha-script/build_package.sh - The build must:
- Successfully install/build the package
- Include test steps for validation
Wheel Build
- Runs only if:
wheel_build = true- Build script (
.sh) is modified
- Builds wheels across multiple Python versions (3.10 – 3.14)
Docker Build
- Runs only if:
docker_build = trueDockerfileis modified
- Builds Docker image and stores it as artifact
| Change Type | Wheel Build | Docker Build |
|---|---|---|
| Build script changed | Yes | No |
| Dockerfile changed | No | Yes |
| Both changed | Yes | Yes |
| Only config changes | No | No |
| Irrelevant changes | No | No |
package-cache(environment variables and metadata)- Build logs (available in case of failures)
- CI will fail if validation checks do not pass
- Ensure
build_info.jsonis complete and correct - Enable
wheel_build/docker_buildonly when required - Test scripts locally before raising a PR
Preparation → Build → (Wheel Build + Docker Build in Parallel if applicable)