Allow pre-installed DLRN
https://review.openstack.org/498074 switched DLRN installation to "pip install". However, it lost the ability to use a pre-installed DLRN, which is useful for DLRN itself and used in a CI job to avoid breaking TripleO with DLRN changes [1]. This change adds this option back, using a task variable (dlrn_pre_installed, false by default). [1] - https://softwarefactory-project.io/r/gitweb?p=config.git;a=blob;f=jobs-zuul/dlrn.yaml;h=21fd858b6b16ead6cd84850f2614fe3ee0f11f9f;hb=refs/heads/master#l113 Change-Id: Iee0d0cf3d7e3213aa14f91edd2e16afd3b3c8306
This commit is contained in:
parent
bd6002ec70
commit
d6ab0fa692
@ -8,6 +8,7 @@ artg_compressed_gating_repo: "/home/stack/gating_repo.tar.gz"
|
||||
dlrn_cleanup: false
|
||||
dlrn_baseurl: "https://trunk.rdoproject.org/centos7-{{ artg_release }}"
|
||||
dlrn_use_local_mirrors: false
|
||||
dlrn_pre_installed: false
|
||||
|
||||
artg_skipped_projects:
|
||||
- openstack/puppet-openstack-integration
|
||||
|
@ -30,6 +30,7 @@
|
||||
file:
|
||||
path: '{{ build_repo_dir }}/DLRN'
|
||||
state: absent
|
||||
when: not dlrn_pre_installed|bool
|
||||
|
||||
- name: Ensure DLRN dir is present
|
||||
file:
|
||||
@ -53,6 +54,16 @@
|
||||
name: dlrn
|
||||
virtualenv: "{{ build_repo_dir }}/dlrn-venv"
|
||||
state: latest
|
||||
when: not dlrn_pre_installed|bool
|
||||
|
||||
- name: Pip install pre-installed DLRN
|
||||
shell: >
|
||||
source {{ build_repo_dir }}/dlrn-venv/bin/activate;
|
||||
pip install -r requirements.txt;
|
||||
python setup.py install;
|
||||
args:
|
||||
chdir: '{{ build_repo_dir }}/DLRN'
|
||||
when: dlrn_pre_installed|bool
|
||||
|
||||
- name: copy the DLRN scripts in the virtualenv to the scripts dir
|
||||
shell: "/usr/bin/cp -Rv {{ build_repo_dir }}/dlrn-venv/share/dlrn/scripts {{ build_repo_dir }}/DLRN/"
|
||||
@ -159,6 +170,7 @@
|
||||
path: '{{ build_repo_dir }}/DLRN'
|
||||
state: absent
|
||||
when:
|
||||
- not dlrn_pre_installed|bool
|
||||
- dlrn_cleanup|bool
|
||||
|
||||
- name: Trigger repo injection for quickstart
|
||||
|
Loading…
Reference in New Issue
Block a user