Browse Source

Merge "Use the infra pypi mirror for DIB" into stable/stein

changes/49/675349/2
Zuul 2 weeks ago
parent
commit
0834110070
1 changed files with 15 additions and 0 deletions
  1. 15
    0
      devstack/plugin.sh

+ 15
- 0
devstack/plugin.sh View File

@@ -89,6 +89,21 @@ function build_octavia_worker_image {
89 89
     export PARAM_OCTAVIA_AMP_IMAGE_SIZE='-s '$OCTAVIA_AMP_IMAGE_SIZE
90 90
     fi
91 91
 
92
+    # Use the infra pypi mirror if it is available
93
+    if [[ -e /etc/ci/mirror_info.sh ]]; then
94
+        source /etc/ci/mirror_info.sh
95
+    fi
96
+    if [[ ${NODEPOOL_PYPI_MIRROR:+1} ]]; then
97
+        if [[ ${DIB_LOCAL_ELEMENTS:+1} ]]; then
98
+            export DIB_LOCAL_ELEMENTS="${DIB_LOCAL_ELEMENTS} pypi"
99
+        else
100
+            export DIB_LOCAL_ELEMENTS='pypi'
101
+        fi
102
+        export DIB_PYPI_MIRROR_URL=$NODEPOOL_PYPI_MIRROR
103
+        export DIB_PYPI_MIRROR_URL_1=$NODEPOOL_WHEEL_MIRROR
104
+        export DIB_PIP_RETRIES=0
105
+    fi
106
+
92 107
     if ! [ -f $OCTAVIA_AMP_IMAGE_FILE ]; then
93 108
         local dib_logs=/var/log/dib-build
94 109
         if [[ -e ${dib_logs} ]]; then

Loading…
Cancel
Save