jenkins-pipelines/scripts/templates/build.conf.example.in
Scott Little 2e16d7e38e Add support for tmpfs based package builders
Partial-Bug: 2081843
Depends-On: https://review.opendev.org/c/starlingx/root/+/931221
Change-Id: I7b4a22fbd07c748ec76e070b3243dfd9c2711136
Signed-off-by: Scott Little <scott.little@windriver.com>
2024-10-03 10:59:44 -04:00

334 lines
11 KiB
Plaintext

##################################################
# Build configuration
##################################################
# Build user
BUILD_USER="jenkins"
# User name & email
USER_NAME="Jenkins"
USER_EMAIL="davlet.panech@windriver.com"
# Branch name, used as part of build directories & artifacts
BUILD_BRANCH="master"
# Branch name in Docker tag compatible format. e.g. no '/' allowed
# StarlingX release branches use r/stx.8.0 so we transform that to
# rc-stx.8.0
BUILD_BRANCH_FOR_IMAGE_TAG="${BUILD_BRANCH/#r\//rc-}"
# Project name, must be unique for a given BUILD_USER
PROJECT_ID="dpanech-debian"
# Should be the same as PROJECT_ID, but must contain only lower-case letters,
# digits and dashes. It will be used as the k8s namespace and as part of the
# build tools helm chart & service IDs.
PROJECT="$(echo $PROJECT_ID | sed -r 's/[^a-zA-Z0-9-]+/-/g' | tr A-Z a-z)"
# Repo manifest to clone
MANIFEST_URL="https://opendev.org/starlingx/manifest"
MANIFEST_BRANCH="master"
MANIFEST="default.xml"
# File containing product release information, relative to repo root
RELEASE_INFO_FILE="cgcs-root/stx/utilities/utilities/build-info/release-info.inc"
# Alternatively, set version explicitly
#SW_VERSION="22.06"
# How many times to call "build-pkgs"
BUILD_PACKAGES_ITERATIONS=3
# Debian snapshot URLs and the StarlingX mirror URL.
# Leave them empty to use the defaults hard-coded in stx/tools
DEBIAN_SNAPSHOT_BASE="http://https://snapshot.debian.org/archive/debian"
DEBIAN_SECURITY_SNAPSHOT_BASE="https://snapshot.debian.org/archive/debian-security"
STX_MIRROR_URL="https://mirror.starlingx.windriver.com/mirror"
# Signing server for formal ISO and secureboot signing (see below)
SIGNING_SERVER="some.host.org"
SIGNING_USER="some_user_id"
# Sign ISO with a key controlled by $SIGNING_SERVER
# If false, ISO will be signed with developer key in
# cgcs-root/build-tools/signing/dev-private-key.pem
SIGN_ISO_FORMAL=true
# Sign kernel-related packages with a key & cert controlled by
# $SIGNING_SERVER. When "false", don't add secureboot signatures.
SECUREBOOT_FORMAL=true
# How many times to retry & sleep between retries, when accessing
# signing server
SIGN_MAX_ATTEMPTS=3
SIGN_BACKOFF_DELAY=10
# Run this command inside the build container at the end of the build
# Current directory will be set to $MY_WORKSPACE/export.
# This command must leave any additional files to be published in that
# directory.
#
# $MY_WORKSPACE/export will be copied to the publish area at the end.
EXTRA_EXPORT_DIR_CMD=
# Copy these additional files to $MY_WORKSPACE/export. This must be a
# whitespace or comma-separated list of glob patterns. Relative path names
# will be interpreted relative to the build output directory (ie
# BUILD_OUTPUT_ROOT/TIMESTAMP). Source repo root can be accessed as
# "root/cgcs-root/...". Patterns that begin with "-" refer to optional
# files that won't cause errors when they don't exist.
#
# $MY_WORKSPACE/export will be copied to the publish area at the end.
EXTRA_EXPORT_FILES=
# Build & publish stx-remote-cli tarball (StarlingX only)
BUILD_REMOTE_CLI=false
##################################################
# Build outputs
##################################################
# Archive artifacts in $BUILD_OUTPUT_ROOT/timestamp
BUILD_OUTPUT_ROOT="/localdisk/loadbuild/$BUILD_USER/$PROJECT_ID"
BUILD_OUTPUT_ROOT_URL="http://$(hostname -f):8088${BUILD_OUTPUT_ROOT}"
# Publish import artifacts to: $PUBLISH_ROOT/<PUBLISH_TIMESTAMP>/$PUBLISH_SUBDIR
# Create latest symlink in: $PUBLISH_ROOT/latest_build
# StarlingX Mirror: publish to a location outside of the archive directory
#PUBLISH_ROOT="/export/mirrors/$PROJECT_ID/$MANIFEST_BRANCH/debian/monolithic"
#PUBLISH_ROOT_URL="http://$(hostname -f):8088${PUBLISH_ROOT}"
#PUBLISH_SUBDIR="" # may be empty
#PUBLISH_LATEST_LINK=true # create latest symlink?
# For private builds, publish to a subdirectory of the archive location
PUBLISH_ROOT="$BUILD_OUTPUT_ROOT"
PUBLISH_ROOT_URL="http://$(hostname -f):8088${PUBLISH_ROOT}"
PUBLISH_SUBDIR="export" # may be empty
PUBLISH_LATEST_LINK=false # create latest symlink?
#
# Archiving of some of the following directories is handled specially:
# aptly
# docker
# mirrors
#
# This parameter determines how to archive them:
#
# checksum-hardlink
# Look for identical files in older builds' outputs and link
# them. Create a single StxChecksums file at the top level of the
# destination directory, containing each file's checksum and stat
# properties. Search for link candidates in older builds' outputs
# by looking for StxChecksums files there.
# This option is the default.
#
# checksum-copy
# Copy the files and create a single StxChecksums file at top level
# of the destination directory
#
# top-symlink
# Create a symlink in $BUILD_OUTPUT_HOME that points
# back to $BUILD_HOME.
#
# This parameter may also contain a list of directory:method pairs to
# use a different archiving method for each directory.
#
# Examples:
# ========
#
# # hardlink all dirs
# ARCHIVE_BIG_DIRS="checksum-hardlink" # same method for all dirs
#
# # hardlink all dirs, but symlink "mirrors"
# ARCHIVE_BIG_DIRS="checksum-hardlink mirrors:top-symlink"
#
#ARCHIVE_BIG_DIRS="checksum-hardlink"
##################################################
# Docker configuration
##################################################
# How many times to try building docker images
DOCKER_BUILD_RETRY_COUNT=3
# Sleep between retries (seconds)
DOCKER_BUILD_RETRY_DELAY=30
# Directory containing docker CLI configuration files. Defaults to $HOME/.docker.
# The file config.json in this directory should contain the following:
#
# * Credentials for Docker Hub -- we will use them when pulling or building
# builder containers. These should be read-only (ie not allow pushing), unless
# we plan to push to DockerHub (eg in official StarlingX builds).
#
# * Credentials for the registries we intend to push the app images to, if different
# from DockerHub, ie $DOCKER_REGISTRY and $DOCKER_EXTRA_REGISTRY_PREFIX_LIST
#
DOCKER_CONFIG=
# Push docker images to this registry. Empty value means docker hub.
#DOCKER_REGISTRY="some.host.org:1234"
DOCKER_REGISTRY=
# Prefix docker image names with this namespace
#DOCKER_REGISTRY_ORG="starlingx"
DOCKER_REGISTRY_ORG="SOME_USER"
# Additional "REGISTRY/NAMESPACE" to push docker images to,
# may contain multiple elements, space-separated
DOCKER_EXTRA_REGISTRY_PREFIX_LIST=
# Space separated list of docker registries that require authentication
#
# Credentials must be in $DOCKER_CONFIG_FILE
#DOCKER_REGISTRY_LOGIN_LIST="some.host.org:1234"
DOCKER_REGISTRY_LOGIN_LIST=
# Disable SSL validation for these docker registries, space-separasted
INSECURE_DOCKER_REGISTRIES="some.host.org:1234 some.other.host.org:1234"
# Use pod URLs in apt sources.list within the base image. This makes apt
# sources in docker images unuseable outside of the builder pods.
USE_POD_URLS_IN_DOCKER_IMAGES="false"
# Base image for all docker images. If unset, we will build our own.
DOCKER_IMAGE_BASE=
#
# Space or comma-separated helm chart package names or glob patterns
#
# For each matching package we will extract the charts tarball & replace
# image names & tags with images generated by the local build, once
# for -$TIMSTAMP tags and once for -latest tags.
#
# These patterns will be matched against the names in debian_helm.inc files
#
# If HELM_CHART_NAME is empty we will generate a separate tarball for each
# package.
#
# If HELM_CHART_NAME is not empty we will create a single tarball with files
# from all matching packaging. In this case the order of HELM_CHART_PACKAGES
# matters: if they provide like-named files, the last package will "win".
#
# Example 1
# =========
# HELM_CHART_PACKAGES="stx-openstack-helm"
# HELM_CHART_NAME=""
#
# will generate tarballs similar to:
#
# stx-openstack-1.0-1.stx.4-debian-stable-latest.tgz
# stx-openstack-1.0-1.stx.4-debian-stable-versioned.tgz
#
# Example 2
# =========
# HELM_CHART_PACKAGES="stx-openstack-helm custom-helmcharts"
# HELM_CHART_NAME="myhelmcharts"
#
# will generate tarballs similar to:
#
# myhelmcharts-1.0-1.stx.4-debian-stable-latest.tgz
# myhelmcharts-1.0-1.stx.4-debian-stable-versioned.tgz
#
HELM_CHART_PACKAGES=
HELM_CHART_NAME=
#
# Space or comma-separated helm chart package names or glob patterns
#
# For each matching package we will extract the charts tarball and
# save it among build artifacts, w/o replacing the image names.
#
# These patterns will be matched against the names in debian_helm.inc files
#
# Packages that also match HELM_CHART_PACKAGES will be automatically
# excluded, even if they match this option.
#
# Example: EXTRA_HELM_CHART_PACKAGES="stx-*-helm" might create something
# like:
# stx-monitor-1.0-1.stx.1.tgz
#
EXTRA_HELM_CHART_PACKAGES=
#
# Space or comma-separated list of helm charts to exclude
#
# This will be passed to "build-helm-charts.sh --ignore <...>"
#
IGNORE_HELM_CHARTS=
# Directory containing additional image names & tags to be replaced in
# helm charts
EXTRA_IMAGE_RECORD_DIR=
#
# Managed image list file to be used for post-processing helm charts.
#
# If this parameter is non-empty, helm chart post-processing will only
# consider this file, and ignore any images created by the current build,
# and also ignore any lists in EXTRA_IMAGE_RECORD_DIR .
#
# This file name may be absolute or relative to the source tree root.
#
# Typically we should set this parameter for release branches/builds
#
MANAGED_IMAGE_LIST_FILE=
##################################################
# Jenkins & K8S parameters
##################################################
# Must be <= k8s container network's MTU
CONTAINER_MTU="1410"
# "kubernetes" or "minikube"
K8S_PLATFORM="kubernetes"
# Create builder pods in this k8s namespace
K8S_NAMESPACE="$PROJECT_ID"
# Start up time out for builder pods in seconds
BUILDER_POD_STARTUP_TIMEOUT="300"
# Used by the stx tool (?)
BUILD_CPUS=4
# Configuration for kubectl, if empty defaults to $USER/.kube/config
KUBECONFIG=/localdisk/designer/jenkins/dpanech-debian/kube-config
# Minikube profile name
MINIKUBENAME=minikube-$BUILD_USER-$PROJECT
# Minikube memory (default: auto)
MINIKUBEMEMORY=
# Minikube home dir (default: $HOME), must not be NFS
MINIKUBE_HOME=
# A jenkins "credentials" record that contains the username/password for
# accessing Jenkins' REST API.
JENKINS_API_CREDENTIALS_ID="jenkins-api"
# GNU parallel - if not empty must be a command installed on host
# Makes some operations faster
PARALLEL_CMD="parallel"
PARALLEL_CMD_JOBS="12"
# How many chroots & build-pkgs jobs to run in parallel
# Default: 1
#BUILD_PACKAGES_PARALLEL_JOBS=
# What percentage of memory can be used towards tmpfs based parallel
# build environments.
# Default 0
# Range: 0-50
#BUILD_PACKAGES_TMPFS_PERCENTAGE=
# URL of the deb-local-build and deb-local-source repos from which we
# will pull pre-build packages if the PKG_REUSE flag is requested.
# The following URLs are examples applicable only to the master branch.
# Substituting a reference build local to your office would be a lot
# faster than pulling from the StarlingX mirror.
#STX_SHARED_REPO=http://mirror.starlingx.windriver.com/mirror/starlingx/master/debian/monolithic/latest_build/outputs/aptly/deb-local-build
#STX_SHARED_SOURCE=http://mirror.starlingx.windriver.com/mirror/starlingx/master/debian/monolithic/latest_build/outputs/aptly/deb-local-source