File tree 2 files changed +33
-0
lines changed
2 files changed +33
-0
lines changed Original file line number Diff line number Diff line change 4
4
"Dockerfile" :" load/projects/ulta/Dockerfile" ,
5
5
"LICENSE.md" :" load/projects/ulta/LICENSE.md" ,
6
6
"README.md" :" load/projects/ulta/README.md" ,
7
+ "build_files/install-with-venv.sh" :" load/projects/ulta/build_files/install-with-venv.sh" ,
7
8
"build_files/setup-deps.sh" :" load/projects/ulta/build_files/setup-deps.sh" ,
8
9
"build_files/yandextank_base_config/10-pandora.yaml" :" load/projects/ulta/build_files/yandextank_base_config/10-pandora.yaml" ,
9
10
"build_files/yandextank_base_config/50-loadtesting.yaml" :" load/projects/ulta/build_files/yandextank_base_config/50-loadtesting.yaml" ,
Original file line number Diff line number Diff line change
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
You can’t perform that action at this time.
0 commit comments