2 questions around gitlab, gitfiletree, BaselineOf

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
13 messages Options
Reply | Threaded
Open this post in threaded view
|

2 questions around gitlab, gitfiletree, BaselineOf

Sabine Manaa
Hi,

we have our own gitlab running now and I succeeded to move our code from sthub to it.
I can push my new code into it from Pharo. All fine.
I also created a Baseline (based on my former configurationOf).
Loading the code from others (e.g. seaside) with this baseline is also fine.

There are 2 Points where I am sure it could be better (it is worse)
1) For loading my own code, I currently have a bad solution
It is in the postLoadBaseline and does this:

        | gitRepository |
        gitRepository := MCFileTreeRepository new
                directory: '/Applications/Pharo5.0-7.app/Contents/Resources/spf-gitlab/repository' asFileReference.
        {'RKA24-Model' . 'RKA24-System' . 'RKA24-Translator' . 'RKA24-View' . 'RKA24-Test' . 'RKA24-Report' . 'RKA24-Overwrites'}
                do: [ :each |
                        Gofer it
                                repository: gitRepository;
                                package: each;
                                load ].
               
I would like to load it within my baseline like this below but I dont know what to write in the fileTreeRepository method...
                       
baseline: spec
        <baseline>
        spec
                for: #common
                do: [ spec blessing: #baseline.
                        spec repository: ##self fileTreeRepository##.
                        "here I load all the the oher stuff"
                        spec
                                package: 'RKA24-Model';
                                package: 'RKA24-System';
                                package: 'RKA24-Translator';
                                package: 'RKA24-View';
                                package: 'RKA24-Test';
                                package: 'RKA24-Report';
                                package: 'RKA24-Overwrites' ]

2) Also, when I take a new Image, I have to do several steps

load gitfiletree from catalog
add/open my gitfiletree repository from Monticello
load BaselineOfRKA24 manually with
(BaselineOfRKA24   project map at: 'baseline') load

I think this is not the best way, I would like to make it right.

Can anyone give me some hints how to improve this two steps?
I use Pharo 5 and I don't want to go to Pharo 6 right now.
I develop on mac and production server is on windows.

Regards
Sabine
 
Reply | Threaded
Open this post in threaded view
|

Re: 2 questions around gitlab, gitfiletree, BaselineOf

Thierry Goubier
Hi Sabine,

I have makefiles to do the sort of thing you describe automatically (build an image from local, git managed repositories) and a baseline: I write stuff like

./pharo-cli pharo/Pharo.image --no-default-preferences eval --save Metacello new baseline: \'MyProject\'\; repository:\'gitfiletree://`pwd`/../src/\'\; load

(works once gitfiletree has been loaded)

notice the `pwd` embedded in there which allows you to put your local git clone anywhere you like.

One thing I can't do, however, is having a dependency in BaselineOfMyProject to a locally hosted project (say BaselineOfANiceLib stored in ~/Project2017/ClientX/) because when I write the baseline, I can't be sure where it will be on-disk.

If you're ok with gitfiletree doing the clone from gitlab on its own, one could still write a direct access to your internal gitlab server, in the baseline of MyProject, like that:


The oldest such scripts I have are for Pharo3.

Does that answer your questions ?

Thierry

2017-07-07 15:48 GMT+02:00 Sabine Manaa <[hidden email]>:
Hi,

we have our own gitlab running now and I succeeded to move our code from
sthub to it.
I can push my new code into it from Pharo. All fine.
I also created a Baseline (based on my former configurationOf).
Loading the code from others (e.g. seaside) with this baseline is also fine.

There are 2 Points where I am sure it could be better (it is worse)
1) For loading my own code, I currently have a bad solution
It is in the postLoadBaseline and does this:

        | gitRepository |
        gitRepository := MCFileTreeRepository new
                directory:
'/Applications/Pharo5.0-7.app/Contents/Resources/spf-gitlab/repository'
asFileReference.
        {'RKA24-Model' . 'RKA24-System' . 'RKA24-Translator' . 'RKA24-View' .
'RKA24-Test' . 'RKA24-Report' . 'RKA24-Overwrites'}
                do: [ :each |
                        Gofer it
                                repository: gitRepository;
                                package: each;
                                load ].

I would like to load it within my baseline like this below but I dont know
what to write in the fileTreeRepository method...

baseline: spec
        <baseline>
        spec
                for: #common
                do: [ spec blessing: #baseline.
                        spec repository: ##self fileTreeRepository##.
                        "here I load all the the oher stuff"
                        spec
                                package: 'RKA24-Model';
                                package: 'RKA24-System';
                                package: 'RKA24-Translator';
                                package: 'RKA24-View';
                                package: 'RKA24-Test';
                                package: 'RKA24-Report';
                                package: 'RKA24-Overwrites' ]

2) Also, when I take a new Image, I have to do several steps

load gitfiletree from catalog
add/open my gitfiletree repository from Monticello
load BaselineOfRKA24 manually with
(BaselineOfRKA24   project map at: 'baseline') load

I think this is not the best way, I would like to make it right.

Can anyone give me some hints how to improve this two steps?
I use Pharo 5 and I don't want to go to Pharo 6 right now.
I develop on mac and production server is on windows.

Regards
Sabine





--
View this message in context: http://forum.world.st/2-questions-around-gitlab-gitfiletree-BaselineOf-tp4953877.html
Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.


Reply | Threaded
Open this post in threaded view
|

Re: 2 questions around gitlab, gitfiletree, BaselineOf

gcotelli
In reply to this post by Sabine Manaa
Hi Sabine,
for your own baseline you don't need to specify a repository. Just load it with something like:

Metacello new
baseline: 'RLA24';
repository: 'filetree://disklocation/repository';
load: 'Group To Load'

Also you can have local copies of your dependencies in case you don't want to use an internet connection for dowloading, just use the lock command of Metacello to "overwrite" the repository definitions. For example take a look at:

https://gist.github.com/gcotelli/d4521656358786ae2aca12a70478980f

Regards,
Gabriel


On Fri, Jul 7, 2017 at 10:48 AM, Sabine Manaa <[hidden email]> wrote:
Hi,

we have our own gitlab running now and I succeeded to move our code from
sthub to it.
I can push my new code into it from Pharo. All fine.
I also created a Baseline (based on my former configurationOf).
Loading the code from others (e.g. seaside) with this baseline is also fine.

There are 2 Points where I am sure it could be better (it is worse)
1) For loading my own code, I currently have a bad solution
It is in the postLoadBaseline and does this:

        | gitRepository |
        gitRepository := MCFileTreeRepository new
                directory:
'/Applications/Pharo5.0-7.app/Contents/Resources/spf-gitlab/repository'
asFileReference.
        {'RKA24-Model' . 'RKA24-System' . 'RKA24-Translator' . 'RKA24-View' .
'RKA24-Test' . 'RKA24-Report' . 'RKA24-Overwrites'}
                do: [ :each |
                        Gofer it
                                repository: gitRepository;
                                package: each;
                                load ].

I would like to load it within my baseline like this below but I dont know
what to write in the fileTreeRepository method...

baseline: spec
        <baseline>
        spec
                for: #common
                do: [ spec blessing: #baseline.
                        spec repository: ##self fileTreeRepository##.
                        "here I load all the the oher stuff"
                        spec
                                package: 'RKA24-Model';
                                package: 'RKA24-System';
                                package: 'RKA24-Translator';
                                package: 'RKA24-View';
                                package: 'RKA24-Test';
                                package: 'RKA24-Report';
                                package: 'RKA24-Overwrites' ]

2) Also, when I take a new Image, I have to do several steps

load gitfiletree from catalog
add/open my gitfiletree repository from Monticello
load BaselineOfRKA24 manually with
(BaselineOfRKA24   project map at: 'baseline') load

I think this is not the best way, I would like to make it right.

Can anyone give me some hints how to improve this two steps?
I use Pharo 5 and I don't want to go to Pharo 6 right now.
I develop on mac and production server is on windows.

Regards
Sabine





--
View this message in context: http://forum.world.st/2-questions-around-gitlab-gitfiletree-BaselineOf-tp4953877.html
Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.


Reply | Threaded
Open this post in threaded view
|

Re: 2 questions around gitlab, gitfiletree, BaselineOf

Peter Uhnak
In reply to this post by Sabine Manaa
Hi,

I had similar issues when using gitfiletree... and in the end I've ended up with this https://github.com/peteruhnak/pharo-scripts/blob/master/config/5.0/openponk-autoload.st

it is not the prettiest thing, however it is automated so I didn't bother improving it.


* automatically loads GitFileTree (I also load my own shell, because OSProcess was failing on me hard)
* "pre-loads" some dependencies so they point to my local git repositories instead of being pulled from github
        * if BaselineOf is available in the image, then MC loader will use that (instead of grabbing code from bitbucket/gitlab/github)
        * #onWarningLog is there to suppress warning about loading from different source (local instead of github), but avialble in transcript iirc
* startup script, so I could name the image certain way and it will prepare it for me
        * (obviously one can use it separately)
* used on windows and linux (that's why the platform checking)

Peter


On Fri, Jul 07, 2017 at 06:48:50AM -0700, Sabine Manaa wrote:

> Hi,
>
> we have our own gitlab running now and I succeeded to move our code from
> sthub to it.
> I can push my new code into it from Pharo. All fine.
> I also created a Baseline (based on my former configurationOf).
> Loading the code from others (e.g. seaside) with this baseline is also fine.
>
> There are 2 Points where I am sure it could be better (it is worse)
> 1) For loading my own code, I currently have a bad solution
> It is in the postLoadBaseline and does this:
>
> | gitRepository |
> gitRepository := MCFileTreeRepository new
> directory:
> '/Applications/Pharo5.0-7.app/Contents/Resources/spf-gitlab/repository'
> asFileReference.
> {'RKA24-Model' . 'RKA24-System' . 'RKA24-Translator' . 'RKA24-View' .
> 'RKA24-Test' . 'RKA24-Report' . 'RKA24-Overwrites'}
> do: [ :each |
> Gofer it
> repository: gitRepository;
> package: each;
> load ].
>
> I would like to load it within my baseline like this below but I dont know
> what to write in the fileTreeRepository method...
>
> baseline: spec
> <baseline>
> spec
> for: #common
> do: [ spec blessing: #baseline.
> spec repository: ##self fileTreeRepository##.
> "here I load all the the oher stuff"
> spec
> package: 'RKA24-Model';
> package: 'RKA24-System';
> package: 'RKA24-Translator';
> package: 'RKA24-View';
> package: 'RKA24-Test';
> package: 'RKA24-Report';
> package: 'RKA24-Overwrites' ]
>
> 2) Also, when I take a new Image, I have to do several steps
>
> load gitfiletree from catalog
> add/open my gitfiletree repository from Monticello
> load BaselineOfRKA24 manually with
> (BaselineOfRKA24   project map at: 'baseline') load
>
> I think this is not the best way, I would like to make it right.
>
> Can anyone give me some hints how to improve this two steps?
> I use Pharo 5 and I don't want to go to Pharo 6 right now.
> I develop on mac and production server is on windows.
>
> Regards
> Sabine
>  
>
>
>
>
> --
> View this message in context: http://forum.world.st/2-questions-around-gitlab-gitfiletree-BaselineOf-tp4953877.html
> Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.
>

Reply | Threaded
Open this post in threaded view
|

Re: 2 questions around gitlab, gitfiletree, BaselineOf

Sabine Manaa
In reply to this post by gcotelli
Hi Thierry, Gabriel and Peter,

thank you very much. First I had a look at this because it would be nice to load directly from Gitlab (with then generating a local repository automatically):

spec repository: 'gitfiletree://gitlab.intra.example.com/ANiceLib:master/placeWhereAreThePackages';

I did not manage to use it because I would need to give a port as parameter (we do  not use port 22). I chatted in discord with Peter Uhnak. 

It seemed that this is not yet possible because of my case that i do not use port 22 and I use a config file.

On the command line, this command succeeds with cloning my repository from gitlab:

git clone git@SPF_GITLAB:SPF/Spesenfuchs.git


There is a config file which defines my host:

host SPF_GITLAB
HostName 192.168.1.61
Port 30001

I try to write my baseline with this 

spec repository: 'gitfiletree://SPF_GITLAB:SPF/Spesenfuchs.git'.


This did not work in the beginning.

I played around and found out that there are 2 points where I had to change the system to make this work:

1) ZnUrl>>parseHostPort:
stream atEnd
ifFalse: ["portNumber := Integer readFrom: stream ifFail: [ ZnPortNotANumber signal ].
(portNumber between: 1 and: 65535) ifFalse: [ DomainError signalFrom: 1 to: 65535 ]."
self port: 30001 "portNumber" ] ]
->> here, it is assumed that there is always a port integer after the :
If i set it hard to my port I skip this problem

2) MCFileTreeGitRepository>>basicFromUrl: aZnUrl
here I changed the code also hard from

repo remoteUrl: 'git@' , aZnUrl host , ':' , path
to
repo remoteUrl: 'git@SPF_GITLAB:SPF/Spesenfuchs.git' 

->> here, aUZnUrl host is in lowercase but my name is in uppercase
:SPF is missing

the existing code would make this:
git@spf_gitlab:Spesenfuchs.git
instead of 
git@SPF_GITLAB:SPF/Spesenfuchs.git

With this 2 changes, my code could load.

So my question: Are this 2 points issues to fix or should I create my own workaround (create my own loader, not making THIS changes )?

Regards
Sabine





2017-07-07 16:06 GMT+02:00 gcotelli [via Smalltalk] <[hidden email]>:
Hi Sabine,
for your own baseline you don't need to specify a repository. Just load it with something like:

Metacello new
baseline: 'RLA24';
repository: 'filetree://disklocation/repository';
load: 'Group To Load'

Also you can have local copies of your dependencies in case you don't want to use an internet connection for dowloading, just use the lock command of Metacello to "overwrite" the repository definitions. For example take a look at:

https://gist.github.com/gcotelli/d4521656358786ae2aca12a70478980f

Regards,
Gabriel


On Fri, Jul 7, 2017 at 10:48 AM, Sabine Manaa <[hidden email]> wrote:
Hi,

we have our own gitlab running now and I succeeded to move our code from
sthub to it.
I can push my new code into it from Pharo. All fine.
I also created a Baseline (based on my former configurationOf).
Loading the code from others (e.g. seaside) with this baseline is also fine.

There are 2 Points where I am sure it could be better (it is worse)
1) For loading my own code, I currently have a bad solution
It is in the postLoadBaseline and does this:

        | gitRepository |
        gitRepository := MCFileTreeRepository new
                directory:
'/Applications/Pharo5.0-7.app/Contents/Resources/spf-gitlab/repository'
asFileReference.
        {'RKA24-Model' . 'RKA24-System' . 'RKA24-Translator' . 'RKA24-View' .
'RKA24-Test' . 'RKA24-Report' . 'RKA24-Overwrites'}
                do: [ :each |
                        Gofer it
                                repository: gitRepository;
                                package: each;
                                load ].

I would like to load it within my baseline like this below but I dont know
what to write in the fileTreeRepository method...

baseline: spec
        <baseline>
        spec
                for: #common
                do: [ spec blessing: #baseline.
                        spec repository: ##self fileTreeRepository##.
                        "here I load all the the oher stuff"
                        spec
                                package: 'RKA24-Model';
                                package: 'RKA24-System';
                                package: 'RKA24-Translator';
                                package: 'RKA24-View';
                                package: 'RKA24-Test';
                                package: 'RKA24-Report';
                                package: 'RKA24-Overwrites' ]

2) Also, when I take a new Image, I have to do several steps

load gitfiletree from catalog
add/open my gitfiletree repository from Monticello
load BaselineOfRKA24 manually with
(BaselineOfRKA24   project map at: 'baseline') load

I think this is not the best way, I would like to make it right.

Can anyone give me some hints how to improve this two steps?
I use Pharo 5 and I don't want to go to Pharo 6 right now.
I develop on mac and production server is on windows.

Regards
Sabine





--
View this message in context: http://forum.world.st/2-questions-around-gitlab-gitfiletree-BaselineOf-tp4953877.html
Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.





If you reply to this email, your message will be added to the discussion below:
http://forum.world.st/2-questions-around-gitlab-gitfiletree-BaselineOf-tp4953877p4953880.html
To start a new topic under Pharo Smalltalk Users, email [hidden email]
To unsubscribe from Pharo Smalltalk Users, click here.
NAML

Reply | Threaded
Open this post in threaded view
|

Re: 2 questions around gitlab, gitfiletree, BaselineOf

Thierry Goubier
Hi Sabine,

as far as I remember when I implemented it, the use of a config file
shouldn't be an issue, because GitFileTree rewrites exactly the
git@SPF_GITLAB the way you would expect, as long as it manages to
identify correctly the parts in the URL (and to identify those parts, it
relies on Zinc).

Now, have you tried with:

gitfiletree://SPF_GITLAB/SPF/Spesenfuchs

?

Zinc correctly identifies SPF_GITLAB as the host, but it writes it
non-capitalized (spf_gitlab), which may makes it miss your .ssh/config
entry.

In that case, could you add the spf_gitlab entry as well in your config
file ?

Thierry

Le 07/07/2017 à 21:32, Sabine Manaa a écrit :

> Hi Thierry, Gabriel and Peter,
>
> thank you very much. First I had a look at this because it would be nice
> to load directly from Gitlab (with then generating a local repository
> automatically):
>
> spec repository:
> 'gitfiletree://gitlab.intra.example.com/ANiceLib:master/
> <http://example.com/ANiceLib:master/>placeWhereAreThePackages';
>
> I did not manage to use it because I would need to give a port as
> parameter (we do  not use port 22). I chatted in discord with Peter Uhnak.
>
> It seemed that this is not yet possible because of my case that i do not
> use port 22 and I use a config file.
>
> On the command line, this command succeeds with cloning my repository
> from gitlab:
>
> git clone git@SPF_GITLAB:SPF/Spesenfuchs.git
>
>
> There is a config file which defines my host:
>
> host SPF_GITLAB
> HostName 192.168.1.61
> Port 30001
>
> I try to write my baseline with this
>
> spec repository: 'gitfiletree://SPF_GITLAB:SPF/Spesenfuchs.git'.
>
>
> This did not work in the beginning.
>
> I played around and found out that there are 2 points where I had to
> change the system to make this work:
>
> 1) ZnUrl>>parseHostPort:
> stream atEnd
> ifFalse: ["portNumber := Integer readFrom: stream ifFail: [
> ZnPortNotANumber signal ].
> (portNumber between: 1 and: 65535) ifFalse: [ DomainError signalFrom: 1
> to: 65535 ]."
> self port: 30001 "portNumber" ] ]
> ->> here, it is assumed that there is always a port integer after the :
> If i set it hard to my port I skip this problem
>
> 2) MCFileTreeGitRepository>>basicFromUrl: aZnUrl
> here I changed the code also hard from
>
> repo remoteUrl: 'git@' , aZnUrl host , ':' , path
> to
> repo remoteUrl: 'git@SPF_GITLAB:SPF/Spesenfuchs.git'
>
> ->> here, aUZnUrl host is in lowercase but my name is in uppercase
> :SPF is missing
>
> the existing code would make this:
> git@spf_gitlab:Spesenfuchs.git
> instead of
> git@SPF_GITLAB:SPF/Spesenfuchs.git
>
> With this 2 changes, my code could load.
>
> So my question: Are this 2 points issues to fix or should I create my
> own workaround (create my own loader, not making THIS changes )?
>
> Regards
> Sabine
>
>
>
>
>
> 2017-07-07 16:06 GMT+02:00 gcotelli [via Smalltalk] <[hidden email]
> </user/SendEmail.jtp?type=node&node=4953938&i=0>>:
>
>     Hi Sabine,
>     for your own baseline you don't need to specify a repository. Just
>     load it with something like:
>
>     Metacello new
>     baseline: 'RLA24';
>     repository: 'filetree://disklocation/repository';
>     load: 'Group To Load'
>
>     Also you can have local copies of your dependencies in case you
>     don't want to use an internet connection for dowloading, just use
>     the lock command of Metacello to "overwrite" the repository
>     definitions. For example take a look at:
>
>     https://gist.github.com/gcotelli/d4521656358786ae2aca12a70478980f
>     <https://gist.github.com/gcotelli/d4521656358786ae2aca12a70478980f>
>
>     Regards,
>     Gabriel
>
>
>     On Fri, Jul 7, 2017 at 10:48 AM, Sabine Manaa <[hidden email]
>     <http:///user/SendEmail.jtp?type=node&node=4953880&i=0>> wrote:
>
>         Hi,
>
>         we have our own gitlab running now and I succeeded to move our
>         code from
>         sthub to it.
>         I can push my new code into it from Pharo. All fine.
>         I also created a Baseline (based on my former configurationOf).
>         Loading the code from others (e.g. seaside) with this baseline
>         is also fine.
>
>         There are 2 Points where I am sure it could be better (it is worse)
>         1) For loading my own code, I currently have a bad solution
>         It is in the postLoadBaseline and does this:
>
>                  | gitRepository |
>                  gitRepository := MCFileTreeRepository new
>                          directory:
>         '/Applications/Pharo5.0-7.app/Contents/Resources/spf-gitlab/repository'
>         asFileReference.
>                  {'RKA24-Model' . 'RKA24-System' . 'RKA24-Translator' .
>         'RKA24-View' .
>         'RKA24-Test' . 'RKA24-Report' . 'RKA24-Overwrites'}
>                          do: [ :each |
>                                  Gofer it
>                                          repository: gitRepository;
>                                          package: each;
>                                          load ].
>
>         I would like to load it within my baseline like this below but I
>         dont know
>         what to write in the fileTreeRepository method...
>
>         baseline: spec
>                  <baseline>
>                  spec
>                          for: #common
>                          do: [ spec blessing: #baseline.
>                                  spec repository: ##self
>         fileTreeRepository##.
>                                  "here I load all the the oher stuff"
>                                  spec
>                                          package: 'RKA24-Model';
>                                          package: 'RKA24-System';
>                                          package: 'RKA24-Translator';
>                                          package: 'RKA24-View';
>                                          package: 'RKA24-Test';
>                                          package: 'RKA24-Report';
>                                          package: 'RKA24-Overwrites' ]
>
>         2) Also, when I take a new Image, I have to do several steps
>
>         load gitfiletree from catalog
>         add/open my gitfiletree repository from Monticello
>         load BaselineOfRKA24 manually with
>         (BaselineOfRKA24   project map at: 'baseline') load
>
>         I think this is not the best way, I would like to make it right.
>
>         Can anyone give me some hints how to improve this two steps?
>         I use Pharo 5 and I don't want to go to Pharo 6 right now.
>         I develop on mac and production server is on windows.
>
>         Regards
>         Sabine
>
>
>
>
>
>         --
>         View this message in context:
>         http://forum.world.st/2-questions-around-gitlab-gitfiletree-BaselineOf-tp4953877.html
>         <http://forum.world.st/2-questions-around-gitlab-gitfiletree-BaselineOf-tp4953877.html>
>         Sent from the Pharo Smalltalk Users mailing list archive at
>         Nabble.com.
>
>
>
>
>     ------------------------------------------------------------------------
>     If you reply to this email, your message will be added to the
>     discussion below:
>     http://forum.world.st/2-questions-around-gitlab-gitfiletree-BaselineOf-tp4953877p4953880.html
>     <http://forum.world.st/2-questions-around-gitlab-gitfiletree-BaselineOf-tp4953877p4953880.html>
>
>     To start a new topic under Pharo Smalltalk Users, email [hidden
>     email] </user/SendEmail.jtp?type=node&node=4953938&i=1>
>     To unsubscribe from Pharo Smalltalk Users, click here.
>     NAML
>     <http://forum.world.st/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
>
>
>
>
> ------------------------------------------------------------------------
> View this message in context: Re: 2 questions around gitlab,
> gitfiletree, BaselineOf
> <http://forum.world.st/2-questions-around-gitlab-gitfiletree-BaselineOf-tp4953877p4953938.html>
> Sent from the Pharo Smalltalk Users mailing list archive
> <http://forum.world.st/Pharo-Smalltalk-Users-f1310670.html> at Nabble.com.


Reply | Threaded
Open this post in threaded view
|

Re: 2 questions around gitlab, gitfiletree, BaselineOf

Sabine Manaa
Hi Thierry,

changing my hostname into lowercase letters and changing from :spf to /spf fixed all my issues. The config file is read and so, the right port is found :-)

This is so great, thank you all very much.

I can proceed then wit the startup files.

Regards
Sabine


2017-07-08 0:09 GMT+02:00 Thierry Goubier [via Smalltalk] <[hidden email]>:
Hi Sabine,

as far as I remember when I implemented it, the use of a config file
shouldn't be an issue, because GitFileTree rewrites exactly the
git@SPF_GITLAB the way you would expect, as long as it manages to
identify correctly the parts in the URL (and to identify those parts, it
relies on Zinc).

Now, have you tried with:

gitfiletree://SPF_GITLAB/SPF/Spesenfuchs

?

Zinc correctly identifies SPF_GITLAB as the host, but it writes it
non-capitalized (spf_gitlab), which may makes it miss your .ssh/config
entry.

In that case, could you add the spf_gitlab entry as well in your config
file ?

Thierry

Le 07/07/2017 à 21:32, Sabine Manaa a écrit :

> Hi Thierry, Gabriel and Peter,
>
> thank you very much. First I had a look at this because it would be nice
> to load directly from Gitlab (with then generating a local repository
> automatically):
>
> spec repository:
> 'gitfiletree://gitlab.intra.example.com/ANiceLib:master/
> <http://example.com/ANiceLib:master/>placeWhereAreThePackages';
>
> I did not manage to use it because I would need to give a port as

> parameter (we do  not use port 22). I chatted in discord with Peter Uhnak.
>
> It seemed that this is not yet possible because of my case that i do not
> use port 22 and I use a config file.
>
> On the command line, this command succeeds with cloning my repository
> from gitlab:
>
> git clone git@SPF_GITLAB:SPF/Spesenfuchs.git
>
>
> There is a config file which defines my host:
>
> host SPF_GITLAB
> HostName 192.168.1.61
> Port 30001
>
> I try to write my baseline with this
>
> spec repository: 'gitfiletree://SPF_GITLAB:SPF/Spesenfuchs.git'.
>
>
> This did not work in the beginning.
>
> I played around and found out that there are 2 points where I had to
> change the system to make this work:
>
> 1) ZnUrl>>parseHostPort:
> stream atEnd
> ifFalse: ["portNumber := Integer readFrom: stream ifFail: [
> ZnPortNotANumber signal ].
> (portNumber between: 1 and: 65535) ifFalse: [ DomainError signalFrom: 1
> to: 65535 ]."
> self port: 30001 "portNumber" ] ]
> ->> here, it is assumed that there is always a port integer after the :
> If i set it hard to my port I skip this problem
>
> 2) MCFileTreeGitRepository>>basicFromUrl: aZnUrl
> here I changed the code also hard from
>
> repo remoteUrl: 'git@' , aZnUrl host , ':' , path
> to
> repo remoteUrl: 'git@SPF_GITLAB:SPF/Spesenfuchs.git'
>
> ->> here, aUZnUrl host is in lowercase but my name is in uppercase
> :SPF is missing
>
> the existing code would make this:
> git@spf_gitlab:Spesenfuchs.git
> instead of
> git@SPF_GITLAB:SPF/Spesenfuchs.git
>
> With this 2 changes, my code could load.
>
> So my question: Are this 2 points issues to fix or should I create my
> own workaround (create my own loader, not making THIS changes )?
>
> Regards
> Sabine
>
>
>
>
>
> 2017-07-07 16:06 GMT+02:00 gcotelli [via Smalltalk] <[hidden email]
> </user/SendEmail.jtp?type=node&node=4953938&i=0>>:
>

>     Hi Sabine,
>     for your own baseline you don't need to specify a repository. Just
>     load it with something like:
>
>     Metacello new
>     baseline: 'RLA24';
>     repository: 'filetree://disklocation/repository';
>     load: 'Group To Load'
>
>     Also you can have local copies of your dependencies in case you
>     don't want to use an internet connection for dowloading, just use
>     the lock command of Metacello to "overwrite" the repository
>     definitions. For example take a look at:
>
>     https://gist.github.com/gcotelli/d4521656358786ae2aca12a70478980f
>     <https://gist.github.com/gcotelli/d4521656358786ae2aca12a70478980f>
>
>     Regards,
>     Gabriel
>
>
>     On Fri, Jul 7, 2017 at 10:48 AM, Sabine Manaa <[hidden email]
>     <http:///user/SendEmail.jtp?type=node&node=4953880&i=0>> wrote:

>
>         Hi,
>
>         we have our own gitlab running now and I succeeded to move our
>         code from
>         sthub to it.
>         I can push my new code into it from Pharo. All fine.
>         I also created a Baseline (based on my former configurationOf).
>         Loading the code from others (e.g. seaside) with this baseline
>         is also fine.
>
>         There are 2 Points where I am sure it could be better (it is worse)
>         1) For loading my own code, I currently have a bad solution
>         It is in the postLoadBaseline and does this:
>
>                  | gitRepository |
>                  gitRepository := MCFileTreeRepository new
>                          directory:
>         '/Applications/Pharo5.0-7.app/Contents/Resources/spf-gitlab/repository'
>         asFileReference.
>                  {'RKA24-Model' . 'RKA24-System' . 'RKA24-Translator' .
>         'RKA24-View' .
>         'RKA24-Test' . 'RKA24-Report' . 'RKA24-Overwrites'}
>                          do: [ :each |
>                                  Gofer it
>                                          repository: gitRepository;
>                                          package: each;
>                                          load ].
>
>         I would like to load it within my baseline like this below but I
>         dont know
>         what to write in the fileTreeRepository method...
>
>         baseline: spec
>                  <baseline>
>                  spec
>                          for: #common
>                          do: [ spec blessing: #baseline.
>                                  spec repository: ##self
>         fileTreeRepository##.
>                                  "here I load all the the oher stuff"
>                                  spec
>                                          package: 'RKA24-Model';
>                                          package: 'RKA24-System';
>                                          package: 'RKA24-Translator';
>                                          package: 'RKA24-View';
>                                          package: 'RKA24-Test';
>                                          package: 'RKA24-Report';
>                                          package: 'RKA24-Overwrites' ]
>
>         2) Also, when I take a new Image, I have to do several steps
>
>         load gitfiletree from catalog
>         add/open my gitfiletree repository from Monticello
>         load BaselineOfRKA24 manually with
>         (BaselineOfRKA24   project map at: 'baseline') load
>
>         I think this is not the best way, I would like to make it right.
>
>         Can anyone give me some hints how to improve this two steps?
>         I use Pharo 5 and I don't want to go to Pharo 6 right now.
>         I develop on mac and production server is on windows.
>
>         Regards
>         Sabine
>
>
>
>
>
>         --
>         View this message in context:
>         http://forum.world.st/2-questions-around-gitlab-gitfiletree-BaselineOf-tp4953877.html
>         <http://forum.world.st/2-questions-around-gitlab-gitfiletree-BaselineOf-tp4953877.html>
>         Sent from the Pharo Smalltalk Users mailing list archive at
>         Nabble.com.
>
>
>
>
>     ------------------------------------------------------------------------
>     If you reply to this email, your message will be added to the
>     discussion below:
>     http://forum.world.st/2-questions-around-gitlab-gitfiletree-BaselineOf-tp4953877p4953880.html
>     <http://forum.world.st/2-questions-around-gitlab-gitfiletree-BaselineOf-tp4953877p4953880.html>
>
>     To start a new topic under Pharo Smalltalk Users, email [hidden
>     email] </user/SendEmail.jtp?type=node&node=4953938&i=1>
>     To unsubscribe from Pharo Smalltalk Users, click here.
>     NAML
>     <http://forum.world.st/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
>
>
>
>
> ------------------------------------------------------------------------
> View this message in context: Re: 2 questions around gitlab,
> gitfiletree, BaselineOf
> <http://forum.world.st/2-questions-around-gitlab-gitfiletree-BaselineOf-tp4953877p4953938.html>
> Sent from the Pharo Smalltalk Users mailing list archive
> <http://forum.world.st/Pharo-Smalltalk-Users-f1310670.html> at Nabble.com.





If you reply to this email, your message will be added to the discussion below:
http://forum.world.st/2-questions-around-gitlab-gitfiletree-BaselineOf-tp4953877p4953950.html
To start a new topic under Pharo Smalltalk Users, email [hidden email]
To unsubscribe from Pharo Smalltalk Users, click here.
NAML

Reply | Threaded
Open this post in threaded view
|

Re: 2 questions around gitlab, gitfiletree, BaselineOf

Pierce Ng-3
In reply to this post by Sabine Manaa
On Fri, Jul 07, 2017 at 06:48:50AM -0700, Sabine Manaa wrote:

> 1) For loading my own code, I currently have a bad solution
> I would like to load it within my baseline like this below but I dont know
> what to write in the fileTreeRepository method...
>
> baseline: spec
> <baseline>
> spec
> for: #common
> do: [ spec blessing: #baseline.
> spec repository: ##self fileTreeRepository##.
                                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^
Here I use 'http://127.0.0.1:20080/', where the http server serves my filetree
repo directory. The easiest way (for me on Linux/Mac) to get the http server
running is 'python3 -m http.server 20080'.

This method works for a directory full of .mcz files too.

Pierce

Reply | Threaded
Open this post in threaded view
|

Re: 2 questions around gitlab, gitfiletree, BaselineOf

Sabine Manaa
After several questions and trials I ended with a script like this:

cd /Applications/Pharo5.0-7.app/Contents/Resources
rm Pharo.image
rm Pharo.changes
curl get.pharo.org/50 | bash
rm -rf spfClonedGitlabRepository
git clone http://192.168.1.61:30000/SPF/Spesenfuchs.git --branch 1.0 spfClonedGitlabRepository
Pharo Pharo.image --no-default-preferences eval --save "(CatalogProvider projectNamed: 'GitFileTree') installVersion: #stable. Metacello new baseline: 'RKA24'; repository: 'filetree://spfClonedGitlabRepository';load."

It creates a local clone (of a certain version) of my gitlab repository (deleting old stuff before) and starts with a new image, loading the given branch.

With this, I can always start with a new image, loading exactly the version I want from gitlab.

For pushing into gitlab I use the MCFileTreeGitRepository browser and push.

Big thank you for all who helped me, here and in discord.

2017-07-08 18:31 GMT+02:00 Pierce Ng-3 [via Smalltalk] <[hidden email]>:
On Fri, Jul 07, 2017 at 06:48:50AM -0700, Sabine Manaa wrote:

> 1) For loading my own code, I currently have a bad solution
> I would like to load it within my baseline like this below but I dont know
> what to write in the fileTreeRepository method...
>
> baseline: spec
> <baseline>
> spec
> for: #common
> do: [ spec blessing: #baseline.
> spec repository: ##self fileTreeRepository##.
                                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^
Here I use 'http://127.0.0.1:20080/', where the http server serves my filetree
repo directory. The easiest way (for me on Linux/Mac) to get the http server
running is 'python3 -m http.server 20080'.

This method works for a directory full of .mcz files too.

Pierce




If you reply to this email, your message will be added to the discussion below:
http://forum.world.st/2-questions-around-gitlab-gitfiletree-BaselineOf-tp4953877p4954007.html
To start a new topic under Pharo Smalltalk Users, email [hidden email]
To unsubscribe from Pharo Smalltalk Users, click here.
NAML

Reply | Threaded
Open this post in threaded view
|

Re: 2 questions around gitlab, gitfiletree, BaselineOf

Thierry Goubier
Hi Sabine,

I have a slightly different script, a Makefile, which uses another
trick: put everything into a pharo/ subdirectory. Like that, just rm -rf
pharo/ erases everything before rebuilding.

I think I would implement the support you need for you to simply be able
to write:

Metacello new baseline: \'RKA24\'\; repository:
\'gitfiletree://192.168.1.61:30000/SPF/Spesenfuchs.gitspf:1.0?protocol=http\'\;load

so that the clone + Metacello over filetree isn't necessary.

(at the moment, I'm just pretty sure GitFileTree doesn't handle http and
the port number, but that wouldn't be hard to add)

Regards,

Thierry


Le 11/07/2017 à 12:43, Sabine Manaa a écrit :

> After several questions and trials I ended with a script like this:
>
> cd /Applications/Pharo5.0-7.app/Contents/Resources
> rm Pharo.image
> rm Pharo.changes
> curl get.pharo.org/50 <http://get.pharo.org/50> | bash
> rm -rf spfClonedGitlabRepository
> git clone http://192.168.1.61:30000/SPF/Spesenfuchs.git 
> <http://192.168.1.61:30000/SPF/Spesenfuchs.git> --branch 1.0
> spfClonedGitlabRepository
> Pharo Pharo.image --no-default-preferences eval --save "(CatalogProvider
> projectNamed: 'GitFileTree') installVersion: #stable. Metacello new
> baseline: 'RKA24'; repository: 'filetree://spfClonedGitlabRepository';load."
>
> It creates a local clone (of a certain version) of my gitlab repository
> (deleting old stuff before) and starts with a new image, loading the
> given branch.
>
> With this, I can always start with a new image, loading exactly the
> version I want from gitlab.
>
> For pushing into gitlab I use the MCFileTreeGitRepository browser and push.
>
> Big thank you for all who helped me, here and in discord.
>
> 2017-07-08 18:31 GMT+02:00 Pierce Ng-3 [via Smalltalk] <[hidden email]
> </user/SendEmail.jtp?type=node&node=4954305&i=0>>:
>
>     On Fri, Jul 07, 2017 at 06:48:50AM -0700, Sabine Manaa wrote:
>
>     > 1) For loading my own code, I currently have a bad solution
>     > I would like to load it within my baseline like this below but I dont know
>     > what to write in the fileTreeRepository method...
>     >
>     > baseline: spec
>     > <baseline>
>     > spec
>     > for: #common
>     > do: [ spec blessing: #baseline.
>     > spec repository: ##self fileTreeRepository##.
>                                               ^^^^^^^^^^^^^^^^^^^^^^^^^^^
>     Here I use 'http://127.0.0.1:20080/', where the http server serves
>     my filetree
>     repo directory. The easiest way (for me on Linux/Mac) to get the
>     http server
>     running is 'python3 -m http.server 20080'.
>
>     This method works for a directory full of .mcz files too.
>
>     Pierce
>
>
>
>     ------------------------------------------------------------------------
>     If you reply to this email, your message will be added to the
>     discussion below:
>     http://forum.world.st/2-questions-around-gitlab-gitfiletree-BaselineOf-tp4953877p4954007.html
>     <http://forum.world.st/2-questions-around-gitlab-gitfiletree-BaselineOf-tp4953877p4954007.html>
>
>     To start a new topic under Pharo Smalltalk Users, email [hidden
>     email] </user/SendEmail.jtp?type=node&node=4954305&i=1>
>     To unsubscribe from Pharo Smalltalk Users, click here.
>     NAML
>     <http://forum.world.st/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
>
>
>
>
> ------------------------------------------------------------------------
> View this message in context: Re: 2 questions around gitlab,
> gitfiletree, BaselineOf
> <http://forum.world.st/2-questions-around-gitlab-gitfiletree-BaselineOf-tp4953877p4954305.html>
> Sent from the Pharo Smalltalk Users mailing list archive
> <http://forum.world.st/Pharo-Smalltalk-Users-f1310670.html> at Nabble.com.


Reply | Threaded
Open this post in threaded view
|

Re: 2 questions around gitlab, gitfiletree, BaselineOf

Sabine Manaa
Hi Thierry,

this would be nice and exactly what I was looking for.

I ask myself if iceberg would be able to solve this/will it be able to solve it in a later version.

Regards
Sabine 

2017-07-11 23:13 GMT+02:00 Thierry Goubier [via Smalltalk] <[hidden email]>:
Hi Sabine,

I have a slightly different script, a Makefile, which uses another
trick: put everything into a pharo/ subdirectory. Like that, just rm -rf
pharo/ erases everything before rebuilding.

I think I would implement the support you need for you to simply be able
to write:

Metacello new baseline: \'RKA24\'\; repository:
\'gitfiletree://192.168.1.61:30000/SPF/Spesenfuchs.gitspf:1.0?protocol=http\'\;load

so that the clone + Metacello over filetree isn't necessary.

(at the moment, I'm just pretty sure GitFileTree doesn't handle http and
the port number, but that wouldn't be hard to add)

Regards,

Thierry


Le 11/07/2017 à 12:43, Sabine Manaa a écrit :

> After several questions and trials I ended with a script like this:
>
> cd /Applications/Pharo5.0-7.app/Contents/Resources
> rm Pharo.image
> rm Pharo.changes
> curl get.pharo.org/50 <http://get.pharo.org/50> | bash
> rm -rf spfClonedGitlabRepository

> git clone http://192.168.1.61:30000/SPF/Spesenfuchs.git 
> <http://192.168.1.61:30000/SPF/Spesenfuchs.git> --branch 1.0
> spfClonedGitlabRepository
> Pharo Pharo.image --no-default-preferences eval --save "(CatalogProvider
> projectNamed: 'GitFileTree') installVersion: #stable. Metacello new
> baseline: 'RKA24'; repository: 'filetree://spfClonedGitlabRepository';load."
>
> It creates a local clone (of a certain version) of my gitlab repository
> (deleting old stuff before) and starts with a new image, loading the
> given branch.
>
> With this, I can always start with a new image, loading exactly the
> version I want from gitlab.
>
> For pushing into gitlab I use the MCFileTreeGitRepository browser and push.
>
> Big thank you for all who helped me, here and in discord.
>
> 2017-07-08 18:31 GMT+02:00 Pierce Ng-3 [via Smalltalk] <[hidden email]
> </user/SendEmail.jtp?type=node&node=4954305&i=0>>:
>

>     On Fri, Jul 07, 2017 at 06:48:50AM -0700, Sabine Manaa wrote:
>
>     > 1) For loading my own code, I currently have a bad solution
>     > I would like to load it within my baseline like this below but I dont know
>     > what to write in the fileTreeRepository method...
>     >
>     > baseline: spec
>     > <baseline>
>     > spec
>     > for: #common
>     > do: [ spec blessing: #baseline.
>     > spec repository: ##self fileTreeRepository##.
>                                               ^^^^^^^^^^^^^^^^^^^^^^^^^^^
>     Here I use 'http://127.0.0.1:20080/', where the http server serves
>     my filetree
>     repo directory. The easiest way (for me on Linux/Mac) to get the
>     http server
>     running is 'python3 -m http.server 20080'.
>
>     This method works for a directory full of .mcz files too.
>
>     Pierce
>
>
>
>     ------------------------------------------------------------------------
>     If you reply to this email, your message will be added to the
>     discussion below:
>     http://forum.world.st/2-questions-around-gitlab-gitfiletree-BaselineOf-tp4953877p4954007.html
>     <http://forum.world.st/2-questions-around-gitlab-gitfiletree-BaselineOf-tp4953877p4954007.html>
>
>     To start a new topic under Pharo Smalltalk Users, email [hidden
>     email] </user/SendEmail.jtp?type=node&node=4954305&i=1>
>     To unsubscribe from Pharo Smalltalk Users, click here.
>     NAML
>     <http://forum.world.st/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>

>
>
>
>
> ------------------------------------------------------------------------
> View this message in context: Re: 2 questions around gitlab,
> gitfiletree, BaselineOf
> <http://forum.world.st/2-questions-around-gitlab-gitfiletree-BaselineOf-tp4953877p4954305.html>
> Sent from the Pharo Smalltalk Users mailing list archive
> <http://forum.world.st/Pharo-Smalltalk-Users-f1310670.html> at Nabble.com.




If you reply to this email, your message will be added to the discussion below:
http://forum.world.st/2-questions-around-gitlab-gitfiletree-BaselineOf-tp4953877p4954413.html
To start a new topic under Pharo Smalltalk Users, email [hidden email]
To unsubscribe from Pharo Smalltalk Users, click here.
NAML

Reply | Threaded
Open this post in threaded view
|

Re: 2 questions around gitlab, gitfiletree, BaselineOf

Tim Mackinnon
I have another approach (possibly similar) - as gitlab has already checked out the code for you you simply need to point to it?

- rm -rf build. # gitlab can cache the build directory
- mkdir build
- cp scripts/* build

- cd build
- curl get.pharo.org/64/ | bash
- ./pharo Pharo.image --no-default-preferences --save --quit st loadLocal.st

Where loadLocal.st is in a /scripts directory checked into gitlab, and /src is where my normal Pharo Iceberg packages are checked in. loadLocal.st is simply:

"CmdLine script to load project"

Metacello new
repository: '<a href="filetree://../src" class="">filetree://../src';
baseline: 'Lambda';
load.

Tim

On 12 Jul 2017, at 06:49, Sabine Manaa <[hidden email]> wrote:

Hi Thierry,

this would be nice and exactly what I was looking for.

I ask myself if iceberg would be able to solve this/will it be able to solve it in a later version.

Regards
Sabine 

2017-07-11 23:13 GMT+02:00 Thierry Goubier [via Smalltalk] <<a href="x-msg://253/user/SendEmail.jtp?type=node&amp;node=4954475&amp;i=0" target="_top" rel="nofollow" link="external" class="">[hidden email]>:
Hi Sabine,

I have a slightly different script, a Makefile, which uses another
trick: put everything into a pharo/ subdirectory. Like that, just rm -rf
pharo/ erases everything before rebuilding.

I think I would implement the support you need for you to simply be able
to write:

Metacello new baseline: \'RKA24\'\; repository:
\'gitfiletree://192.168.1.61:30000/SPF/Spesenfuchs.gitspf:1.0?protocol=http\'\;load

so that the clone + Metacello over filetree isn't necessary.

(at the moment, I'm just pretty sure GitFileTree doesn't handle http and
the port number, but that wouldn't be hard to add)

Regards,

Thierry


Le 11/07/2017 à 12:43, Sabine Manaa a écrit :

> After several questions and trials I ended with a script like this:
>
> cd /Applications/Pharo5.0-7.app/Contents/Resources
> rm Pharo.image
> rm Pharo.changes
> curl get.pharo.org/50 <http://get.pharo.org/50> | bash
> rm -rf spfClonedGitlabRepository

> git clone http://192.168.1.61:30000/SPF/Spesenfuchs.git 
> <http://192.168.1.61:30000/SPF/Spesenfuchs.git> --branch 1.0
> spfClonedGitlabRepository
> Pharo Pharo.image --no-default-preferences eval --save "(CatalogProvider
> projectNamed: 'GitFileTree') installVersion: #stable. Metacello new
> baseline: 'RKA24'; repository: 'filetree://spfClonedGitlabRepository';load."
>
> It creates a local clone (of a certain version) of my gitlab repository
> (deleting old stuff before) and starts with a new image, loading the
> given branch.
>
> With this, I can always start with a new image, loading exactly the
> version I want from gitlab.
>
> For pushing into gitlab I use the MCFileTreeGitRepository browser and push.
>
> Big thank you for all who helped me, here and in discord.
>
> 2017-07-08 18:31 GMT+02:00 Pierce Ng-3 [via Smalltalk] <[hidden email]
> </user/SendEmail.jtp?type=node&node=4954305&i=0>>:
>

>     On Fri, Jul 07, 2017 at 06:48:50AM -0700, Sabine Manaa wrote:
>
>     > 1) For loading my own code, I currently have a bad solution
>     > I would like to load it within my baseline like this below but I dont know
>     > what to write in the fileTreeRepository method...
>     >
>     > baseline: spec
>     > <baseline>
>     > spec
>     > for: #common
>     > do: [ spec blessing: #baseline.
>     > spec repository: ##self fileTreeRepository##.
>                                               ^^^^^^^^^^^^^^^^^^^^^^^^^^^
>     Here I use 'http://127.0.0.1:20080/', where the http server serves
>     my filetree
>     repo directory. The easiest way (for me on Linux/Mac) to get the
>     http server
>     running is 'python3 -m http.server 20080'.
>
>     This method works for a directory full of .mcz files too.
>
>     Pierce
>
>
>
>     ------------------------------------------------------------------------
>     If you reply to this email, your message will be added to the
>     discussion below:
>     http://forum.world.st/2-questions-around-gitlab-gitfiletree-BaselineOf-tp4953877p4954007.html
>     <http://forum.world.st/2-questions-around-gitlab-gitfiletree-BaselineOf-tp4953877p4954007.html>
>
>     To start a new topic under Pharo Smalltalk Users, email [hidden
>     email] </user/SendEmail.jtp?type=node&node=4954305&i=1>
>     To unsubscribe from Pharo Smalltalk Users, click here.
>     NAML
>     <http://forum.world.st/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>

>
>
>
>
> ------------------------------------------------------------------------
> View this message in context: Re: 2 questions around gitlab,
> gitfiletree, BaselineOf
> <http://forum.world.st/2-questions-around-gitlab-gitfiletree-BaselineOf-tp4953877p4954305.html>
> Sent from the Pharo Smalltalk Users mailing list archive
> <http://forum.world.st/Pharo-Smalltalk-Users-f1310670.html> at Nabble.com.



If you reply to this email, your message will be added to the discussion below:
http://forum.world.st/2-questions-around-gitlab-gitfiletree-BaselineOf-tp4953877p4954413.html
To start a new topic under Pharo Smalltalk Users, email <a href="x-msg://253/user/SendEmail.jtp?type=node&amp;node=4954475&amp;i=1" target="_top" rel="nofollow" link="external" class="">[hidden email]
To unsubscribe from Pharo Smalltalk Users, click here.
NAML



View this message in context: Re: 2 questions around gitlab, gitfiletree, BaselineOf
Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.

Reply | Threaded
Open this post in threaded view
|

Re: 2 questions around gitlab, gitfiletree, BaselineOf

Sabine Manaa
Hi Thierry,

when I take a new Pharo5 Image and do

Metacello new
    baseline: 'FileTree';
    repository: 'github://dalehenrich/filetree:pharo5.0_dev';
    load

I get the following error;

"Could not resolve: BaselineOfFileTree [BaselineOfFileTree] in /Applications/Pharo5.0-7.app/Contents/Resources/package-cache github://dalehenrich/filetree:pharo5.0_dev"

When I look in the directory, I see, that the files are in the /github-cache and not in the /package-cache.

Did I miss something?

Regards
Sabine

2017-07-12 22:15 GMT+02:00 Tim Mackinnon [via Smalltalk] <[hidden email]>:
I have another approach (possibly similar) - as gitlab has already checked out the code for you you simply need to point to it?

- rm -rf build. # gitlab can cache the build directory
- mkdir build
- cp scripts/* build

- cd build
- curl get.pharo.org/64/ | bash
- ./pharo Pharo.image --no-default-preferences --save --quit st loadLocal.st

Where loadLocal.st is in a /scripts directory checked into gitlab, and /src is where my normal Pharo Iceberg packages are checked in. loadLocal.st is simply:

"CmdLine script to load project"

Metacello new
repository: '<a href="filetree://../src" class="">filetree://../src';
baseline: 'Lambda';
load.

Tim

On 12 Jul 2017, at 06:49, Sabine Manaa <[hidden email]> wrote:

Hi Thierry,

this would be nice and exactly what I was looking for.

I ask myself if iceberg would be able to solve this/will it be able to solve it in a later version.

Regards
Sabine 

2017-07-11 23:13 GMT+02:00 Thierry Goubier [via Smalltalk] <<a href="x-msg://253/user/SendEmail.jtp?type=node&amp;node=4954475&amp;i=0" target="_top" rel="nofollow" link="external" class="">[hidden email]>:

Hi Sabine,

I have a slightly different script, a Makefile, which uses another
trick: put everything into a pharo/ subdirectory. Like that, just rm -rf
pharo/ erases everything before rebuilding.

I think I would implement the support you need for you to simply be able
to write:

Metacello new baseline: \'RKA24\'\; repository:
\'gitfiletree://192.168.1.61:30000/SPF/Spesenfuchs.gitspf:1.0?protocol=http\'\;load

so that the clone + Metacello over filetree isn't necessary.

(at the moment, I'm just pretty sure GitFileTree doesn't handle http and
the port number, but that wouldn't be hard to add)

Regards,

Thierry


Le 11/07/2017 à 12:43, Sabine Manaa a écrit :

> After several questions and trials I ended with a script like this:
>
> cd /Applications/Pharo5.0-7.app/Contents/Resources
> rm Pharo.image
> rm Pharo.changes
> curl get.pharo.org/50 <http://get.pharo.org/50> | bash
> rm -rf spfClonedGitlabRepository

> git clone http://192.168.1.61:30000/SPF/Spesenfuchs.git 
> <http://192.168.1.61:30000/SPF/Spesenfuchs.git> --branch 1.0
> spfClonedGitlabRepository
> Pharo Pharo.image --no-default-preferences eval --save "(CatalogProvider
> projectNamed: 'GitFileTree') installVersion: #stable. Metacello new
> baseline: 'RKA24'; repository: 'filetree://spfClonedGitlabRepository';load."
>
> It creates a local clone (of a certain version) of my gitlab repository
> (deleting old stuff before) and starts with a new image, loading the
> given branch.
>
> With this, I can always start with a new image, loading exactly the
> version I want from gitlab.
>
> For pushing into gitlab I use the MCFileTreeGitRepository browser and push.
>
> Big thank you for all who helped me, here and in discord.
>
> 2017-07-08 18:31 GMT+02:00 Pierce Ng-3 [via Smalltalk] <[hidden email]
> </user/SendEmail.jtp?type=node&node=4954305&i=0>>:
>

>     On Fri, Jul 07, 2017 at 06:48:50AM -0700, Sabine Manaa wrote:
>
>     > 1) For loading my own code, I currently have a bad solution
>     > I would like to load it within my baseline like this below but I dont know
>     > what to write in the fileTreeRepository method...
>     >
>     > baseline: spec
>     > <baseline>
>     > spec
>     > for: #common
>     > do: [ spec blessing: #baseline.
>     > spec repository: ##self fileTreeRepository##.
>                                               ^^^^^^^^^^^^^^^^^^^^^^^^^^^
>     Here I use 'http://127.0.0.1:20080/', where the http server serves
>     my filetree
>     repo directory. The easiest way (for me on Linux/Mac) to get the
>     http server
>     running is 'python3 -m http.server 20080'.
>
>     This method works for a directory full of .mcz files too.
>
>     Pierce
>
>
>
>     ------------------------------------------------------------------------
>     To start a new topic under Pharo Smalltalk Users, email [hidden
>     email] </user/SendEmail.jtp?type=node&node=4954305&i=1>
>     To unsubscribe from Pharo Smalltalk Users, click here.
>     NAML
>     <http://forum.world.st/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>

>
>
>
>
> ------------------------------------------------------------------------
> View this message in context: Re: 2 questions around gitlab,
> gitfiletree, BaselineOf
> <http://forum.world.st/2-questions-around-gitlab-gitfiletree-BaselineOf-tp4953877p4954305.html>
> Sent from the Pharo Smalltalk Users mailing list archive
> <http://forum.world.st/Pharo-Smalltalk-Users-f1310670.html> at Nabble.com.


If you reply to this email, your message will be added to the discussion below:
http://forum.world.st/2-questions-around-gitlab-gitfiletree-BaselineOf-tp4953877p4954413.html
To start a new topic under Pharo Smalltalk Users, email <a href="x-msg://253/user/SendEmail.jtp?type=node&amp;node=4954475&amp;i=1" target="_top" rel="nofollow" link="external" class="">[hidden email]
To unsubscribe from Pharo Smalltalk Users, click here.
NAML



View this message in context: Re: 2 questions around gitlab, gitfiletree, BaselineOf
Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.




If you reply to this email, your message will be added to the discussion below:
http://forum.world.st/2-questions-around-gitlab-gitfiletree-BaselineOf-tp4953877p4954619.html
To start a new topic under Pharo Smalltalk Users, email [hidden email]
To unsubscribe from Pharo Smalltalk Users, click here.
NAML