Skip to content

Commit 0ff9839

Browse files
committed
add more vcs files to piglet ulta sync
commit_hash:a6540855dbc5017f3f0570f653e27571c56b0680
1 parent 4de4c3c commit 0ff9839

File tree

2 files changed

+33
-0
lines changed

2 files changed

+33
-0
lines changed

.mapping.json

+1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
"Dockerfile":"load/projects/ulta/Dockerfile",
55
"LICENSE.md":"load/projects/ulta/LICENSE.md",
66
"README.md":"load/projects/ulta/README.md",
7+
"build_files/install-with-venv.sh":"load/projects/ulta/build_files/install-with-venv.sh",
78
"build_files/setup-deps.sh":"load/projects/ulta/build_files/setup-deps.sh",
89
"build_files/yandextank_base_config/10-pandora.yaml":"load/projects/ulta/build_files/yandextank_base_config/10-pandora.yaml",
910
"build_files/yandextank_base_config/50-loadtesting.yaml":"load/projects/ulta/build_files/yandextank_base_config/50-loadtesting.yaml",

build_files/install-with-venv.sh

+32
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
#!/bin/bash
2+
3+
set -x -euo pipefail
4+
5+
# ARGS: a list of packages to be installed
6+
7+
ULTA_PYTHON=${ULTA_PYTHON:-"python3"}
8+
ULTA_VENV=${ULTA_VENV:-"/opt/ulta/venv"}
9+
10+
EXECUTABLE="/usr/local/bin/ulta"
11+
if [[ -f "$EXECUTABLE" ]]; then
12+
echo "$EXECUTABLE is already installed" && exit 1
13+
fi
14+
15+
"$ULTA_PYTHON" -m venv "$ULTA_VENV"
16+
(
17+
. "${ULTA_VENV}/bin/activate"
18+
19+
# setuptools cap 71.0.0: https://github.com/pypa/setuptools/issues/4483
20+
python3 -m ensurepip --upgrade && python3 -m pip install --upgrade \
21+
"pip" \
22+
"setuptools>=51.0.0,<71.0.0" \
23+
"$@"
24+
)
25+
26+
touch "$EXECUTABLE" && chmod 755 "$EXECUTABLE"
27+
28+
# ULTA_VENV expands at build time, @ expands at runtime
29+
cat <<EOF >>"$EXECUTABLE"
30+
#!/bin/bash
31+
PATH="${ULTA_VENV}/bin:${PATH}" ulta "\$@"
32+
EOF

0 commit comments

Comments
 (0)