-cat << EOF > "$REQUIREMENTS_FILE"
-lftools~=0.17.1
-python-heatclient~=1.16.1
-python-openstackclient~=3.16.0
+# This script will typically be called during pre-build & post-build.
+# Create the user venv during pre-build.
+if [[ ! -f /tmp/pre-build-complete ]]; then
+ requirements_file=$(mktemp /tmp/requirements-XXXXXX)
+
+ # Note: To test lftools master branch change the lftools configuration below in
+ # the requirements file from "lftools[openstack]~=#.##.#" to
+ # git+https://github.com/lfit/releng-lftools.git#egg=lftools[openstack]
+
+ echo "Generating Requirements File"
+ cat << 'EOF' > "$requirements_file"
+python-heatclient
+python-openstackclient
+python-magnumclient
+kubernetes
+niet~=1.4.2
+cryptography<3.4
+yq
+
+# PINNED INDIRECT DEPENDENCIES
+# ============================
+# The libraries listed below should be considered workarounds and thus need
+# to have a link to a JIRA and any relevant pkg versions and support packages
+# necessary so that future maintainers of this file can make decisions to
+# remove the workarounds in the future.
+importlib-resources<2.0.0 # virtualenv 20.0.21 requires importlib-resources<2.0.0 (RELENG-2993)
+pyparsing<3.0.0 # httplib2 0.20.1 requires pyparsing<3,>=2.4.2
+urllib3~=1.26.15 # python-jenkins-1.8.0 requires urllib3-1.26