Merge "Build cluster autoscaler container images"
This commit is contained in:
commit
30d69aa35b
|
@ -346,7 +346,7 @@
|
|||
post-run: playbooks/container-builder-copy-logs.yaml
|
||||
roles:
|
||||
- zuul: openstack/openstack-zuul-jobs
|
||||
timeout: 1200
|
||||
timeout: 1800
|
||||
irrelevant-files:
|
||||
- ^.*\.rst$
|
||||
- ^api-ref/.*$
|
||||
|
|
|
@ -0,0 +1,15 @@
|
|||
FROM golang:1.12.10 as builder
|
||||
|
||||
ARG AUTOSCALER_VERSION
|
||||
|
||||
ENV GOPATH=/go
|
||||
|
||||
WORKDIR $GOPATH/src/k8s.io/
|
||||
RUN git clone -b ${AUTOSCALER_VERSION} --single-branch http://github.com/kubernetes/autoscaler.git autoscaler
|
||||
WORKDIR autoscaler/cluster-autoscaler
|
||||
RUN CGO_ENABLED=0 GOOS=linux go build -o cluster-autoscaler --ldflags=-s --tags magnum
|
||||
|
||||
FROM gcr.io/distroless/static:latest
|
||||
|
||||
COPY --from=builder /go/src/k8s.io/autoscaler/cluster-autoscaler/cluster-autoscaler /cluster-autoscaler
|
||||
CMD ["/cluster-autoscaler"]
|
|
@ -19,3 +19,7 @@ magnum_images:
|
|||
tag: train-dev
|
||||
|
||||
helm_version: v2.12.3
|
||||
|
||||
cluster_autoscaler_versions:
|
||||
- version: 1.15.2
|
||||
- version: 1.16.1
|
||||
|
|
|
@ -105,3 +105,16 @@
|
|||
HELM_VERSION: "{{ helm_version }}"
|
||||
push: no
|
||||
retries: 10
|
||||
|
||||
- name: "Build cluster-autoscaler image"
|
||||
block:
|
||||
- name: "Build {{ magnum_repository }}/cluster-autoscaler:v{{ item.version }}"
|
||||
docker_image:
|
||||
path: "{{ magnum_src_dir }}/dockerfiles/cluster-autoscaler"
|
||||
name: "{{ magnum_repository }}/cluster-autoscaler"
|
||||
tag: "v{{ item.version }}"
|
||||
buildargs:
|
||||
AUTOSCALER_VERSION: "cluster-autoscaler-{{ item.version }}"
|
||||
push: no
|
||||
with_items: "{{ cluster_autoscaler_versions }}"
|
||||
retries: 10
|
||||
|
|
|
@ -30,3 +30,6 @@
|
|||
retries: 10
|
||||
- command: docker push {{ magnum_repository }}/helm-client:{{ helm_version }}
|
||||
retries: 10
|
||||
- command: docker push {{ magnum_repository }}/cluster-autoscaler:v{{ item.version }}
|
||||
with_items: "{{ cluster_autoscaler_versions }}"
|
||||
retries: 10
|
||||
|
|
Loading…
Reference in New Issue