Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

packit #84

Merged
merged 2 commits into from
Oct 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 41 additions & 0 deletions .packit.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# See the documentation for more information:
# https://packit.dev/docs/configuration/

specfile_path: ansible-collection-redhat-satellite.spec

# add or remove files that should be synced
files_to_sync:
- ansible-collection-redhat-satellite.spec
- .packit.yaml

# name in upstream package repository or registry (e.g. in PyPI)
upstream_package_name: redhat.satellite
# downstream (Fedora) RPM package name
downstream_package_name: ansible-collection-redhat-satellite

upstream_tag_template: v{version}

actions:
post-upstream-clone:
- "wget https://github.com/theforeman/foreman-packaging/raw/rpm/develop/packages/satellite/ansible-collection-redhat-satellite/ansible-collection-redhat-satellite.spec -O ansible-collection-redhat-satellite.spec"
get-current-version:
- python3 -c 'import yaml; print(yaml.safe_load(open("galaxy.yml"))["version"].replace("-dev", ""))'
create-archive:
- make dist PYTHON_COMMAND=python3
- bash -c "ls -1t ./redhat-satellite-*.tar.gz | head -n 1"

jobs:
- job: copr_build
trigger: pull_request
targets:
- rhel-8
- rhel-9
module_hotfixes: true

srpm_build_deps:
- wget
- python3
- python3-py
- python3-pyyaml
- make
- ansible-core
6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -145,10 +145,10 @@ $(RUNTIME_YML): FORCE
$(PYTHON_COMMAND) generate_action_groups.py

branding:
sed -i 's/theforeman\.foreman/redhat.satellite/g' plugins/*/*.py tests/inventory/*.foreman.yml tests/test_callback.py tests/test_module_state.py tests/test_playbooks/*.yml changelogs/config.yaml changelogs/changelog.yaml CHANGELOG.rst roles/*/README.md roles/*/*/*.yml docs/cvmanager.md tests/test_playbooks/fixtures/*.yml $(RUNTIME_YML) .ansible-lint
sed -i 's/theforeman\.foreman/redhat.satellite/g' plugins/*/*.py tests/inventory/*.foreman.yml tests/test_callback.py tests/test_module_state.py tests/test_playbooks/*.yml changelogs/config.yaml changelogs/changelog.yaml CHANGELOG.rst roles/*/README.md roles/*/*/*.yml docs/cvmanager.md tests/test_playbooks/fixtures/*.yml $(RUNTIME_YML) .ansible-lint .packit.yaml
sed -i 's/foreman.example.com/satellite.example.com/g' plugins/*/*.py docs/cvmanager.md roles/*/README.md roles/*/*/*.yml
sed -i 's#theforeman/foreman-ansible-modules#RedHatSatellite/satellite-ansible-collection#g' .github/workflows/*.yml
sed -i 's/theforeman-foreman/redhat-satellite/g' .github/workflows/*.yml
sed -i 's/theforeman-foreman/redhat-satellite/g' .github/workflows/*.yml .packit.yaml
sed -i 's/Foreman Ansible Modules/Red Hat Satellite Ansible Collection/g' docs/index.rst docs/conf.py docs/cvmanager.md docs/_gh_include/*.inc
sed -i 's/The Foreman Project/Red Hat, Inc./g' docs/conf.py
sed -i '/FOREMAN_\w/ s/FOREMAN_/SATELLITE_/g' plugins/doc_fragments/foreman.py plugins/module_utils/foreman_helper.py Makefile
Expand All @@ -158,11 +158,11 @@ branding:
sed -i 's/foreman:/satellite:/' $(RUNTIME_YML)
sed -i 's/foreman/satellite/' generate_action_groups.py .ansible-lint
sed -i '/group/ s/foreman/satellite/' tests/test_playbooks/module_defaults.yml
sed -i 's#packages/plugins#packages/satellite#' .packit.yaml
rm -rf tests/test_playbooks/scc_* tests/test_playbooks/tasks/scc_* tests/test_playbooks/fixtures/scc_* plugins/modules/scc_*.py tests/fixtures/apidoc/scc_*.json
rm -rf tests/test_playbooks/snapshot* tests/test_playbooks/tasks/snapshot* tests/test_playbooks/fixtures/snapshot* plugins/modules/snapshot*.py tests/fixtures/apidoc/snapshot*.json
rm -rf tests/test_playbooks/*_deb.yml
rm -rf tests/test_playbooks/*_ostree.yml
rm -rf .packit.yaml
make $(RUNTIME_YML)

FORCE:
Expand Down
Loading