make_patching_workspace executes the following steps:
01 - Setup env
02 - Download binaries and sources
03 - Build all pkgs and image or rsync data from source build (build-avoidance)
04 - replace build ostree_repo by ostree_repo_source
Prereqs:
- Build pre reqs for Minikube or Kubernetes
- The script uses env variables to init the repo and build the
environment.
- Env variables to export prior to running the script:
export PROJECT="stx-patch"
export STX_BUILD_HOME="/localdisk/designer/${USER}/${PROJECT}"
export MY_REPO="${STX_BUILD_HOME}/repo/cgcs-root"
# Kubernetes:
export STX_PLATFORM="kubernetes"
export STX_K8S_NAMESPACE="${USER}-${PROJECT}"
export KUBECONFIG="/build/.kube/config"
# Minikube
export STX_PLATFORM="minikube"
# Manifest and branch
export MANIFEST_URL="https://opendev.org/starlingx/manifest.git"
export MANIFEST_BRANCH="master"
export MANIFEST="default.xml"
Examples:
- Create workspace and build all packages
./make_patching_workspace.py \
--ostree-source /path_to_source_build/ostree_repo --build-all
- Create workspace and rsync source build data (aptly/mirrors)
source dir can be a source build home or a directory that contains
a copy of aptly and mirrors, these directories will be copied into
the patch build environment
./make_patching_workspace.py \
--ostree-source=/path_to_ostree/ostree_repo/ \
--build-avoidance --build-avoidance-dir=/path_to_source_dir
Test Plan:
Pass: create workspace using build-all
Pass: create workspace using build-avoidance
Pass: build-image on new workspace
* This commit also fixes the chmod permission for the
build_test_patches script.
Story: 2009969
Task: 45751
Signed-off-by: Luis Sampaio <luis.sampaio@windriver.com>
Change-Id: I46d9531fad88abbaef8f4b05bb6a0e16b5e54e14