Hi Sean - it certainly sounds like its worth a poke. Have you written anything else up about it - or is this the “user manual” for now? Presumable a lot of the below could go in the readme.md for the project itself.
So to get started with it - is the intent that you fork it so you can customise the settings? OR do you make it a submodule of your existing project so that you can access the scripts? As you want to trigger something when you checkin your smalltalk code - is it a trigger in that project that kicks off a separate SmalltalkCIGL project to then do its stuff, or do you just just include it in your current project so you can reference these scripts? This is the bit I’m not understanding? Reading below - am I understanding that when you get your pipeline trigger, you use GitLabCIConfiguration to write out some config that you can then get SmalltalkCI to interpret with the assets that you have? I’l have to go back and look again. Tim > On 15 May 2018, at 14:25, Sean P. DeNigris <[hidden email]> wrote: > > Tim Mackinnon wrote >> But I don’t understand how it works on Gitlab > > The gitlab-smalltalk-ci project performs three roles: > 1. The glue which connects Gitlab and smalltalkCI. As a bonus, it does all > the necessary in-container work to setup SSH for private Gitlab projects, so > you'd just have to create/enable the deploy key in the Gitlab web UI. > 2. A Pharo library to create/modify CI artifacts like configuration files. > This let's you write Smalltalk like this `GitLabCIConfiguration new > smalltalkImageTemplateFor: 'Pharo-6.1'` instead of being forced to remember > and write: > ```yaml > .pharo61_template: &pharo61 > variables: > SMALLTALK_IMAGE: "Pharo-6.1" > ``` > 3. An example to adapt for your own project, since it eats its own dog food > and is handling its own CI. > > Also, note that the initial setup is simplified from smalltalkCI because it > uses a Docker image preloaded with all the Pharo dependencies. > > 1. First, you would create a `.gitlab-ci.yml`. I'm guessing you already know > that it is the equivalent to Travis' `.travis.yml`, which is the main hook > that the CI system picks up to run whatever you tell it to. If you read it, > you will see that it's main job is to install the glue scripts and run the > downloaded scripts/build.sh. The bottom ~half is the workaround for matrix > builds (for Pharo 6 & 7) in GitlabCI, which are not directly supported. > 2. Next, create a `.smalltalk.ston`. This is the main config hook for > smalltalkCI. I added some links to the docs in the README. > > That's really it I think. All this has been tested extensively with real > projects, but only on Pharo 6/7 and Ubuntu 32 bit. PRs welcome and feel free > to ask more questions! > > > > ----- > Cheers, > Sean > -- > Sent from: http://forum.world.st/Pharo-Smalltalk-Users-f1310670.html > |
In reply to this post by Tim Mackinnon
Hi Tim,
On Tue, May 15, 2018 at 11:56 AM Tim Mackinnon <[hidden email]> wrote:
smalltalkCI is not intended to be a Git submodule at all. It's simply some program you can download, extract, and then run by calling `bin/smalltalkci`. And it happens to look for .smalltalk.ston configuration files. It's also deeply integrated with TravisCI, so the setup is done in background. I've had a look at Sean's project and think I understood how things work on GitLab CI and Docker. I want common use cases to be as simple as possible, so I've created a minimal .gitlab-ci.yml template [1] for smalltalkCI (assuming you have your project already set up with a baseline and a .smalltalk.ston). Could you please give it a try? Best, Fabio
|
In reply to this post by Sean P. DeNigris
Hi Sean,
Sorry, I just saw your response. Questions/comments are inline... On Tue, May 15, 2018 at 3:26 PM Sean P. DeNigris <[hidden email]> wrote: Tim Mackinnon wrote This is only needed for private repos on GitLab, right? 2. A Pharo library to create/modify CI artifacts like configuration files. This library needs to be used manually, right? Or is this somehow part of the build process? 3. An example to adapt for your own project, since it eats its own dog food Sorry for not being very responsive recently, I've been super busy. I think it'd be great if we could somehow merge your additions back into smalltalkCI's repo. It's much easier, especially for users, if everything is in one place. Also, I'd love to hear your feedback on the solution I suggested in my previous email. Any ideas how to make it better? Have a look at the launcher script for smalltalkCI [1] used in the Docker image. I'm sure we could at least add the private repo ssh-agent setup process in there as well. PRs welcome! :) Cheers, Fabio
|
Administrator
|
fniephaus wrote
> As a bonus, it does all >> the necessary in-container work to setup SSH for private Gitlab projects, >> so >> you'd just have to create/enable the deploy key in the Gitlab web UI. > > This is only needed for private repos on GitLab, right? Correct. fniephaus wrote > This library needs to be used manually, right? Or is this somehow part of > the build process? The library is used to generate the artifacts (e.g. config files), which are then committed to be picked up by the CI. I assume that's what you meant by "manually"? fniephaus wrote > I think it'd be great if we could somehow merge your additions back into > smalltalkCI's repo. Definitely open to that. I got it "working" for my use cases and then paused. IIRC I did open a few issues in smalltalkCI related to this and Docker. fniephaus wrote > I'd love to hear your feedback on the solution I suggested in my previous > email. Any ideas how to make it better? Which one? fniephaus wrote > Have a look at the launcher script for smalltalkCI [1] used in the Docker > image. I will. ----- Cheers, Sean -- Sent from: http://forum.world.st/Pharo-Smalltalk-Users-f1310670.html
Cheers,
Sean |
Administrator
|
In reply to this post by Tim Mackinnon
Tim Mackinnon wrote
> Have you written anything else up about it - or is this the “user manual” > for now? The latter :) It was an itch I scratched because GL offers unlimited private projects and significant CI build time for free and then shared just in case others were struggling with the same thing, but I'm happy to answer questions and add to the docs. Tim Mackinnon wrote > Presumable a lot of the below could go in the readme.md for the project > itself. Already done! Tim Mackinnon wrote > So to get started with it In your project's root folder, if you copy `.gitlab-ci.yml` verbatim and modify `.smalltalk.ston` as needed, it should start building your project on top of Pharo 6 & 7 on 32-bit Ubuntu LTS. The Smalltalk image versions can be changed to anything accepted by smalltalkCI, and I think to support other OS'es we'd just need to build alternate Docker images [1]. You would only need to fork gitlab-smalltalk-ci if you want to modify the internals of the library itself. If you just want to customize any of the scripts in ./scripts [2] on a per-project basis, you can just save overridden copies in ./scripts in your project. The library will not overwrite existing script files in that location. FYI I did not explore deploy steps yet. I was actually waiting to develop further because the next thing I want is separate build and test steps so one can immediately know whether the installation or testing failed, and it seemed that might be added to smalltalkCI in the near future. 1. There is also a related library which enables you to generate docker files from Pharo. See https://github.com/seandenigris/smalltalkCI/tree/docker/repository/SmalltalkCI-Docker.package 2. https://gitlab.com/SeanDeNigris/gitlab-smalltalk-ci/tree/master/scripts ----- Cheers, Sean -- Sent from: http://forum.world.st/Pharo-Smalltalk-Users-f1310670.html
Cheers,
Sean |
In reply to this post by Sean P. DeNigris
On Wed, May 16, 2018 at 3:34 AM Sean P. DeNigris <[hidden email]> wrote: fniephaus wrote Yes, that's what I meant. Up until now, templates have worked quite well, but I can also see why a library would be helpful at some point.
Yes, you did. And I hope I have more time to work on smalltalkCI features soon...the list is getting longer and longer.
This one:
|
In reply to this post by Sean P. DeNigris
Hi Sean/Fabio - I’m still mulling over which direction to jump. When experimenting with PharoLambda and a minimal image it was all very custom and so I just used GitLab “natively” - and as you have noted - Gitlab has got a lot of built in CI stuff.
Now my need has expanded to something a bit more normal - I was a bit caught out that the above didn’t just work the same. As its turned out - what has been the hiccup has been not having a good stable Linux image to build on (I’ve now learned Docker to sort that bit out - and really must +++ the need to have some pharo.org docker containers just sitting there for people to use). The other issue has been what you have said - in a clean build environment you don’t have ssh keys normally defined and and the use of Iceberg and projects using github:// (which needs them by default) causes quite a lot of pain (even if they aren’t private repos). I mention this as Herby spotted it a while ago as he doesn’t use GitHub - however he also spotted a solution that I don’t think you are aware of (judging from your gitlab project) - in your preload script add the following: Iceberg enableMetacelloIntegration: true; remoteTypeSelector: #httpsUrl. This was the piece I was missing - and now my project is loading fine (in its fresh docker environment). You of course probably still have Private repos and in that case I think you still need the ssh keys sorted - but for a more general case I don’t think its needed. This long path (which has usefully solidified lots of things for me) still leaves me unsure as to whether I personally need SmalltalkCI for simple single vendor projects (as when used in GitLab - its not really doing any CI - it seems more useful for muli-dialect building I think). Maybe you guys might set me straight on this… the reality is all you are really plugging into Gitlab is: pharo Pharo.image --no-default-preferences --save --quit st loadProject.st \ And if you are also doing some testing a second invocation (ideally in a separate build stage) of: pharo Pharo.image --no-default-preferences --save --quit st testProject.st \ And with a good docker image it seems pretty straight forward. Possibly there are components in SmalltalkCI that could be extracted - maybe to interpret test results? Or I am wondering if its useful to pump stats into something like DataDog to track image size and test run times etc? I’m still interested in both your thoughts though - and by no means is this a citicism of SmalltalkCI or Gitlab-Smalltalk-CI - both of which help the community (and me) immensely through providing great examples and knowledgable people in this stuff. Tim
|
Administrator
|
Tim Mackinnon wrote
> the use of Iceberg and projects using github:// (which needs them by > default) causes quite a lot of pain (even if they aren’t private repos). > … > Iceberg > enableMetacelloIntegration: true; > remoteTypeSelector: #httpsUrl. This is part of my standard workflow and I didn't experience it as a pain point. It seems I uploaded my public GH key, but after that it "just worked". IIRC it seemed to automatically fallback to https when ssh failed, but it's been a while and I'm not in front of a pipeline. The first message is needed, especially to use `gitlab://` URLs, but I never used the second. Tim Mackinnon wrote > the reality is all you are really plugging into Gitlab is: > …loadProject.st… testProject.st I guess you could say that, except smalltalkCI also handles any needed setup, like Linux 32-bit libs (which I handle with Docker instead). Also, it saves you from having to construct the .st files in your example because: - there is a configuration model that allows you to specify the baseline name, target platforms, etc instead of manually writing load scripts - smalltalkCI remembers which tests it loaded and runs those automatically, so by default no extra work is needed to enable testing Tim Mackinnon wrote > by no means is this a citicism… All good :) ----- Cheers, Sean -- Sent from: http://forum.world.st/Pharo-Smalltalk-Users-f1310670.html
Cheers,
Sean |
Hi Sean - I stand corrected, #remoteTypeSelector: doesn’t seem to be needed (a case of getting all the other stuff right - and Docker is such a huge help for this).
For SmalltalkCI the automatic Test side might win me over. Does it also spot load load failures (like Undeclared class) and do a nice test report? I just spotted Seaside isn’t loading cleanly with my RegEx setup - but its crude. This has been very fruitful BTW , thanks Tim Sent from my iPhone Sent from my iPhone > On 16 May 2018, at 19:54, Sean P. DeNigris <[hidden email]> wrote: > > Tim Mackinnon wrote >> the use of Iceberg and projects using github:// (which needs them by >> default) causes quite a lot of pain (even if they aren’t private repos). >> … >> Iceberg >> enableMetacelloIntegration: true; >> remoteTypeSelector: #httpsUrl. > > This is part of my standard workflow and I didn't experience it as a pain > point. It seems I uploaded my public GH key, but after that it "just > worked". IIRC it seemed to automatically fallback to https when ssh failed, > but it's been a while and I'm not in front of a pipeline. The first message > is needed, especially to use `gitlab://` URLs, but I never used the second. > > > Tim Mackinnon wrote >> the reality is all you are really plugging into Gitlab is: >> …loadProject.st… testProject.st > > I guess you could say that, except smalltalkCI also handles any needed > setup, like Linux 32-bit libs (which I handle with Docker instead). Also, it > saves you from having to construct the .st files in your example because: > - there is a configuration model that allows you to specify the baseline > name, target platforms, etc instead of manually writing load scripts > - smalltalkCI remembers which tests it loaded and runs those automatically, > so by default no extra work is needed to enable testing > > > Tim Mackinnon wrote >> by no means is this a citicism… > > All good :) > > > > ----- > Cheers, > Sean > -- > Sent from: http://forum.world.st/Pharo-Smalltalk-Users-f1310670.html > |
Free forum by Nabble | Edit this page |