b541c5ef99
Executes all linters via pre-commit, which is much faster, guarantees their version locking and allows upgrading them with a single command. Before this change the only linter running via pre-commit was ansible-lint. Now we also run bashate, flake8 and yamllint via pre-commit. For developer convenience we still keep the old tox environments which allow running a single linter. Added long_description_content_type to fix twine check failure Change-Id: I037eae61921b2a84aa99838804f70e96ee8d8b13
53 lines
1.1 KiB
YAML
53 lines
1.1 KiB
YAML
---
|
|
- import_tasks: precheck.yml
|
|
tags:
|
|
- always
|
|
|
|
- import_tasks: get_original_user.yml
|
|
|
|
- name: Create image build context directory
|
|
tempfile:
|
|
state: directory
|
|
prefix: tripleo-modify-image
|
|
register: context_dir
|
|
|
|
- name: Set modify_dir_path
|
|
set_fact:
|
|
modify_dir_path: "{{ context_dir.path }}"
|
|
|
|
- name: List RPMs
|
|
find:
|
|
paths: "{{ rpms_path }}"
|
|
patterns: "^.*?\\.rpm$"
|
|
use_regex: true
|
|
when: rpms_path is defined
|
|
register: context_rpms
|
|
|
|
- name: Set rpms_list
|
|
set_fact:
|
|
rpms_list: "{{ context_rpms.files|json_query('[*].path') }}"
|
|
|
|
- name: Copy RPMs to context dir
|
|
copy:
|
|
src: "{{ item }}"
|
|
dest: "{{ modify_dir_path }}"
|
|
with_list: "{{ rpms_list }}"
|
|
|
|
- name: Write Dockerfile to {{ modify_dir_path }}
|
|
template:
|
|
src: Dockerfile-rpm.j2
|
|
dest: "{{ modify_dir_path }}/Dockerfile"
|
|
|
|
- name: Write rpm_install.sh
|
|
copy:
|
|
src: rpm_install.sh
|
|
dest: "{{ modify_dir_path }}/rpm_install.sh"
|
|
mode: '0555'
|
|
|
|
- include_tasks: modify_image.yml
|
|
|
|
- name: Clean modify directory
|
|
file:
|
|
state: absent
|
|
path: "{{ modify_dir_path }}"
|