![Chandan Kumar](/assets/img/avatar_default.png)
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
27 lines
867 B
YAML
27 lines
867 B
YAML
---
|
|
- when: container_build_tool == 'docker'
|
|
block:
|
|
- name: Inspect image with Docker
|
|
docker_image_facts:
|
|
name: "{{ source_image }}"
|
|
retries: 5
|
|
delay: 5
|
|
until: source_image_facts.images is defined
|
|
register: source_image_facts
|
|
- name: Set original_user with Docker
|
|
set_fact:
|
|
original_user: "{{ source_image_facts.images[0].Config.User }}"
|
|
|
|
- when: container_build_tool == 'buildah'
|
|
block:
|
|
- name: Inspect image with Buildah
|
|
command: buildah inspect {{ source_image }}
|
|
register: source_image_facts
|
|
become: true
|
|
- name: Set config with Buildah
|
|
set_fact:
|
|
buildah_config: "{{ source_image_facts.stdout_lines | join('') | from_json }}"
|
|
- name: Set original_user with Buildah
|
|
set_fact:
|
|
original_user: "{{ buildah_config['Docker']['config']['User'] }}"
|