forked from openstack-archive/stx-tools
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathbuildrc
More file actions
84 lines (65 loc) · 3.15 KB
/
buildrc
File metadata and controls
84 lines (65 loc) · 3.15 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
# Common configuration for TC tbuilder
[[ -z "$_BUILDRC" ]] || return 0
declare -r -g _BUILDRC=1
# Find the other rc files
BUILDRC_DIR=$(cd $(dirname "${BASH_SOURCE:-$0}") && pwd)
# Allow local overrides of env variables
if [[ -f $BUILDRC_DIR/localrc ]]; then
source $BUILDRC_DIR/localrc
fi
# Source repo base - Intel GitHub
SOURCE_HOST=${SOURCE_HOST:-git.openstack.org}
SOURCE_PORT=${SOURCE_PORT:-}
SOURCE_PROJECT=${SOURCE_PROJECT:-openstack}
SOURCE_REMOTE_URI=${SOURCE_REMOTE_URI:-git@${SOURCE_HOST}:${SOURCE_PROJECT}}
# Host-side prefix
if [[ -n $container && "$container" == "docker" ]]; then
# We are running inside a docker container, do not give HOST_PATH a value
HOST_PREFIX=
else
# Host-side path for user-local /localdisk assumes that all user workspaces are
# in the same directory structure. Override this in localrc if that is
# not the case.
HOST_PREFIX=${HOST_PREFIX:-${HOME}/starlingx}
fi
# Basic build environment configuration
# Real (outside the container) username
export USER=${USER:-$(id -un)}
# Local mirror location
HOST_MIRROR_DIR=${HOST_MIRROR_DIR:-/home/starlingx/mirror}
# The root of an individual build workspace
# GUEST_LOCALDISK is used for the docker run command mapping; don't change this
# until the WRS tooling is gone, it is hard-coded in many places
# We remove a leading '/' as having more than one breaks certain bits of the build
GUEST_LOCALDISK=${LOCALDISK:-localdisk}
GUEST_LOCALDISK=${GUEST_LOCALDISK%/}
# In the docker run command this will be correct for the host side of the mapping
LOCALDISK=${HOST_PREFIX}/${GUEST_LOCALDISK}
# TC vars
export MY_TC_RELEASE=${MY_TC_RELEASE:-tis-r5-pike}
# Default branch to build
export BRANCH=${BRANCH:-intel_r0}
# avoid calling your project 'build' it will break some SRPMs
export PROJECT=${PROJECT:-test}
# These are used in the Dockerfile, not sure where else
export MYUNAME=${MYUNAME:-builder}
export MYPROJECTNAME=${PROJECT:-frog1}
export SRC_BUILD_ENVIRONMENT=${SRC_BUILD_ENVIRONMENT:-$MY_TC_RELEASE}
# All of the below are dependent on variables defined earlier, right now
# we are not going to support directly setting them in localrc
export MY_BUILD_ENVIRONMENT=$MYUNAME-$PROJECT-$SRC_BUILD_ENVIRONMENT
export MY_BUILD_ENVIRONMENT_FILE=${MY_BUILD_ENVIRONMENT}.cfg
export MY_BUILD_ENVIRONMENT_FILE_STD=${MY_BUILD_ENVIRONMENT}-std.cfg
export MY_BUILD_ENVIRONMENT_FILE_RT=${MY_BUILD_ENVIRONMENT}-rt.cfg
export MY_BUILD_DIR=${LOCALDISK}/loadbuild/$MYUNAME/$PROJECT
export MY_WORKSPACE=$MY_BUILD_DIR
export MY_LOCAL_DISK=${LOCALDISK}/designer/$MYUNAME
export MY_REPO_ROOT_DIR=$MY_LOCAL_DISK/$PROJECT
export MY_REPO=$MY_REPO_ROOT_DIR/cgcs-root
export MY_SRC_RPM_BUILD_DIR=$MY_BUILD_DIR/rpmbuild
export MY_BUILD_CFG=$MY_WORKSPACE/$MY_BUILD_ENVIRONMENT_FILE
export MY_BUILD_CFG_STD=$MY_WORKSPACE/std/${MY_BUILD_ENVIRONMENT_FILE_STD}
export MY_BUILD_CFG_RT=${MY_WORKSPACE}/rt/${MY_BUILD_ENVIRONMENT_FILE_RT}
export MY_MOCK_ROOT=$MY_WORKSPACE/mock/root
export MY_DEBUG_BUILD_CFG_STD=${MY_WORKSPACE}/std/configs/${MY_BUILD_ENVIRONMENT}-std/${MY_BUILD_ENVIRONMENT}-std.b0.cfg
export MY_DEBUG_BUILD_CFG_RT=${MY_WORKSPACE}/std/configs/${MY_BUILD_ENVIRONMENT}-std/${MY_BUILD_ENVIRONMENT}-rt.b0.cfg