[Pharo-users] Pharo + git workflow

Norbert Hartl norbert at hartl.name
Thu Jan 28 12:39:43 EST 2016


Finally I got something working for me. It is not generally applicable but at the moment I'm happy this works at least. I made it even harder because I store the smalltalk code in a sub directory because I want to version web resources along with the code. The smalltalk code is in a sub directory st/

development desktop
- - - - - - - - - - - - - - - -

Normal GitFileTree workflow:

- Take a pharo4 image and load the configuration of GitFileTree from the Configuration Browser.
- Open Versionner then select GitFileTree and click on development and then load version (via context menu). This is IMHO only needed if you want to access bitbucket
- Checkout your repository
- Create GitFileTree repository and select directory of checked out repository
- If a ssh key is configured in bitbucket and for the local ssh-agent commit, pull, push should work via monticello browser

jenkins
- - - - - 

In the jenkins build I like to avoid GitFileTree because I prefer having neither GitFileTree nor OSProcess installed in my deployment artefacts

- Configure jenkins git plugin to check out the code repository
- add a shell command consisting 

pharo-vm-nox project.image config "filetree://$WORKSPACE/st" ConfigurationOfProject --install=bleedingEdge

- this has access to the ConfigurationOfProject but only to this class
- Add 

spec repository: 'filetree://st/'

  to the baseline of the ConfigurationOfProject. This way metacello can load the rest of the packages.

The good news is that I can have a full powered GitFileTree enabled version for developing and a OSProcess-less version for deployment. And I can use Versionner as I rely on the ConfigurationOf. But especially the spec repository setting in the ConfigurationOfProject is a bad hack. Another solution to this would be welcomed. This works only if all packages are in the same git repository.
I need to try access that stuff via bitbucket:// url in the metacello baseline. Thierry just added support to put credentials in the url so it might work with downloading read-only versions of the repository. 

Norbert

> Am 25.01.2016 um 18:09 schrieb Norbert Hartl <norbert at hartl.name>:
> 
> I'm eager to try a new project with some git repositories. But to be honest I don't really get it. Searching the web there is lots to find but nothing actual.
> 
> I don't understand if it is ok to use a ConfigurationOf or if it only works with a BaselineOf. And how do you specify the repository in a ConfigurationOf in order to be able to work locally as well as having jenkins pull everything automatically? Same goes for dependent projects.
> 
> Are there any insights to this or pointers to an up-to-date documentation?
> 
> thanks,
> 
> Norbert





More information about the Pharo-users mailing list