From Fedora Project Wiki

< CI

(Move some stuff from the main Tests page)
(Update for non-packager access)
Line 1: Line 1:
{{admon/warning|Temporary Workaround|Note: This is a temporary workaround until the [https://pagure.io/fedora-infrastructure/issue/6361 non-packager access] issue is fixed.}}
Fedora is running [https://pagure.io/pagure pagure] on the top of its dist-git at [https://src.fedoraproject.org https://src.fedoraproject.org].


Unless you are a Fedora packager follow instructions for creating a public git repo on
Having pagure on the top of dist-git means you can use the fork/pull-request workflow.
[https://fedoraproject.org/wiki/Infrastructure/fedorapeople.org#fedora_people_git_hosting_support fedorapeople]
To use this workflow there are two situations to consider:
and upload package folder there into the <code>public_git</code> folder:


scp -r <package> <username>@fedorapeople.org:public_git/
=== You are a packager ===


To check that everything works and ready for pull request by cloning created repository to your local machine. For example, for docker repository:
If you are a packager, you have ssh access to dist-git, so you can use pagure directly. Find the repository you would like to contribute to, fork it via the "fork" button at the top right. Wait a couple of minutes for the git repository and its access to be re-generated. Clone locally using the ssh url and interact with this git repo as you would do normally.


  git clone git://fedorapeople.org/~username/docker.git
=== You are *not* a packager ===


Navigate to the [https://src.fedoraproject.org/rpms/pam/pull-requests fedoraproject.org] (select appropriate package).
Contributors that are not in the packager group cannot ssh into dist-git. This is for security reasons and will not be changed.
* Press '''File Pull Request''' button
* Then press '''Remote pull request'''


Fill the required fields:
However, pagure on dist-git supports now pushing via https.
 
For this you will need the following packages:
* python-openidc-client >= 0.6.0 (available in updates-testing)
* rpkg >= 1.55 (available in updates)
* fedpkg >= 1.34 (available in updates)
 
So check the version of the packages you have installed:
`rpm -q python2-openidc-client python2-rpkg fedpkg`
 
and potentially, update them:
`sudo dnf update python-openidc-client fedpkg python-rpkg --enablerepo=updates-testing`
 
To push via https, your git repository needs to be configured in a certain way (ie: you need to have a `[credential]` section in your `.git/config`).
There are two ways you can have this.
 
* Clone your git repo using `fedpkg -a`, for example: `fedpkg clone -a forks/pingoufpca/rpms/fedora-gather-easyfix`. In this case fedpkg will take care of setting up correctly your git repository allowing you to push using `git push`.
 
* Clone your git repo using `git clone https://...` and push using `fedpkg push`. Here as well, fedpkg will take care of configuring correctly your git repository.
 
=== Open a pull-request ===
 
Once you have pushed your commits to your fork, you can navigate to your fork in the UI and open the pull-request using either the `New PR` button appearing next to the branch you pushed into in the main page of the project.


* '''Title:''' Add CI tests using the standard test interface
* '''Git repo address:''' <nowiki>git://fedorapeople.org/~<username>/<package folder></nowiki>
* '''Git branch:''' new_tests
* '''To branch:''' master


{{admon/tip|Working with Pull Requests|You may encounter a situation where you want to include changes from the master branch that were made after you created your pull request. Follow the article [https://docs.pagure.org/pagure/usage/pull_requests.html#working-with-pull-requests/ Working with Pull Requests]}}
{{admon/tip|Working with Pull Requests|You may encounter a situation where you want to include changes from the master branch that were made after you created your pull request. Follow the article [https://docs.pagure.org/pagure/usage/pull_requests.html#working-with-pull-requests/ Working with Pull Requests]}}

Revision as of 08:34, 6 August 2018

Fedora is running pagure on the top of its dist-git at https://src.fedoraproject.org.

Having pagure on the top of dist-git means you can use the fork/pull-request workflow. To use this workflow there are two situations to consider:

You are a packager

If you are a packager, you have ssh access to dist-git, so you can use pagure directly. Find the repository you would like to contribute to, fork it via the "fork" button at the top right. Wait a couple of minutes for the git repository and its access to be re-generated. Clone locally using the ssh url and interact with this git repo as you would do normally.

You are *not* a packager

Contributors that are not in the packager group cannot ssh into dist-git. This is for security reasons and will not be changed.

However, pagure on dist-git supports now pushing via https.

For this you will need the following packages:

  • python-openidc-client >= 0.6.0 (available in updates-testing)
  • rpkg >= 1.55 (available in updates)
  • fedpkg >= 1.34 (available in updates)

So check the version of the packages you have installed: rpm -q python2-openidc-client python2-rpkg fedpkg

and potentially, update them: sudo dnf update python-openidc-client fedpkg python-rpkg --enablerepo=updates-testing

To push via https, your git repository needs to be configured in a certain way (ie: you need to have a [credential] section in your .git/config). There are two ways you can have this.

  • Clone your git repo using fedpkg -a, for example: fedpkg clone -a forks/pingoufpca/rpms/fedora-gather-easyfix. In this case fedpkg will take care of setting up correctly your git repository allowing you to push using git push.
  • Clone your git repo using git clone https://... and push using fedpkg push. Here as well, fedpkg will take care of configuring correctly your git repository.

Open a pull-request

Once you have pushed your commits to your fork, you can navigate to your fork in the UI and open the pull-request using either the New PR button appearing next to the branch you pushed into in the main page of the project.


Idea.png
Working with Pull Requests
You may encounter a situation where you want to include changes from the master branch that were made after you created your pull request. Follow the article Working with Pull Requests