Workflow with OSM tools: Difference between revisions
From OSM Public Wiki
No edit summary |
No edit summary |
||
Line 64: | Line 64: | ||
* The sign-off is a simple line at the end of the explanation for the patch, which certifies that you wrote it or otherwise have the right to pass it on as a open-source patch. The rules are pretty simple: signing a contribution means that you can certify the below: | * The sign-off is a simple line at the end of the explanation for the patch, which certifies that you wrote it or otherwise have the right to pass it on as a open-source patch. The rules are pretty simple: signing a contribution means that you can certify the below: | ||
<pre> | <pre> | ||
== DCO == | |||
Developer's Certificate of Origin 1.1 | Developer's Certificate of Origin 1.1 | ||
Revision as of 09:40, 4 April 2016
Login to OSM portal
- Go to OSM portal: https://osm.etsi.org/portal
- Login using your username and password
Note:
- If you are contributing on behalf of your company, you should login with your ETSI Online Account (EOL).
- If your company is not yet an OSM Member or Participant, you can check here how to join OSM as an organization
- If your company has already joined OSM but you do not have an EOL account yet, you can request an EOL account
- If you are an individual contributor, you can create your OSM account online.
If you need any help, contact us at OSMsupport@etsi.org
Report a bug on Bugzilla
- Go to the OSM Portal
- Click on Bugzilla menu on the portal menu bar.
- Click on "new" on Bugzilla menu bar.
- Chose the "template‑product".
- Complete the bug form: For component, chose "template-code".
- Enter the bug summary, description, attachement, etc.
- Click on the "Submit Bug" button to confirm.
- A bug id is generated (e.g. Bug 6 -Small Error)
Clone your project
- Clone a git repository, for example:
git clone https://osm.etsi.org/gerrit/template-code
- Enter your username
- Enter you password
Note:
- you can find the project repository URL on Gitweb or on Gerrit
- On Gitweb
- Click on Gitweb menu on the portal menu bar.
- Select a product to see the available cloning URLs
- On Gerrit
- Click on Gerrit menu on the portal menu bar.
- Click on "Projects" menu on the Gerrit menu bar.
- Click on "List" menu.
- Select a product to see the available cloning URLs.
- On Gitweb
Configure your Git environment
- Configure your git username:
git config --global user.name <username>
- Configure your git email address:
git config --global user.email <email>
- Check your git configuration:
git config --list
Note: Your email address will be visible on commits to Git. If you'd like to keep your email address private, you can mask your email as follows: if your email is <name@company.com> you can set user.email to <hidden@company.com> This allows other users to identify you as a contributor (with your user name) and Git Stats to keep track of your company's contributions (with the email domain)
Commit changes to your local project
- go to "template-code" folder
cd template-code
- Make some changes on the source (e.g. add a line to the "example-file")
- Stage the change.
git add example-file
- Commit the change to your local repository. You can add a bug id in your commit message to link the bug to your contribution
git commit -s -m "Bug 2 fixed!!"
- You can see your commit message and update it, if needed, using the following command:
git commit --amend
Note:
- The "-s" parameter enables to Sign the contribution. It adds the following line at the end of your commit message:
Signed-off-by: Random J Developer <random@developer.example.org>
- The sign-off is a simple line at the end of the explanation for the patch, which certifies that you wrote it or otherwise have the right to pass it on as a open-source patch. The rules are pretty simple: signing a contribution means that you can certify the below:
== DCO == Developer's Certificate of Origin 1.1 By making a contribution to this project, I certify that: (a) The contribution was created in whole or in part by me and I have the right to submit it under the open source license indicated in the file; or (b) The contribution is based upon previous work that, to the best of my knowledge, is covered under an appropriate open source license and I have the right under that license to submit that work with modifications, whether created in whole or in part by me, under the same open source license (unless I am permitted to submit under a different license), as indicated in the file; or (c) The contribution was provided directly to me by some other person who certified (a), (b) or (c) and I have not modified it. (d) I understand and agree that this project and the contribution are public and that a record of the contribution (including all personal information I submit with it, including my sign-off) is maintained indefinitely and may be redistributed consistent with this project or the open source license(s) involved.
Push your contribution to Gerrit
- Push your commits to Gerrit for Code Review using the following command
git push origin HEAD:refs/for/master
- Enter your username.
- Enter your password.
- You can review your contribution on Gerrit web interface
Notes:
- The following actions are execution automatically after pushing any contribution to Gerrit:
- Gerrit reports the new contribution state to the corresponding bug in Bugzilla
- Gerrit notifies Jenkins to build the new contribution.
Continuous Integration
- Jenkins builds, tests the new contribution, and reports the result on its web interface.
- Jenkins votes on the contribution using “Code-Verif” (-1, +1) on Gerrit.
Code Review
- Other contributors and MDG Committers can comment the new contribution and vote using “Code-Review” (-1, 0, +1) on Gerrit.
- The MDG Leader can comment the new contribution and votes using “Code-Review” (-2, -1, 0, +1, +2) on Gerrit.
Merge the contribution
- The MDG Leader can "Submit" the change only if +1 "Code-Verif" (from Jenkins) and at least one +2 "Code-Review".
- Gerrit reports the result of the code review to the corresponding bug in Bugzilla