-
Notifications
You must be signed in to change notification settings - Fork 637
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
108 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
specfile_path: ansible-lint.spec | ||
actions: | ||
create-archive: | ||
- "python3 setup.py sdist --dist-dir ." | ||
- "sh -c 'echo ansible-lint-$(python3 setup.py --version).tar.gz'" | ||
get-current-version: | ||
- "python3 setup.py --version" | ||
post-upstream-clone: | ||
- | | ||
bash -c "sed -i -e 's/Version: VERSION_PLACEHOLDER/Version: $(python3 setup.py --version)/' ansible-lint.spec" | ||
jobs: | ||
- job: copr_build | ||
metadata: | ||
targets: | ||
- centos-stream-x86_64 | ||
- fedora-stable | ||
trigger: pull_request | ||
# - job: tests | ||
# trigger: pull_request | ||
# metadata: | ||
# targets: | ||
# - fedora-all | ||
# - job: propose_downstream | ||
# trigger: release | ||
# metadata: | ||
# dist-git-branch: master |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,82 @@ | ||
# All tests require Internet access | ||
# to test in mock use: --enable-network --with check | ||
# to test in a privileged environment use: | ||
# --with check --with privileged_tests | ||
%bcond_with check | ||
%bcond_with privileged_tests | ||
|
||
Name: ansible-lint | ||
Version: VERSION_PLACEHOLDER | ||
Release: 1%{?dist} | ||
Summary: TBD Ansible-lint summary | ||
|
||
License: MIT | ||
URL: https://github.com/ansible-community/ansible-lint | ||
Source0: %{pypi_source} | ||
|
||
BuildArch: noarch | ||
|
||
BuildRequires: python%{python3_pkgversion}-devel | ||
BuildRequires: python%{python3_pkgversion}-pip | ||
BuildRequires: python%{python3_pkgversion}-setuptools | ||
BuildRequires: python%{python3_pkgversion}-setuptools_scm | ||
BuildRequires: python%{python3_pkgversion}-setuptools_scm_git_archive | ||
%if %{with check} | ||
# These are required for tests: | ||
BuildRequires: python%{python3_pkgversion}-pyyaml | ||
BuildRequires: python%{python3_pkgversion}-tabulate | ||
BuildRequires: python%{python3_pkgversion}-jsonschema | ||
BuildRequires: python%{python3_pkgversion}-pytest | ||
BuildRequires: python%{python3_pkgversion}-flexmock | ||
BuildRequires: python%{python3_pkgversion}-pytest-xdist | ||
BuildRequires: python%{python3_pkgversion}-libselinux | ||
BuildRequires: ansible | ||
BuildRequires: podman | ||
BuildRequires: buildah | ||
BuildRequires: git | ||
%endif | ||
Requires: ansible | ||
Requires: buildah | ||
|
||
%description | ||
TBD Ansible-lint description | ||
|
||
%prep | ||
%autosetup | ||
|
||
|
||
%build | ||
%py3_build | ||
|
||
|
||
%install | ||
%py3_install | ||
|
||
|
||
%if %{with check} | ||
%check | ||
PYTHONPATH=%{buildroot}%{python3_sitelib} \ | ||
pytest-3 \ | ||
-v \ | ||
--disable-pytest-warnings \ | ||
--numprocesses=auto \ | ||
%if %{with privileged_tests} | ||
tests | ||
%else | ||
tests/unit | ||
%endif | ||
%endif | ||
|
||
|
||
%files | ||
%{python3_sitelib}/ansiblelint/ | ||
%{python3_sitelib}/ansible_lint-*.egg-info/ | ||
%{_bindir}/ansible-lint | ||
%license LICENSE | ||
%doc docs/* README.rst | ||
|
||
|
||
|
||
%changelog | ||
|
||
Available at https://github.com/ansible-community/ansible-lint/releases |