rh-openstack-ci-team
      • Sharing URL Link copied
      • /edit
      • View mode
        • Edit mode
        • View mode
        • Book mode
        • Slide mode
        Edit mode View mode Book mode Slide mode
      • Customize slides
      • Note Permission
      • Read
        • Owners
        • Signed-in users
        • Everyone
        Owners Signed-in users Everyone
      • Write
        • Owners
        • Signed-in users
        • Everyone
        Owners Signed-in users Everyone
      • Engagement control Commenting, Suggest edit, Emoji Reply
    • Invite by email
      Invitee
    • Publish Note

      Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

      Your note will be visible on your profile and discoverable by anyone.
      Your note is now live.
      This note is visible on your profile and discoverable online.
      Everyone on the web can find and read all notes of this public team.
      See published notes
      Unpublish note
      Please check the box to agree to the Community Guidelines.
      View profile
    • Commenting
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
      • Everyone
    • Suggest edit
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
    • Emoji Reply
    • Enable
    • Versions and GitHub Sync
    • Note settings
    • Engagement control
    • Transfer ownership
    • Delete this note
    • Insert from template
    • Import from
      • Dropbox
      • Google Drive
      • Gist
      • Clipboard
    • Export to
      • Dropbox
      • Google Drive
      • Gist
    • Download
      • Markdown
      • HTML
      • Raw HTML
Menu Note settings Versions and GitHub Sync Sharing URL Help
Menu
Options
Engagement control Transfer ownership Delete this note
Import from
Dropbox Google Drive Gist Clipboard
Export to
Dropbox Google Drive Gist
Download
Markdown HTML Raw HTML
Back
Sharing URL Link copied
/edit
View mode
  • Edit mode
  • View mode
  • Book mode
  • Slide mode
Edit mode View mode Book mode Slide mode
Customize slides
Note Permission
Read
Owners
  • Owners
  • Signed-in users
  • Everyone
Owners Signed-in users Everyone
Write
Owners
  • Owners
  • Signed-in users
  • Everyone
Owners Signed-in users Everyone
Engagement control Commenting, Suggest edit, Emoji Reply
  • Invite by email
    Invitee
  • Publish Note

    Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

    Your note will be visible on your profile and discoverable by anyone.
    Your note is now live.
    This note is visible on your profile and discoverable online.
    Everyone on the web can find and read all notes of this public team.
    See published notes
    Unpublish note
    Please check the box to agree to the Community Guidelines.
    View profile
    Engagement control
    Commenting
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    • Everyone
    Suggest edit
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    Emoji Reply
    Enable
    Import from Dropbox Google Drive Gist Clipboard
       owned this note    owned this note      
    Published Linked with GitHub
    1
    Subscribed
    • Any changes
      Be notified of any changes
    • Mention me
      Be notified of mention me
    • Unsubscribe
    Subscribe
    # How to release fix in Ansible collection ###### tags: `Documentation` `Ansible` *The story here is related to latest changes in TripleO and Ansible. Since we started to use Ansible collections as RPMs, this document is going to describe the process of fix release from submitting it to collection repository till OSP release* [TOC] ## Ansible Podman collection release process Resources: * https://github.com/containers/ansible-podman-collections * https://src.fedoraproject.org/rpms/ansible-collection-containers-podman * [Fedora's Package Update Guide](https://docs.fedoraproject.org/en-US/package-maintainers/Package_Update_Guide/) * [Koji page for `ansible-collection-containers-podman`](https://koji.fedoraproject.org/koji/packageinfo?packageID=33610) * [Bodhi's page `Create New Update`](https://bodhi.fedoraproject.org/updates/new) Guide: 1. Fork `ansible-podman-collections` repository from: https://github.com/containers/ansible-podman-collections 2. Create a fix and pull request to original repository. Wait for CI and ask for review and merge. (In this collection mostly for @sshnaidm) 3. After merge start a releasing process by releasing to Galaxy: - create an entry of changelog in `changelogs/changelog.yaml` - run `antsibull-changelog release` command (install `antsibull` tool before) - check `changelogs/changelog.yaml` file and generated changelog in `CHANGELOG.rst` and fix if need - (optional) generate documentation with command `./build_docs.sh <your_path_to>/ansible-podman-collections/docs` from `contrib` folder - change `version` in `galaxy.yaml` file to the new one. - if everything is ok, commit and merge changes in changelog or/and docs - `git tag <version_tag>` where `<version_tag>` is tag of the new version - for example `2.3.4` - push tags to upstream - `git push upstream <version_tag>` - wait until check and release jobs finish and check in galaxy that new version is uploaded: https://galaxy.ansible.com/containers/podman 4. Build and release RPM in Fedora (which will be imported to RDO later) - install all required tools, mainly `fedpkg` - create a space for work if no such: `mkdir fedora-scm` - fork Fedora repository [rpms/ansible-collection-containers-podman]( https://src.fedoraproject.org/rpms/ansible-collection-containers-podman). **NOTE:** If you are not in `admins`, then you will need to make a PR, otherwise you can just commit directly to repo. - clone original or your forked repo such as https://src.fedoraproject.org/fork/sshnaidm/rpms/ansible-collection-containers-podman with `fedpkg clone rpms/ansible-collection-containers-podman` (or for PRs: `fedpkg clone forks/sshnaidm/rpms/ansible-collection-containers-podman` where instead of `sshnaidm` your username) - `cd ansible-collection-containers-podman` and check that you are on branch `rawhide`, if not run `fedpkg switch-branch rawhide` - Retrieve new sources from github: `wget https://github.com/containers/ansible-podman-collections/archive/<version_tag>.tar.gz` where <version_tag> is a new version, like `2.4.1` Or run `spectool -g *spec` **after** you changed the `spec` file: - Bump version in `*.spec` file as in this [example for `1.9.4`]( https://src.fedoraproject.org/rpms/ansible-collection-containers-podman/c/6dc5eb79a3aa082e062768993bed66675ff9d520?branch=rawhide): ```diff +Version: <version-tag> +Release: 1%{?dist} ``` and add changelog, sort of: ```diff +* Tue Jun 08 2021 Sagi Shnaidman <sshnaidm@redhat.com> - <version-tag>-1 +- Bump to <version-tag>-1 ``` - Upload sources you downloaded before: `fedpkg new-sources <version-tag>.tar.gz` - `fedpkg mockbuild` to check building (optional) - Verify and commit code: + `fedpkg diff` + `fedpkg lint` (to check linters on RPM) + `fedpkg commit` with message like "Bump to <version-tag>" - Push changes for `rawhide` and let Koji build the package: + `fedpkg push` + `fedpkg build` + check [Koji's page for `ansible-collection-containers-podman`]( https://koji.fedoraproject.org/koji/packageinfo?packageID=33610) (optional) - Repeat for older branches, e.g. Fedora 36: + `fedpkg switch-branch f36` + `git merge rawhide` + `fedpkg push` + `fedpkg build` + `fedpkg update` or use [Bodhi's page `Create New Update`](https://bodhi.fedoraproject.org/updates/new) - Repeat previous steps for branch `epel9`. 5. Promote built RPM to RDO: - Update `rdoinfo` repository to build package `ansible-collection-containers-podman` in RDO for CentOS 8 and CentOS 9: + For CentOS8, edit `buildsys-tags/cloud8s-openstack-<openstack-current-branch>-candidate.yml` and send patch to review. For example if current branch is Xena, then it is `buildsys-tags/cloud8s-openstack-xena-candidate.yml`. If package is there, just change version to latest, if not, add it as: ``` - project: ansible-collection-containers-podman buildsys-tags: cloud8s-openstack-xena-candidate: ansible-collection-containers-podman-<version-tag>-1.el8 ``` Example: https://review.rdoproject.org/r/c/rdoinfo/+/43850 + For CentOS9, edit `SPECS/ansible-collection-containers-podman.spec` in repo [`deps/ansible-collection-containers-podman`]( https://review.rdoproject.org/r/q/project:deps%252Fansible-collection-containers-podman) as described in [Requirements management in RDO](https://www.rdoproject.org/documentation/requirements/). Example: https://review.rdoproject.org/r/c/deps/ansible-collection-containers-podman/+/43849 - Update `rdoinfo` repository to import updated packages of `ansible-collection-containers-podman` into RDO branches. Bump version of `ansible-collection-containers-podman` in all `buildsys-tags/*-openstack-*-testing.yml` relevant files and send patch to review. **NOTE:** Send separate patches for each RDO release because several jobs will run for each RDO release which have to pass for a patch to pass Zuul CI gates. RDO folks apparently does not want to recheck all if there is a single failing job hence submit one patch per file. Examples: + [`buildsys-tags/cloud8s-openstack-wallaby-testing.yml`](https://review.rdoproject.org/r/c/rdoinfo/+/43852) + [`buildsys-tags/cloud8s-openstack-xena-testing.yml`](https://review.rdoproject.org/r/c/rdoinfo/+/43853) + [`buildsys-tags/cloud8s-openstack-yoga-testing.yml`](https://review.rdoproject.org/r/c/rdoinfo/+/43858) + [`buildsys-tags/cloud9s-openstack-wallaby-testing.yml`](https://review.rdoproject.org/r/c/rdoinfo/+/43856) + [`buildsys-tags/cloud9s-openstack-xena-testing.yml`](https://review.rdoproject.org/r/c/rdoinfo/+/43861) + [`buildsys-tags/cloud9s-openstack-yoga-testing.yml`](https://review.rdoproject.org/r/c/rdoinfo/+/43855) + [`buildsys-tags/cloud9s-openstack-zed-testing.yml`](https://review.rdoproject.org/r/c/rdoinfo/+/43854) ## Ansible OpenStack collection release process Content has been migrated to [`docs/releasing.md` in Ansible OpenStack collection]( https://opendev.org/openstack/ansible-collections-openstack/src/branch/master/docs/releasing.md). ## Ansible community.general, ansible.posix and ansible.netcommon collections release process 1. Submit PR to collection in its repo * https://github.com/ansible-collections/community.general * https://github.com/ansible-collections/ansible.posix * https://github.com/ansible-collections/ansible.netcommon 2. Test PR with upstream or RDO job. * In upstream run a job and set PR in commit message with "**github:** " keyword: For example use this commit message to test PR 215 from `ansible.posix`: ``` DNM test PR with our jobs This patch is for test. github: https://github.com/ansible-collections/ansible.posix/pull/215 Change-ID: ...... ``` Same can be used in testproject of RDO CI or whenever else. 3. If test passed and your're satisfied with its results, wait until PR is merged and collection is released. (TBD) 4. Submit a patch to updated RPM with a new version: * [ansible-collection-ansible-netcommon.spec](https://src.fedoraproject.org/rpms/ansible-collection-ansible-netcommon/blob/rawhide/f/ansible-collection-ansible-netcommon.spec) * [ansible-collection-ansible-posix.spec](https://src.fedoraproject.org/rpms/ansible-collection-ansible-posix/blob/rawhide/f/ansible-collection-ansible-posix.spec) * [ansible-collection-community-general.spec](https://src.fedoraproject.org/rpms/ansible-collection-community-general/blob/rawhide/f/ansible-collection-community-general.spec) 5. Fork the RPM specs repo, for example press button `Fork` in the page os [netcommon](https://src.fedoraproject.org/rpms/ansible-collection-ansible-netcommon) repo to fork it to your space. 6. Clone it to your machine with `SSH://` transport. For example: `git clone ssh://sshnaidm@pkgs.fedoraproject.org/forks/sshnaidm/rpms/ansible-collection-ansible-netcommon.git` 7. Update spec file and add changelog. 8. Get the new sources tarball: `spectool -g *spec` 9. Upload the tarball to sources: `fedpkg new-sources ./path/to/tar.gz`. Look at `sources` that it has right tarball. 10. Commit changes to spec and sources: `git commit -asm "Update ....."` 11. Check your PR in CI, look at line "**Fedora CI - scratch build**" in your PR web page and go this link to see Koji build. 12. After build in Koji succeeded and RPM update patch was merged, update the **rdoinfo** with a new package version. Submit a patch to rdoinfo, for example: https://review.rdoproject.org/r/c/rdoinfo/+/34314/1/buildsys-tags/cloud8s-openstack-xena-candidate.yml # How to create a new package Sometimes we'll need to add a new collection or new dependency for existing collection. The process of adding another package is like following: ## Add package to Fedora RPMs * *docs to read: [New package process for existing contributors](https://fedoraproject.org/wiki/Newpackageprocessforexistingcontributors)* 1. Create a spec for collection, usually it's customized copy of existing spec of any collection, for example of [community.general](https://src.fedoraproject.org/rpms/ansible-collection-community-general/blob/rawhide/f/ansible-collection-community-general.spec). 2. Run `rpmbuild -ba /path/to/spec/file` and check there are no errors and source RPM is built (usually in `~/rpmbuild/SRPMS/`) 3. Upload your SRPM and SPEC files onto the internet somewhere, for example in your Github in gist. Get a direct link to file (`raw`). * For example, [patch to add SRPM and spec file](https://github.com/sshnaidm/ansible.utils/commit/2cfd6392c51192bf74e26635608b40525a14a3ca). 4. Try to build it in Koji: `koji build --scratch f33 /home/sshnaidm/rpmbuild/SRPMS/your_collection_SRPM_file.src.rpm` Remember the file should be **SRPM** (source RPM). Watch the build and ensure it succeeds. 5. Make sure you have a Bugzilla account at bugzilla.redhat.com. Fill out this form: https://bugzilla.redhat.com/bugzilla/enter_bug.cgi?product=Fedora&format=fedora-review * Make sure you put the name of the package in the Review Summary field, along with a very brief summary of what it is * Make sure that you put the URL paths for the SPEC file and the SRPM file in the Review Description * Put a description of your package (usually, this can be the same thing as what you put in the spec %description) in Review Description * The review process is described in detail here: [Package Review Guidelines](https://fedoraproject.org/wiki/Packaging:ReviewGuidelines) * Examples: [Review Request: ansible-collections-openstack - Openstack Ansible collections for managing Openstack cloud](https://bugzilla.redhat.com/show_bug.cgi?id=1946258) 6. After a bugzilla review request is approved, let's create a repo: `fedpkg request-repo PACKAGE-NAME BUGZILLA-TICKET-NUMBER` For example: `fedpkg request-repo ansible-collection-ansible-utils 1979543` If we need more than `rawhide` branch, then request for a branch: `fedpkg request-branch --repo PACKAGE-NAME BRANCH` For example: `fedpkg request-branch --repo ansible-collection-ansible-utils f34` The pull requests should be tracked in https://pagure.io 7. When your "Issues" are approved on https://pagure.io run somewhere to clone the package: `fedpkg clone PACKAGE-NAME` for example: `fedpkg clone ansible-collection-ansible-utils` 8. Make sure you're logged in with Fedora Kerberos: `kinit username@FEDORAPROJECT.ORG` 9. Import the approved SRPM (from point 2): `fedpkg import ~/rpmbuild/SRPMS/...src.rpm` 10. Commit sources and spec by `git commit -m "Initial import (#nnnnnn)."` (where *nnnnnn* is your Bugzilla package review bug number) - for example `git commit -m "Initial import (#1979543)."` 11. Push it with `fedpkg push` or `git push`. 12. Build it with `fedpkg build`. 13. In case you have other branches: * switch to branch: `fedpkg switch-branch BRANCH` for example `fedpkg switch-branch f34` * Merge commit from main branch `rawhide` from point 12: `git merge rawhide` * Push `fedpkg push` * Build `fedpkg build` * In case you want the package be updated in released (non `rawhide`) branches run: * `fedpkg update` * In the commit message make sure: ``` type=newpackage bugs=1979543 # your BZ number display_name=<your package name> ``` * Track your package moving from `testing` to `stable` in web UI: https://bodhi.fedoraproject.org/updates/ or in your [Dashboard](https://bodhi.fedoraproject.org/) 14. Add package to RDO: create a patch to `rdoinfo` repository, which adds the package to `deps.yml` and candidate file of current branch (current `master`). For example `cloud8s-openstack-xena-candidate.yml` for Xena branch. Example of patch: https://review.rdoproject.org/r/c/rdoinfo/+/34445 15. After it's built successfully for `candidate` add patch for `rdoinfo` to build it in `testing`, for example in branch `xena` it will be `cloud8s-openstack-xena-testing` file. Example of patch: https://review.rdoproject.org/r/c/rdoinfo/+/34513 17. Check that package is built and present in repo, for Ansible collections it will be `master deps` repository, like: https://trunk.rdoproject.org/centos8-master/deps/latest/noarch/ 18. Close the Bugzilla ticket. You should close it with resolution NEXTRELEASE or RAWHIDE, depending on where you built the package. The resolution field will appear after you set the status field to CLOSED. ++++ Done!

    Import from clipboard

    Paste your markdown or webpage here...

    Advanced permission required

    Your current role can only read. Ask the system administrator to acquire write and comment permission.

    This team is disabled

    Sorry, this team is disabled. You can't edit this note.

    This note is locked

    Sorry, only owner can edit this note.

    Reach the limit

    Sorry, you've reached the max length this note can be.
    Please reduce the content or divide it to more notes, thank you!

    Import from Gist

    Import from Snippet

    or

    Export to Snippet

    Are you sure?

    Do you really want to delete this note?
    All users will lose their connection.

    Create a note from template

    Create a note from template

    Oops...
    This template has been removed or transferred.
    Upgrade
    All
    • All
    • Team
    No template.

    Create a template

    Upgrade

    Delete template

    Do you really want to delete this template?
    Turn this template into a regular note and keep its content, versions, and comments.

    This page need refresh

    You have an incompatible client version.
    Refresh to update.
    New version available!
    See releases notes here
    Refresh to enjoy new features.
    Your user state has changed.
    Refresh to load new user state.

    Sign in

    Forgot password

    or

    By clicking below, you agree to our terms of service.

    Sign in via Facebook Sign in via Twitter Sign in via GitHub Sign in via Dropbox Sign in with Wallet
    Wallet ( )
    Connect another wallet

    New to HackMD? Sign up

    Help

    • English
    • 中文
    • Français
    • Deutsch
    • 日本語
    • Español
    • Català
    • Ελληνικά
    • Português
    • italiano
    • Türkçe
    • Русский
    • Nederlands
    • hrvatski jezik
    • język polski
    • Українська
    • हिन्दी
    • svenska
    • Esperanto
    • dansk

    Documents

    Help & Tutorial

    How to use Book mode

    Slide Example

    API Docs

    Edit in VSCode

    Install browser extension

    Contacts

    Feedback

    Discord

    Send us email

    Resources

    Releases

    Pricing

    Blog

    Policy

    Terms

    Privacy

    Cheatsheet

    Syntax Example Reference
    # Header Header 基本排版
    - Unordered List
    • Unordered List
    1. Ordered List
    1. Ordered List
    - [ ] Todo List
    • Todo List
    > Blockquote
    Blockquote
    **Bold font** Bold font
    *Italics font* Italics font
    ~~Strikethrough~~ Strikethrough
    19^th^ 19th
    H~2~O H2O
    ++Inserted text++ Inserted text
    ==Marked text== Marked text
    [link text](https:// "title") Link
    ![image alt](https:// "title") Image
    `Code` Code 在筆記中貼入程式碼
    ```javascript
    var i = 0;
    ```
    var i = 0;
    :smile: :smile: Emoji list
    {%youtube youtube_id %} Externals
    $L^aT_eX$ LaTeX
    :::info
    This is a alert area.
    :::

    This is a alert area.

    Versions and GitHub Sync
    Get Full History Access

    • Edit version name
    • Delete

    revision author avatar     named on  

    More Less

    Note content is identical to the latest version.
    Compare
      Choose a version
      No search result
      Version not found
    Sign in to link this note to GitHub
    Learn more
    This note is not linked with GitHub
     

    Feedback

    Submission failed, please try again

    Thanks for your support.

    On a scale of 0-10, how likely is it that you would recommend HackMD to your friends, family or business associates?

    Please give us some advice and help us improve HackMD.

     

    Thanks for your feedback

    Remove version name

    Do you want to remove this version name and description?

    Transfer ownership

    Transfer to
      Warning: is a public team. If you transfer note to this team, everyone on the web can find and read this note.

        Link with GitHub

        Please authorize HackMD on GitHub
        • Please sign in to GitHub and install the HackMD app on your GitHub repo.
        • HackMD links with GitHub through a GitHub App. You can choose which repo to install our App.
        Learn more  Sign in to GitHub

        Push the note to GitHub Push to GitHub Pull a file from GitHub

          Authorize again
         

        Choose which file to push to

        Select repo
        Refresh Authorize more repos
        Select branch
        Select file
        Select branch
        Choose version(s) to push
        • Save a new version and push
        • Choose from existing versions
        Include title and tags
        Available push count

        Pull from GitHub

         
        File from GitHub
        File from HackMD

        GitHub Link Settings

        File linked

        Linked by
        File path
        Last synced branch
        Available push count

        Danger Zone

        Unlink
        You will no longer receive notification when GitHub file changes after unlink.

        Syncing

        Push failed

        Push successfully