Browse Source

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

stable/queens
Zuul 1 week ago
parent
commit
42d16b78fc
1 changed files with 16 additions and 0 deletions
  1. 16
    0
      devstack/plugin.sh

+ 16
- 0
devstack/plugin.sh View File

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

Loading…
Cancel
Save