Notice: This Wiki is now read only and edits are no longer possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.
Difference between revisions of "LTS/HowTos"
(→Known Issues) |
|||
Line 1: | Line 1: | ||
− | = | + | = LTS Forge = |
+ | |||
+ | The Eclipse LTS Forge offers several services: | ||
+ | |||
+ | * Gerrit instance which handles the management of repositories as well an interface for members to submit patches for code review (https://lts.eclipse.org/r) | ||
+ | * Hudson instance for Continuous Integration (https://lts.eclipse.org/hudson) | ||
+ | |||
+ | |||
+ | = Using Gerrit / Git = | ||
+ | |||
+ | Gerrit a code review system as well as a repository service manager which provides access to project repositories. | ||
+ | |||
+ | The LTS Forge Gerrit instance is available at https://lts.eclipse.org/r | ||
+ | |||
+ | Once there you will not be able to see any projects or code reviews until you login. You can login by clicking '''Sign In''' at the top right of the page. | ||
+ | |||
+ | You will need to use your eclipse.org email address and password to login. | ||
+ | |||
+ | |||
+ | == Setting up your Gerrit account == | ||
+ | |||
+ | In order to checkout code from the git repositories you will first need to configure your Gerrit account. There is 2 possible options depending on what your most comfortable with. | ||
+ | |||
+ | 1. Setup a SSH Key to enable git checkouts via SSH | ||
+ | |||
+ | 2. Generate a random password to enable git checkotus via HTTPS | ||
+ | |||
+ | |||
+ | To access the screens to configure these you will need to click '''Settings''' at the top right once you login to Gerrit. | ||
+ | |||
+ | Then clicking '''SSH Public Keys''' or '''HTTP Password''' in the left menu bar depending on which you want to configure. | ||
+ | |||
+ | === Setting up SSH Public Keys === | ||
+ | |||
+ | SSH Public Key authentication is recommended over HTTP Password authentication as it is a little more secure. | ||
+ | |||
+ | To configure an SSH Public Key you will need to: | ||
+ | |||
+ | # Click '''Settings''' on the top right after logging into Gerrit | ||
+ | # Click '''SSH Public Keys''' on the left menu | ||
+ | # Copy and Paste your SSH Key into the '''Add SSH Public Key''' box | ||
+ | # Click '''Add''' | ||
+ | |||
+ | Once your SSH Public Key is added you should be able to checkout using the Gerrit SSH URLs for your project for example: | ||
+ | |||
+ | git clone ssh://lts.eclipse.org:29418/project/repo | ||
+ | |||
+ | === Setting up HTTP Password === | ||
+ | |||
+ | To configure an HTTP Password you will need to: | ||
+ | |||
+ | # Click '''Settings''' on the top right after logging into Gerrit | ||
+ | # Click '''HTTP Password''' on the left menu | ||
+ | # Click '''Generate Password''' to generate a new password | ||
+ | |||
+ | Once your HTTP Password is generated you should be able to checkout using the Gerrit HTTPS URLs for your project for example: | ||
+ | |||
+ | git clone https://lts.eclipse.org/r/project/repo.git | ||
+ | |||
+ | == Checking out code with Gerrit == | ||
+ | |||
+ | Gerrit provides 2 URLs for checking out code in the format: | ||
+ | |||
+ | # ssh://lts.eclipse.org:29418/project/repo | ||
+ | # https://lts.eclipse.org/r/project/repo | ||
+ | |||
+ | Replace '''project''' with the project such as "jdt", "platform", "equinox", etc... | ||
+ | Replace '''repo''' with the specific repo in the project such as "eclipse.platform.releng.aggregator" | ||
+ | |||
+ | |||
+ | You can get a list of all projects you have access to by navigating to the projects page in Gerrit. | ||
+ | |||
+ | # Click '''Projects''' in the top menubar | ||
+ | # Click '''List''' in the Projects submenu | ||
+ | |||
+ | The project list shows the full '''project/repo''' list so you can simply replace that string into the example URLs above. | ||
+ | |||
+ | TODO: Add screenshot of projects page | ||
+ | |||
+ | |||
+ | |||
+ | |||
+ | = HowTos = | ||
== Using TortoiseGit to "git submodule update" == | == Using TortoiseGit to "git submodule update" == |
Revision as of 10:56, 2 May 2013
Contents
LTS Forge
The Eclipse LTS Forge offers several services:
- Gerrit instance which handles the management of repositories as well an interface for members to submit patches for code review (https://lts.eclipse.org/r)
- Hudson instance for Continuous Integration (https://lts.eclipse.org/hudson)
Using Gerrit / Git
Gerrit a code review system as well as a repository service manager which provides access to project repositories.
The LTS Forge Gerrit instance is available at https://lts.eclipse.org/r
Once there you will not be able to see any projects or code reviews until you login. You can login by clicking Sign In at the top right of the page.
You will need to use your eclipse.org email address and password to login.
Setting up your Gerrit account
In order to checkout code from the git repositories you will first need to configure your Gerrit account. There is 2 possible options depending on what your most comfortable with.
1. Setup a SSH Key to enable git checkouts via SSH
2. Generate a random password to enable git checkotus via HTTPS
To access the screens to configure these you will need to click Settings at the top right once you login to Gerrit.
Then clicking SSH Public Keys or HTTP Password in the left menu bar depending on which you want to configure.
Setting up SSH Public Keys
SSH Public Key authentication is recommended over HTTP Password authentication as it is a little more secure.
To configure an SSH Public Key you will need to:
- Click Settings on the top right after logging into Gerrit
- Click SSH Public Keys on the left menu
- Copy and Paste your SSH Key into the Add SSH Public Key box
- Click Add
Once your SSH Public Key is added you should be able to checkout using the Gerrit SSH URLs for your project for example:
git clone ssh://lts.eclipse.org:29418/project/repo
Setting up HTTP Password
To configure an HTTP Password you will need to:
- Click Settings on the top right after logging into Gerrit
- Click HTTP Password on the left menu
- Click Generate Password to generate a new password
Once your HTTP Password is generated you should be able to checkout using the Gerrit HTTPS URLs for your project for example:
git clone https://lts.eclipse.org/r/project/repo.git
Checking out code with Gerrit
Gerrit provides 2 URLs for checking out code in the format:
Replace project with the project such as "jdt", "platform", "equinox", etc... Replace repo with the specific repo in the project such as "eclipse.platform.releng.aggregator"
You can get a list of all projects you have access to by navigating to the projects page in Gerrit.
- Click Projects in the top menubar
- Click List in the Projects submenu
The project list shows the full project/repo list so you can simply replace that string into the example URLs above.
TODO: Add screenshot of projects page
HowTos
Using TortoiseGit to "git submodule update"
- Navigate to your git repository which you cloned (eg. eclipse.platform.releng.aggregator)
- Right click > TortoiseGit > Submodule Update
- Select to Initialize Submodules
- Click OK
Setting up a Hudson Maven project to build Eclipse Platform
For the steps below. Navigate to your Job you wish to configure and choose Configure
Set the JDK
It is recommended to set the JDK explicitly for your job instead of using the Default JDK. If you don't know which one to pick we recommend to select Oracle JDK 1.7.
Setting up Git
- Enter URL of git repo (example: /gitroot/lts-central/platform/eclipse.platform.releng.aggregator.git)
- Note: This is the path component of the https:// provider.
- Example: https://lts.eclipse.org/gitroot/lts-central/platform/eclipse.platform.releng.aggregator.git
- Becomes: /gitroot/lts-central/platform/eclipse.platform.releng.aggregator.git
- Note: This is the path component of the https:// provider.
- Set the build branch (eg. R4_2_maintenance)
- Click Advanced... under Branches to Build
- Check Skip internal tag
- Save
Setting up Platform Build
Build step 1, invoke maven for Platform build
- click Add Build Step -> Invoke Maven 3
- click Advanced
- Set goals: clean install
- Set properties: maven.test.skip=true
- Set pom-file: pom.xml
- Set private repository enabled
- Set profiles: no-bree-libs
- Save
Updating LTS Repository
Adding LTS Central remotes
Before you can update your repos with the latest changes from the LTS Central repo, you will need to add the LTS Central repos as a remote for the aggregator as well as all the submodules.
Example Command to add a remote for aggregator:
git remote add central https://<username>@lts.eclipse.org/gitroot/lts-central/platform/eclipse.platform.releng.aggregator.git
Submodules to update:
eclipse.jdt eclipse.jdt.core eclipse.jdt.core.binaries eclipse.jdt.debug eclipse.jdt.ui eclipse.pde eclipse.pde.build eclipse.pde.ui eclipse.platform eclipse.platform.common eclipse.platform.debug eclipse.platform.releng eclipse.platform.resources eclipse.platform.runtime eclipse.platform.swt eclipse.platform.swt.binaries eclipse.platform.team eclipse.platform.text eclipse.platform.ua eclipse.platform.ui rt.equinox.binaries rt.equinox.bundles rt.equinox.framework rt.equinox.p2
Once all the remotes are added you will want to run a "git fetch central" to get the latest updates. You can use the git submodule foreach command to update all the submodules in one command:
git fetch central git submodule foreach git fetch central
Updating a LTS Forge Branch
If you have not already ran a git fetch from the previous step, run it now so that the latest git commits are available to you.
Ensure your git workspace is clean
$ git status # On branch master nothing to commit, working directory clean
If your workspace is not clean you can run the following commands to clean it up:
git checkout -f git clean -fd git submodule foreach git checkout -f git submodule foreach git clean -fd
You will need to checkout the branches in each submodule and aggregator repo for the branch you would like to update. As of this writing there are 3 possible branches for CBI:
- R3_8_maintenance - R4_2_maintenance - master
In the case of R3_8_maintenance and R4_2_maintenance branches some submodules don't have both branches, in which case you will need to use the 3.8 or 4.2 branch that exists.
If you are pulling master (4.3 Kepler) you can use the following commands to checkout master quickly.
git checkout master git submodule foreach git checkout master
NOTE: If you are using R3_8_maintenance or R4_2_maintenance branches do not use the git submodule foreach command. You should cd into each submodule individually and perform the git command for the repo to ensure you are working on the correct branch.
Once the master branches are checked out you can merge the central repo branches into your master:
git merge central/master git submodule foreach git merge central/master
NOTE: If you are using R3_8_maintenance or R4_2_maintenance branches do not use the git submodule foreach command. You should cd into each submodule individually and perform the git command for the repo to ensure you are working on the correct branch.
At this point you should be able to run a build to ensure it works. Once you have verified the build is ok and there are no issues you can push your changes into the LTS Forge:
git push origin master git submodule foreach git push origin master
NOTE: If you are using R3_8_maintenance or R4_2_maintenance branches do not use the git submodule foreach command. You should cd into each submodule individually and perform the git command for the repo to ensure you are working on the correct branch.
Known Issues
Fail to clone submodules using msysgit
Per Bug 376400 we discovered that msysgit has a max character limit somewhere around 256 which causes cloning files with a path longer than that to fail.
See: https://bugs.eclipse.org/bugs/show_bug.cgi?id=376400#c4
Workaround: Put your repo in the root of a drive and give it a short name. For example: C:\z
My Views link is broken
Per Bug 403242 we discovered that trying to set any settings under "User Configuration" will cause the "Default View" setting to be set to blank. Once this occurs clicking "My View" in the left pane will display a stack trace error with no way of resetting it. Until this bug is resolved in Hudson we would recommend not trying to set anything in "User Configuration".
See: https://bugs.eclipse.org/bugs/show_bug.cgi?id=403242
Error assembling JAR: Could not find a common basedir (Resolved)
In git version 1.7.8 and newer, git changed it's behaviour with respect to submodules https://raw.github.com/gitster/git/master/Documentation/RelNotes/1.7.8.txt
The new behaviour causes Tycho Eclipse-SourceReference provider for git to be unable to calculate the basedir correctly. There is a open Tycho bug that includes a patch for getting this resolved https://bugs.eclipse.org/bugs/show_bug.cgi?id=393752
Workaround: Use a git version 1.7.7 or earlier.
Cannot git clone via ssh:// protocol (Resolved)
The issue with this is that most user accounts on the Forge will not have shell access to the forge and the ssh:// protocol requires shell to operate. The solution we decided to go with was we provisioned a https:// protocal instead which we will recommend users to use instead.