项目作者: rhos-infra

项目描述 :
Patching components source code and repackaging in RPMs
高级语言: Shell
项目地址: git://github.com/rhos-infra/patch-components.git
创建时间: 2017-02-07T08:57:37Z
项目社区:https://github.com/rhos-infra/patch-components

开源协议:

下载


Patch-components

Allows to repackage RPMs with source code directly from Gerrit or local repo.

How to use this project as an ansible playbook

Create virtual environment:

  1. virtualenv venv
  2. source venv/bin/activate
  3. pip install ansible

Clone the component from to ~/ and cherry-pick the patch:

  1. git clone https://<gerrit url>/gerrit/<component-name> ~/<component-name>
  2. cd ~/<component-name>
  3. git fetch https://<gerrit url>/gerrit/<component-name> refs/changes/xy/abcde/x && git checkout FETCH_HEAD

Run:

  1. ansible-playbook -i hosts main.yml --extra-vars @params.yml -vvvv

Pre-release version patching

Creation of rpm is allowed with per-released version as well. Make sure to increment the pre_rel_version
variable located in roles/patch_rpm/vars/main.yml when version is released to avoid failure in patching.

Result

The project will generate one or more RPMs in the following path: dist-git/

How to use this as an InfraRed plugin

Clone the component from to ~/ and cherry-pick the patch as described in the section
“How to use this project as an ansible playbook”. Create virtual environmenti and install infrared:

  1. git clone https://github.com/redhat-openstack/infrared.git
  2. cd infrared
  3. virtualenv venv
  4. source venv/bin/activate
  5. pip install -e .

Add patch-components as a plugin:

  1. infrared plugin add https://github.com/rhos-infra/patch-components.git

Run:
infrared patch-components —host-ip A.B.C.D —host-username —component-name —host-key_file ~/.ssh/id_rsa —component-version

Contribute

Contributions are made via GerritHub. Do not submit Pull Requests.