Skip to content

Commit 5902234

Browse files
committed
Merge remote-tracking branch 'origin/6.0/release' into 6.0/patch
2 parents ba6a0ed + 9b74332 commit 5902234

2 files changed

Lines changed: 38 additions & 3 deletions

File tree

lib/common.sh

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@ export SUPPORTED_KERNEL_FLAVORS="generic aws gcp azure oracle"
2626
# for testing purposes to use jenkins-ops.<developer> instead.
2727
#
2828
export JENKINS_OPS_DIR="${JENKINS_OPS_DIR:-jenkins-ops}"
29-
export S3_DEVOPS_BRANCH="${S3_DEVOPS_BRANCH:-master}"
3029

3130
export UBUNTU_DISTRIBUTION="bionic"
3231

@@ -660,7 +659,7 @@ function determine_dependencies_base_url() {
660659
[[ -n "$suv" ]] || die "No artifacts found at $url"
661660
DEPENDENCIES_BASE_URL="$url/$suv/input-artifacts/combined-packages/packages"
662661
else
663-
DEPENDENCIES_BASE_URL="s3://snapshot-de-images/builds/$JENKINS_OPS_DIR/devops-gate/$S3_DEVOPS_BRANCH/linux-pkg/$DEFAULT_GIT_BRANCH/build-package"
662+
DEPENDENCIES_BASE_URL="s3://snapshot-de-images/builds/$JENKINS_OPS_DIR/linux-pkg/$DEFAULT_GIT_BRANCH/build-package"
664663
fi
665664

666665
#

setup.sh

Lines changed: 37 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,25 @@ logmust check_running_system
2222

2323
logmust determine_default_git_branch
2424

25+
#
26+
# In order to ship vSDK 4.0.0 with 6.0.12.0, we need python3.8 (and the
27+
# relevant distutils release). The following line gets the deadsnakes
28+
# (https://launchpad.net/~deadsnakes/+archive/ubuntu/ppa) repo from
29+
# which we install python3.8 in packages/virtualization/config.sh.
30+
# This line will be removed via DLPX-78481 when 6.0/stage begins
31+
# tracking 6.0.13.0.
32+
#
33+
function install_python_38() {
34+
logmust sudo add-apt-repository ppa:deadsnakes/ppa -y
35+
logmust sudo apt-get update
36+
logmust install_pkgs python 3.8
37+
}
38+
2539
#
2640
# Update the sources.list file to point to our internal package mirror. If no
2741
# mirror url is passed in, then the latest mirror snapshot is used.
2842
#
29-
configure_apt_sources() {
43+
function configure_apt_sources() {
3044
local package_mirror_url
3145
local primary_url="$DELPHIX_PACKAGE_MIRROR_MAIN"
3246
local secondary_url="$DELPHIX_PACKAGE_MIRROR_SECONDARY"
@@ -81,6 +95,26 @@ configure_apt_sources() {
8195
logmust sudo apt-key add "$TOP/resources/delphix-secondary-mirror.key"
8296
}
8397

98+
#
99+
# Some packages require cause a spike in memory usage during the build, so
100+
# we add a swap file to prevent the oom-killer from terminating the build.
101+
#
102+
function add_swap() {
103+
local swapfile="/swapfile"
104+
local size="4G"
105+
106+
if [[ ! -f "$swapfile" ]]; then
107+
logmust sudo fallocate -l "$size" "$swapfile"
108+
logmust sudo chmod 600 /swapfile
109+
logmust sudo mkswap /swapfile
110+
fi
111+
112+
if ! sudo swapon --show | grep -q "$swapfile"; then
113+
logmust sudo swapon "$swapfile"
114+
fi
115+
}
116+
117+
logmust install_python_38
84118
logmust configure_apt_sources
85119
logmust sudo apt-get update
86120

@@ -112,6 +146,8 @@ logmust install_shfmt
112146
#
113147
logmust install_gcc8
114148

149+
logmust add_swap
150+
115151
logmust git config --global user.email "eng@delphix.com"
116152
logmust git config --global user.name "Delphix Engineering"
117153

0 commit comments

Comments
 (0)