Remove images/publish role

This role was always RDO CI specific and therefore the functionality
was moved into the RDO CI JJB repo:

7fb6fc7a6a

Change-Id: Ic71e8cb62caaae0048c77ac264ee79a3e0082d0b
This commit is contained in:
John Trowbridge 2016-10-18 15:39:30 -04:00
parent 90a325a147
commit 9570b45b44
2 changed files with 0 additions and 82 deletions

View File

@ -1,24 +0,0 @@
# global build vars
working_dir: /var/lib/oooq-images
# publish vars
artifacts:
- undercloud.qcow2
- undercloud.qcow2.md5
- ironic-python-agent.tar
- ironic-python-agent.tar.md5
- overcloud-full.tar
- overcloud-full.tar.md5
release: mitaka
build_system: delorean
publish: false
publish_dest_user: rdo
publish_dest_host: artifacts.ci.centos.org
publish_dest_basepath: rdo/images
publish_create_dest_via_ssh: false
# optional
# publish_dest_key: "localpath/to/your/identity/file"
artib_image_stage_location: testing

View File

@ -1,58 +0,0 @@
- name: install rsync
yum:
name: rsync
state: present
become: true
# the existing infra does not allow for network connectivity between CI instances used to build the images and
# the network location for resultant images. For now this role uses the local ansible machine (jenkins slave)
# as a staging area, which is removed after images are moved via rsync --> {{ publish_dest_base }}
- name: create local dir to store images
delegate_to: localhost
file:
path: "{{ lookup('env', 'WORKSPACE') }}/images/{{ release }}/{{ build_system }}/{{ artib_image_stage_location }}"
state: directory
- name: create delorean_hash files
local_action: "command echo {{ delorean_hash }} {{ lookup('env', 'WORKSPACE') }}/images/{{ release }}/{{ build_system }}/{{ artib_image_stage_location }}/delorean_hash"
when: delorean_hash is defined
- name: fetch files to local workspace
synchronize:
src: "{{ working_dir }}/{{ item }}"
dest: "{{ lookup('env', 'WORKSPACE') }}/images/{{ release }}/{{ build_system }}/{{ artib_image_stage_location }}/{{ item }}"
mode: pull
with_items: "{{ artifacts }}"
- name: create destination directory
delegate_to: localhost
command: >
ssh
{% if publish_dest_key is defined %}
-i {{ publish_dest_key }}
{% endif %}
{{ publish_dest_host }}
mkdir -p {{ publish_dest_basepath }}/{{ release }}/{{ build_system }}/testing
when: publish_create_dest_via_ssh
- name: publish images
delegate_to: localhost
command: >
rsync
{% if publish_dest_key is defined %}
-e 'ssh -i {{ publish_dest_key }}'
{% endif %}
--delete -av
{{ lookup('env', 'WORKSPACE') }}/images/{{ release }}/{{ build_system }}/{{ artib_image_stage_location }}/
{% if publish_dest_key is defined %}
{{ publish_dest_user }}@{{ publish_dest_host }}:{{ publish_dest_basepath }}/{{ release }}/{{ build_system }}/{{ artib_image_stage_location }}/
{% else %}
{{ publish_dest_user }}@{{ publish_dest_host }}::{{ publish_dest_basepath }}/{{ release }}/{{ build_system }}/{{ artib_image_stage_location }}/
{% endif %}
changed_when: true
- name: remove the images from the workspace
delegate_to: localhost
file:
path: "{{ lookup('env', 'WORKSPACE') }}/images/{{ release }}/{{ build_system }}/{{ artib_image_stage_location }}"
state: absent