Browse Source

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

changes/80/681780/1
Zuul 2 weeks ago
parent
commit
38b1618a2c
1 changed files with 16 additions and 0 deletions
  1. 16
    0
      devstack/plugin.sh

+ 16
- 0
devstack/plugin.sh View File

@@ -74,6 +74,22 @@ function build_octavia_worker_image {
74 74
     if [[ ${OCTAVIA_AMP_IMAGE_SIZE:+1} ]] ; then
75 75
     export PARAM_OCTAVIA_AMP_IMAGE_SIZE='-s '$OCTAVIA_AMP_IMAGE_SIZE
76 76
     fi
77
+
78
+    # Use the infra pypi mirror if it is available
79
+    if [[ -e /etc/ci/mirror_info.sh ]]; then
80
+        source /etc/ci/mirror_info.sh
81
+    fi
82
+    if [[ ${NODEPOOL_PYPI_MIRROR:+1} ]]; then
83
+        if [[ ${DIB_LOCAL_ELEMENTS:+1} ]]; then
84
+            export DIB_LOCAL_ELEMENTS="${DIB_LOCAL_ELEMENTS} pypi"
85
+        else
86
+            export DIB_LOCAL_ELEMENTS='pypi'
87
+        fi
88
+        export DIB_PYPI_MIRROR_URL=$NODEPOOL_PYPI_MIRROR
89
+        export DIB_PYPI_MIRROR_URL_1=$NODEPOOL_WHEEL_MIRROR
90
+        export DIB_PIP_RETRIES=0
91
+    fi
92
+
77 93
     if ! [ -f $OCTAVIA_AMP_IMAGE_FILE ]; then
78 94
         $OCTAVIA_DIR/diskimage-create/diskimage-create.sh $octavia_dib_tracing_arg -o $OCTAVIA_AMP_IMAGE_FILE ${PARAM_OCTAVIA_AMP_BASE_OS:-} ${PARAM_OCTAVIA_AMP_DISTRIBUTION_RELEASE_ID:-} ${PARAM_OCTAVIA_AMP_IMAGE_SIZE:-}
79 95
     fi

Loading…
Cancel
Save