Merge "Build arm64 images using arm64 wheels from openstack if available"
This commit is contained in:
commit
8de5120a5b
11
.zuul.yaml
11
.zuul.yaml
@ -156,6 +156,7 @@
|
|||||||
name: nodepool-build-image
|
name: nodepool-build-image
|
||||||
parent: opendev-build-docker-image
|
parent: opendev-build-docker-image
|
||||||
description: Build Docker images.
|
description: Build Docker images.
|
||||||
|
timeout: 4800
|
||||||
dependencies:
|
dependencies:
|
||||||
- opendev-buildset-registry
|
- opendev-buildset-registry
|
||||||
requires:
|
requires:
|
||||||
@ -171,19 +172,29 @@
|
|||||||
# If zuul.tag is defined: [ '3', '3.19', '3.19.0' ]. Only works for 3-component tags.
|
# If zuul.tag is defined: [ '3', '3.19', '3.19.0' ]. Only works for 3-component tags.
|
||||||
# Otherwise: ['latest']
|
# Otherwise: ['latest']
|
||||||
&imagetag "{{ zuul.tag is defined | ternary([zuul.get('tag', '').split('.')[0], '.'.join(zuul.get('tag', '').split('.')[:2]), zuul.get('tag', '')], ['latest']) }}"
|
&imagetag "{{ zuul.tag is defined | ternary([zuul.get('tag', '').split('.')[0], '.'.join(zuul.get('tag', '').split('.')[:2]), zuul.get('tag', '')], ['latest']) }}"
|
||||||
|
arch:
|
||||||
|
- linux/amd64
|
||||||
|
- linux/arm64
|
||||||
- context: .
|
- context: .
|
||||||
repository: zuul/nodepool-launcher
|
repository: zuul/nodepool-launcher
|
||||||
target: nodepool-launcher
|
target: nodepool-launcher
|
||||||
tags: *imagetag
|
tags: *imagetag
|
||||||
|
arch:
|
||||||
|
- linux/amd64
|
||||||
|
- linux/arm64
|
||||||
- context: .
|
- context: .
|
||||||
repository: zuul/nodepool-builder
|
repository: zuul/nodepool-builder
|
||||||
target: nodepool-builder
|
target: nodepool-builder
|
||||||
tags: *imagetag
|
tags: *imagetag
|
||||||
|
arch:
|
||||||
|
- linux/amd64
|
||||||
|
- linux/arm64
|
||||||
|
|
||||||
- job:
|
- job:
|
||||||
name: nodepool-upload-image
|
name: nodepool-upload-image
|
||||||
parent: opendev-upload-docker-image
|
parent: opendev-upload-docker-image
|
||||||
description: Build Docker images and upload to Docker Hub.
|
description: Build Docker images and upload to Docker Hub.
|
||||||
|
timeout: 4800
|
||||||
requires:
|
requires:
|
||||||
- python-builder-3.8-container-image
|
- python-builder-3.8-container-image
|
||||||
- python-base-3.8-container-image
|
- python-base-3.8-container-image
|
||||||
|
13
Dockerfile
13
Dockerfile
@ -13,17 +13,26 @@
|
|||||||
# See the License for the specific language governing permissions and
|
# See the License for the specific language governing permissions and
|
||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
|
|
||||||
FROM docker.io/opendevorg/python-builder:3.8 as builder
|
FROM docker.io/opendevorg/python-builder:3.7 as builder
|
||||||
# ============================================================================
|
# ============================================================================
|
||||||
|
|
||||||
ARG ZUUL_SIBLINGS=""
|
ARG ZUUL_SIBLINGS=""
|
||||||
COPY . /tmp/src
|
COPY . /tmp/src
|
||||||
|
RUN if [ `uname -m` = "aarch64" ] ; then \
|
||||||
|
echo "Installing arm64 pip.conf" ; \
|
||||||
|
cp /tmp/src/tools/pip.conf.arm64 /etc/pip.conf ; \
|
||||||
|
cp /tmp/src/tools/pip.conf.arm64 /output/pip.conf ; \
|
||||||
|
fi
|
||||||
RUN assemble
|
RUN assemble
|
||||||
|
|
||||||
FROM docker.io/opendevorg/python-base:3.8 as nodepool-base
|
FROM docker.io/opendevorg/python-base:3.7 as nodepool-base
|
||||||
# ============================================================================
|
# ============================================================================
|
||||||
|
|
||||||
COPY --from=builder /output/ /output
|
COPY --from=builder /output/ /output
|
||||||
|
RUN if [ -f /output/pip.conf ] ; then \
|
||||||
|
echo "Installing pip.conf from builder" ; \
|
||||||
|
cp /output/pip.conf /etc/pip.conf ; \
|
||||||
|
fi
|
||||||
RUN /output/install-from-bindep nodepool_base
|
RUN /output/install-from-bindep nodepool_base
|
||||||
|
|
||||||
RUN useradd -u 10001 -m -d /var/lib/nodepool -c "Nodepool Daemon" nodepool
|
RUN useradd -u 10001 -m -d /var/lib/nodepool -c "Nodepool Daemon" nodepool
|
||||||
|
5
tools/pip.conf.arm64
Normal file
5
tools/pip.conf.arm64
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
[global]
|
||||||
|
extra-index-url = https://mirror.regionone.linaro-us.opendev.org/wheel/debian-10-aarch64/
|
||||||
|
|
||||||
|
[install]
|
||||||
|
prefer-binary = true
|
Loading…
x
Reference in New Issue
Block a user