Merge "Revert "Change build path from tmp to opt and disable COW""

This commit is contained in:
Zuul 2018-06-29 15:39:15 +00:00 committed by Gerrit Code Review
commit f8976d50a6
2 changed files with 8 additions and 10 deletions

View File

@ -44,8 +44,8 @@ repo_build_release_tag: "untagged"
repo_build_global_links_path: "{{ repo_build_base_path }}/links"
repo_build_release_version_path: "os-releases/{{ repo_build_release_tag }}"
repo_build_release_path: "{{ repo_build_base_path }}/{{ repo_build_release_version_path }}/{{ repo_build_os_distro_version }}"
repo_build_dir: "/opt/openstack-builder"
repo_build_output: "/opt/openstack-wheel-output"
repo_build_dir: "/tmp/openstack-builder"
repo_build_output: "/tmp/openstack-wheel-output"
repo_build_git_dir: "{{ repo_build_base_path }}/openstackgit"
repo_build_pool_dir: "{{ repo_build_base_path }}/pools/{{ repo_build_os_distro_version }}"
@ -88,7 +88,7 @@ repo_build_pip_default_index: "https://pypi.python.org/simple"
repo_build_timeout: 120
repo_build_concurrency: "{{ (((ansible_processor_vcpus|default(1)) | int) > 4) | ternary(8, 4) }}"
repo_build_venv_build_dir: "/opt/openstack-venv-builder"
repo_build_venv_build_dir: "/tmp/openstack-venv-builder"
repo_build_venv_dir: "{{ repo_build_base_path }}/venvs/{{ repo_build_release_tag }}/{{ repo_build_os_distro_version }}"
# We use find-links here in order to prefer the locally

View File

@ -62,16 +62,13 @@ pushd "{{ repo_build_venv_dir }}" &>/dev/null
[[ -d "${ROLE_VENV_PATH}" ]] && rm -rf "${ROLE_VENV_PATH}"
# If the pip build directory already exists, remove it
[[ -d "/opt/${ROLE_VENV_FILE}" ]] && rm -rf "/opt/${ROLE_VENV_FILE}"
[[ -d "/tmp/${ROLE_VENV_FILE}" ]] && rm -rf "/tmp/${ROLE_VENV_FILE}"
# Create the virtualenv shell
${VENV_CREATE_COMMAND} "${ROLE_VENV_PATH}" &>${ROLE_VENV_LOG}
# Create the pip build directory
mkdir -p "/opt/${ROLE_VENV_FILE}"
# Disable COW attributes on the build directory
chattr -R +C "/opt/${ROLE_VENV_FILE}" || true
mkdir -p "/tmp/${ROLE_VENV_FILE}"
# Activate the python virtual environment for good measure
source "${ROLE_VENV_PATH}/bin/activate"
@ -96,7 +93,7 @@ pushd "{{ repo_build_venv_dir }}" &>/dev/null
${ROLE_VENV_PATH}/bin/pip install \
--disable-pip-version-check \
--quiet --quiet \
--build "/opt/${ROLE_VENV_FILE}" \
--build "/tmp/${ROLE_VENV_FILE}" \
${PIP_INSTALL_OPTIONS} \
${PIP_INDEX_OPTIONS} \
${ROLE_VENV_REQUIREMENTS} \
@ -116,9 +113,10 @@ pushd "{{ repo_build_venv_dir }}" &>/dev/null
# Delete working directories
rm -rf "${ROLE_VENV_PATH}"
rm -rf "/opt/${ROLE_VENV_FILE}"
rm -rf "/tmp/${ROLE_VENV_FILE}"
popd &>/dev/null
# Output the end of the build
echo "done"