From 14616db9c5b9a7966936bee91b50c41604c84344 Mon Sep 17 00:00:00 2001 From: Paul Belanger Date: Wed, 15 Nov 2017 23:14:03 -0500 Subject: [PATCH] Move copy-wheels roles to post-run Currently, our secrets are not included in the build-wheel-mirror-base, so this means we cannot access the afs secret to copy files into /afs/.openstack.org. Move this into pre distro jobs where the secret lives. Again, once we have protected final jobs, we can clean this up a bit. Change-Id: I8e8b92af771bc84a3930a8f98c96c8216388d1cf Signed-off-by: Paul Belanger --- playbooks/wheel/build.yaml | 11 ----------- playbooks/wheel/post.yaml | 20 ++++++++++++++++++++ zuul.d/jobs.yaml | 3 +++ 3 files changed, 23 insertions(+), 11 deletions(-) create mode 100644 playbooks/wheel/post.yaml diff --git a/playbooks/wheel/build.yaml b/playbooks/wheel/build.yaml index f477058c84..2e20784b80 100644 --- a/playbooks/wheel/build.yaml +++ b/playbooks/wheel/build.yaml @@ -2,20 +2,9 @@ strategy: free pre_tasks: - - name: Generate AFS slug - set_fact: - afs_slug: "{{ ansible_distribution|lower }}-{{ ansible_distribution_version }}-{{ ansible_architecture }}" - - - name: Set fact for AFS dir - set_fact: - afs_dir: "/afs/.openstack.org/mirror/wheel/{{ afs_slug }}/" - - name: Set fact for wheel dir set_fact: wheel_dir: /opt/wheel/workspace roles: - build-wheels - - create-afs-token - - copy-wheels - - destroy-afs-token diff --git a/playbooks/wheel/post.yaml b/playbooks/wheel/post.yaml new file mode 100644 index 0000000000..b3d9209e69 --- /dev/null +++ b/playbooks/wheel/post.yaml @@ -0,0 +1,20 @@ +- hosts: all + strategy: free + + pre_tasks: + - name: Generate AFS slug + set_fact: + afs_slug: "{{ ansible_distribution|lower }}-{{ ansible_distribution_version }}-{{ ansible_architecture }}" + + - name: Set fact for AFS dir + set_fact: + afs_dir: "/afs/.openstack.org/mirror/wheel/{{ afs_slug }}/" + + - name: Set fact for wheel dir + set_fact: + wheel_dir: /opt/wheel/workspace + + roles: + - create-afs-token + - copy-wheels + - destroy-afs-token diff --git a/zuul.d/jobs.yaml b/zuul.d/jobs.yaml index 7bba3fdda8..9bfb36e332 100644 --- a/zuul.d/jobs.yaml +++ b/zuul.d/jobs.yaml @@ -794,6 +794,7 @@ - job: name: build-wheel-mirror-centos-7 parent: build-wheel-mirror-base + post-run: playbooks/wheel/post.yaml final: true nodeset: # NOTE: The python2 and python3 suffix are important, they select the @@ -810,6 +811,7 @@ - job: name: build-wheel-mirror-ubuntu-trusty parent: build-wheel-mirror-base + post-run: playbooks/wheel/post.yaml final: true nodeset: # NOTE: The python2 and python3 suffix are important, they select the @@ -828,6 +830,7 @@ - job: name: build-wheel-mirror-ubuntu-xenial parent: build-wheel-mirror-base + post-run: playbooks/wheel/post.yaml final: true nodeset: # NOTE: The python2 and python3 suffix are important, they select the