Neon/Git: Difference between revisions

From KDE Community Wiki
No edit summary
No edit summary
Line 22: Line 22:
=== Admin ===
=== Admin ===


The repository <code>neon:gitolite-admin</code> has gitolite setup, hooks and hook server for those with admin rights (kde sysadmin does).
The repository <code>neon@git.neon.kde.org:gitolite-admin</code> has gitolite setup, hooks and hook server for those with admin rights (kde sysadmin does).


neon-hooks/pre-receive is a hook to check the branch can be committed to
neon-hooks/pre-receive is a hook to check the branch can be committed to
Line 32: Line 32:
sync-repos-from-debian.py checks for all the repositories on in debian pkg-kde and adds any missing to neon.  This gets run nightly on Jonathan's server ''embra''.
sync-repos-from-debian.py checks for all the repositories on in debian pkg-kde and adds any missing to neon.  This gets run nightly on Jonathan's server ''embra''.


It uses gitolite3 on weegie.edinburghlinux.co.uk, a server used by Neon and Kubuntu and administrated by Jonathan Riddell and KDE sysadmin.
It uses gitolite3 on code.kde.org, administrated by the KDE sysadmin team.


Web interface is cgit.
Web interface is phpgit.


=== Settings up new repositories ===
=== Settings up new repositories ===
Line 40: Line 40:
To set up a new repository it is nice to make it first on the Debian server so the syncing is already set up and Debian/Kubuntu packagers know to use it.   
To set up a new repository it is nice to make it first on the Debian server so the syncing is already set up and Debian/Kubuntu packagers know to use it.   
* Ask someone with access (Jonathan etc) to <code>ssh git.debian.org; cd /git/pkg-kde/place-to-put-it; ../setup-git-repository <new-repo></code>
* Ask someone with access (Jonathan etc) to <code>ssh git.debian.org; cd /git/pkg-kde/place-to-put-it; ../setup-git-repository <new-repo></code>
* Then wait 15 minutes while the website for git.debian.org syncs the new repo
* The repository should get automatically get picked up by neon infrastructure at most 60 minutes after creation
* Then run <code>./sync-repos-from-debian.py</code> (just tell Jonathan to run it on his embra server)
* Make a Neon/unstable branch on the neon git repo and get a Jenkins admin to run <code>pangea-tooling jenkins_jobs_update_nci.rb</code>
* Make a Neon/unstable branch on the neon git repo and get a Jenkins admin to run <code>pangea-tooling jenkins_jobs_update_nci.rb</code>


Line 51: Line 50:
* neon-hooks/pre-receive rejects pushes to non-neon branches and sets up remote to Debian if it exists
* neon-hooks/pre-receive rejects pushes to non-neon branches and sets up remote to Debian if it exists
* neon/website and neon/releases.neon.kde.org have a post-receive hook to update their websites (no longer used for websites at least)
* neon/website and neon/releases.neon.kde.org have a post-receive hook to update their websites (no longer used for websites at least)
* sync-repos-from-debian.py is run nightly on an external server to sync any new repos from Debian pkg-kde (probably no need to be external user, it does need to ssh into the server to remove repositories)
* cron on the gitolite server runs bits to restart the servers and run the check scripts:  
* cron on the gitolite server runs bits to restart the servers and run the check scripts:  
{{Input|1=<nowiki>
{{Input|1=<nowiki>
* * * * * /usr/bin/flock -n /tmp/server.lockfile /var/lib/gitolite3/neon-fetch-request-server.py
# Hourly sync of new repositories from git.debian.org
* * * * * /usr/bin/flock -n /tmp/gitdaemon.lockfile git daemon --reuseaddr --base-path=/var/lib/gitolite3/repositories /var/lib/gitolite3/repositories
@hourly python3 ~/config-sync/gitolite-admin/maintenance/update-gitolite-setup.py
20 3 * * * /var/lib/gitolite3/check-symlink-repos.py
# Daily full sync of all repositories from git.debian.org
40 3 * * * /var/lib/gitolite3/check-repo-remotes.py
@daily python3 ~/config-sync/gitolite-admin/maintenance/update-gitolite-setup.py --fetch-all-repositories
</nowiki>}}
</nowiki>}}

Revision as of 10:31, 22 August 2016

The Neon Git repositories are at http://packaging.neon.kde.org

All KDE contributors can commit to neon* branches or repositories under neon/ directory, it will reject commits to other branches.

They are clones of the repositories used by Debian pkg-kde team http://anonscm.debian.org/cgit/pkg-kde/. Any commits made to a Debian pkg-kde repository will be pulled into Neon Git immediately.

Add this to ~/.gitconfig

[url "git://anongit.neon.kde.org/"]
    insteadOf = neon:
[url "[email protected]:"]
    pushInsteadOf = neon:

and clone with:

git clone neon:plasma/khotkeys

Anonymous Access

If you don't have a KDE account you can still clone the repo at

git clone git://anongit.neon.kde.org/plasma/khotkeys

Admin

The repository [email protected]:gitolite-admin has gitolite setup, hooks and hook server for those with admin rights (kde sysadmin does).

neon-hooks/pre-receive is a hook to check the branch can be committed to

debian-hooks/debian-to-neon-post-receive is a hook for debian pkg-kde git repos to call the neon server on updates

server/neon-fetch-request-server.py is an XML-RPC server run on the neon server which is called by the debian hook and fetches updates

sync-repos-from-debian.py checks for all the repositories on in debian pkg-kde and adds any missing to neon. This gets run nightly on Jonathan's server embra.

It uses gitolite3 on code.kde.org, administrated by the KDE sysadmin team.

Web interface is phpgit.

Settings up new repositories

To set up a new repository it is nice to make it first on the Debian server so the syncing is already set up and Debian/Kubuntu packagers know to use it.

  • Ask someone with access (Jonathan etc) to ssh git.debian.org; cd /git/pkg-kde/place-to-put-it; ../setup-git-repository <new-repo>
  • The repository should get automatically get picked up by neon infrastructure at most 60 minutes after creation
  • Make a Neon/unstable branch on the neon git repo and get a Jenkins admin to run pangea-tooling jenkins_jobs_update_nci.rb

The Set Up

  • neon:gitolite-admin has hooks in .gitolite/hooks/common which are symlinks to neon-hooks/ that get added to new repositories
  • .gitolite/hooks/update is the normal hook from gitolite that does whatever gitolite needs
  • neon-hooks/post-receive pings jenkins to start a new build
  • neon-hooks/pre-receive rejects pushes to non-neon branches and sets up remote to Debian if it exists
  • neon/website and neon/releases.neon.kde.org have a post-receive hook to update their websites (no longer used for websites at least)
  • cron on the gitolite server runs bits to restart the servers and run the check scripts:
# Hourly sync of new repositories from git.debian.org
@hourly python3 ~/config-sync/gitolite-admin/maintenance/update-gitolite-setup.py
# Daily full sync of all repositories from git.debian.org
@daily python3 ~/config-sync/gitolite-admin/maintenance/update-gitolite-setup.py --fetch-all-repositories