Browse Source

Merge "Changes in container builder"

changes/48/625448/1
Zuul 3 years ago
committed by Gerrit Code Review
parent
commit
a9bf7fb236
  1. 40
      .zuul.yaml
  2. 2
      dockerfiles/heat-container-agent/Dockerfile
  3. 2
      dockerfiles/kubernetes-apiserver/Dockerfile
  4. 8
      playbooks/container-builder-copy-logs.yaml
  5. 2
      playbooks/container-builder-vars.yaml
  6. 33
      playbooks/container-builder.yaml
  7. 7
      playbooks/container-publish.yaml

40
.zuul.yaml

@ -2,27 +2,27 @@
name: magnum_docker_login
data:
user: !encrypted/pkcs1-oaep
- rxOFTiiWYyvD5fzSRM3uMXoLKAF9rUzgY3AhyLbIkQ5dUfKO8cJ5zasJG+3qVOyT6hjOO
sCkWC7Cta74cxDr7cMjH4m80R8hD5o6/Q7m3xMnwRz/6s12vpd1LXOMp6R7ahXCmH/Cxe
2O7UeFUN7vX0JKIWw47ioitqqQ1GywFzBgiCN9f8Qg7sIdaner5MmQD+3x8XmqKMEqr88
/j2Nxc4UHvhK+zkjDMM21+7RH33vC2KVteA8hbnKLd621D+8ocPQRihdQ221xiXtij38C
hTSHvYYgphEbZK2G/iwbG+Ol+orc215UE+ZnDXrxI6f20rit2KVboaWrUkuKgwHqJJ8mx
SQ/QFFhe4gW2b3WkB18eDb1APob+sGFCxd6gjWO9DjOK2LTpioUQPfgMNDU1JJ4p0HlIl
mHI7PK4LrX5jZzguA+NRj+vg7+7R78wWD0U6kM/nhouIK19VMEfL1DslJ+nqvLoniod6u
sztgHJ7EEqrrUAsOE2PssGt5wRZpqx5w8+KiFFFrsVcOtHmGBh3DwUNTGMtMpcq5XTICx
+7/irRonpxElqsdCZNKtzv/zmAioiwHLaZZPyDrzk80QyIUc9ljCEuQgCLbDM0jVZjntY
c+S6EYqYuAUPymMZ9p/ctRIDIU1dzvwnlddOc4IF34iqUCmTrI527pRBStjqdU=
- LfP9zghLZsxH4uz1SWMQpjdvuni01WSTtSJyp0V1mb1X6B8VqX4H/Z5AaI2oQF/ZfcbiL
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Mpf1MVlJC8jmkeRofseQmSt7arQ6RAlMn64k8kr1/biMs0saaGKbw
Nw7PhUQTf67yemJvB1zHOI4i9SEkApRNoBmtOe9UxeJxlsDnvOUUteOja3EnIrdIt8Qnk
N+yvPc0MhDVNU0SHJp+AiHJ6jk/tXDkKNnoZJH0BHGPDNp+/pC2ckLxzOrXLPGJkVglwA
4gTl0N/3dRouxVITTmeVwGfffCo/jrdrr1gIr5FAzbiz2jQxF0OOXqRA1YRHn8=
- Sj67sS+3GfFvJKB3EUhPzakxgf2t0IB4tBjEVZP7VFmuSrSmNu0L1aZtyMTW4uTq2GlNM
+y7Oury0YjfgRUj3Crxkfdk26YMPEAMT3+5diMkmYbNcu9AKkA76XYqLI88DJm71gdkBv
ExEciK0/zrwy2fG0cAs2d/0c9SCR87xEBEs2NP3DIcEuoLQZRIVZtsss9U/7EKeVpvjCv
zzcuYP9WtFmBvUn+5Jyev8evwTVFZIqT8eimOtAfK4KLlT6K17kT8kUuDAMWeub7BGtVB
Jln6AsXetnYmo5VF6vDbp7tZrFO9tBKm2LNjDvtgahcilh2yt5DK9QfjUo4I0tmeLoK01
ZYogPLfjVyUQNhCiZOuwgVsIiB6OkGK8F/re3CyR5Ff1c0oD0TqWhREoqWKM9fSMhLxKn
fAVW/kOZdqQxTwGj3JYiqtqnZAD4P7vdujhZWzb1LPJLD+42j6BaM4H0YQ8cvM+q9LtbF
DrcSsxmi+krRwE8u8Yvxr5PPNv/2kNFspAQ9C5L5u2t0uUpb7rZ26iKdPEY/XHca7bpYI
P4CkqWvPbnWL9CwUCeJDdo9WDV3Evd/+dXcK0EtTCgDzEzTiv/YsERIbwKF0pFnwjYme2
SX+Z3JkB5ne4VY+zKL3hltZHzMnu5yfitWWwcqYj4lETkkAZhNVa4aJPMQ1dXA=
- job:
name: magnum-functional-base

2
dockerfiles/heat-container-agent/Dockerfile

@ -1,4 +1,4 @@
FROM registry.fedoraproject.org/fedora:rawhide
FROM fedora:rawhide
# Fill out the labels
LABEL name="heat-container-agent" \

2
dockerfiles/kubernetes-apiserver/Dockerfile

@ -1,6 +1,6 @@
ARG KUBE_VERSION=v1.13.0
FROM registry.fedoraproject.org/fedora:rawhide
FROM fedora:rawhide
RUN curl -o /root/kubectl -O https://storage.googleapis.com/kubernetes-release/release/${KUBE_VERSION}/bin/linux/amd64/kubectl
FROM gcr.io/google-containers/kube-apiserver-amd64:${KUBE_VERSION}

8
playbooks/container-builder-copy-logs.yaml

@ -1,13 +1,5 @@
- hosts: all
tasks:
- name: collect ansible_async logs
synchronize:
src: '/home/zuul/.ansible_async'
dest: '{{ zuul.executor.log_root }}'
mode: pull
copy_links: true
verify_host: true
- shell:
cmd: |
set +o errexit

2
playbooks/container-builder-vars.yaml

@ -1,6 +1,6 @@
magnum_src_dir: "src/git.openstack.org/openstack/magnum"
repository: docker.io/openstackmagnumtest
magnum_repository: openstackmagnumtest
kubernetes_version: v1.11.3
kubernetes_images:
- name: kubernetes-apiserver

33
playbooks/container-builder.yaml

@ -2,33 +2,26 @@
tasks:
- include_vars: container-builder-vars.yaml
- name: Build images
- name: "Build magnum images"
block:
- docker_image:
- name: "Build {{ magnum_repository }}/{{ item.name }}:{{ item.tag }} image"
docker_image:
path: "{{ magnum_src_dir }}/dockerfiles/{{ item.name }}"
name: "{{ item.name }}"
repository: "{{ repository }}/{{ item.name }}"
tag: "{{ item.tag}}"
name: "{{ magnum_repository }}/{{ item.name }}"
tag: "{{ item.tag }}"
push: no
with_items: "{{ magnum_images }}"
- docker_image:
retries: 10
- name: "Build kubernetes images"
block:
- name: "Build {{ magnum_repository }}/{{ item.name }}:{{ item.tag }} image"
docker_image:
path: "{{ magnum_src_dir }}/dockerfiles/{{ item.name }}"
name: "{{ item.name }}"
repository: "{{ repository }}/{{ item.name }}"
name: "{{ magnum_repository }}/{{ item.name }}"
tag: "{{ kubernetes_version }}"
buildargs:
KUBE_VERSION: "{{ kubernetes_version }}"
push: no
with_items: "{{ kubernetes_images }}"
async: 1000
poll: 0
register: pull
- async_status:
jid: "{{ item.ansible_job_id }}"
with_items: "{{ pull.results }}"
register: pull_result
until:
- pull_result.finished is defined
- pull_result.finished
retries: 1000
delay: 5
retries: 10

7
playbooks/container-publish.yaml

@ -5,8 +5,11 @@
- name: Push images to DockerHub
block:
- command: docker login -u {{ magnum_docker_login.user }} -p {{ magnum_docker_login.password }}
no_log: False
- command: docker push {{ repository }}/{{ item.name }}:{{ tag }}
no_log: True
retries: 5
- command: docker push {{ repository }}/{{ item.name }}:{{ item.tag }}
with_items: "{{ magnum_images }}"
retries: 10
- command: docker push {{ repository }}/{{ item.name }}:{{ kubernetes_version }}
with_items: "{{ kubernetes_images }}"
retries: 10
Loading…
Cancel
Save