Ok, let me try to explain better.

I have a RoR app that uses a Postgres DB. I want to use Jenkins to automate 
the execution of the test suite of that RoR app. Currently, I'm being 
unable to configure a proper Jenkinsfile for it, because I don't understand 
how to tell Jenkins to use a container for the RoR app and a container for 
the Postgres DB.

On Wednesday, May 27, 2020 at 10:25:13 AM UTC+1, Polak wrote:
>
> Ok, sorry. Probably I didn't understand you properly but I thought you 
> want to run a dockerized rails app based on postgres db. Could you tell me 
> what is a goal you want to reach?
>
> śr., 27 maj 2020 o 10:08 Ricardo Amaro <[email protected] <javascript:>> 
> napisał(a):
>
>> Hi Polak.
>>
>> Thank you for your reply, but I don't see how the link you shared will 
>> help me. It is related with containerizing a Rails app, and doesn't refers 
>> the configuration of a Jenkinsfile.
>>
>>
>> On Wednesday, May 27, 2020 at 7:31:24 AM UTC+1, Polak wrote:
>>>
>>> Take a look at this:  
>>> https://www.digitalocean.com/community/tutorials/containerizing-a-ruby-on-rails-application-for-development-with-docker-compose
>>>
>>> wt., 26 maj 2020 o 19:47 Ricardo Amaro <[email protected]> napisał(a):
>>>
>>>> Hello to all,
>>>>
>>>> I would like to configure a Jenkinsfile for a RoR project with a 
>>>> PostgreSQL database, but the syntax and the documentation is driving me 
>>>> crazy.
>>>>
>>>> As I understand, if I want my RoR app to run in a Docker container and 
>>>> my Postgres Db to run in another container, I need to use something like 
>>>> this:
>>>>
>>>> node {
>>>>   docker.image('postgres:11.3').withRun("--env POSTGRES_USER=user --env 
>>>> POSTGRES_PASSWORD=password -p 54321:5432") { c ->
>>>>     docker.build('test-image', './ci').inside("--link ${c.id}")
>>>>   }
>>>> }
>>>>
>>>> but, if the pipeline syntax tells me that I need to declare an agent, 
>>>> like this:
>>>>
>>>> pipeline {
>>>>   agent {
>>>>     ...
>>>>   }
>>>>   stages {
>>>>     ...
>>>>   }
>>>> }
>>>>
>>>> where do I need to declare the containers I'm creating?
>>>>
>>>> Am I doing this wrong? Is it impossible to have it this way, in two 
>>>> containers? Can someone, please, provide me with a full example of it?
>>>>
>>>>
>>>> Thank you in advance!
>>>>
>>>> -- 
>>>> You received this message because you are subscribed to the Google 
>>>> Groups "Jenkins Users" group.
>>>> To unsubscribe from this group and stop receiving emails from it, send 
>>>> an email to [email protected].
>>>> To view this discussion on the web visit 
>>>> https://groups.google.com/d/msgid/jenkinsci-users/960edcc1-cd04-431a-8279-7d707062a3be%40googlegroups.com
>>>>  
>>>> <https://groups.google.com/d/msgid/jenkinsci-users/960edcc1-cd04-431a-8279-7d707062a3be%40googlegroups.com?utm_medium=email&utm_source=footer>
>>>> .
>>>>
>>>
>>>
>>> -- 
>>> *Pozdrawiam / Kind regards,* 
>>> Piotr Bracha
>>> *Vasco Electronics sp. z o.o. S.K.A.*
>>> al. Pokoju 1, CTA/350 
>>> 31-548 Kraków
>>> NIP 677 236 91 51
>>>  
>>> E-mail:  [email protected]
>>> [image: Vasco Electronics] <https://vasco-electronics.com/>
>>> Vasco Electronics Spółka z ograniczoną odpowiedzialnością Spółka 
>>> Komandytowo-Akcyjna, Al. Pokoju 1, CTA/350, 31-548 Kraków, Polska, NIP: 
>>> 6772369151, REGON: 122581850, zarejestrowana w Sądzie Rejonowym dla Krakowa 
>>> Śródmieścia XI Wydział KRS pod nr KRS: 0000421705, Kapitał zakładowy 50 000 
>>> zł (słownie: pięćdziesiąt tysięcy złotych) w całości wpłacony. Klauzula 
>>> Bezpieczeństwa: treść tej wiadomości wraz z załącznikami stanowią 
>>> informacje chronione przed ujawnieniem. Jeśli wiadomość ta nie jest 
>>> przeznaczona dla Ciebie uprzedzamy, że ujawnianie, kopiowanie, 
>>> rozpowszechnianie lub korzystanie z niej lub z załączników jest zabronione. 
>>> Jeśli otrzymałeś tę wiadomość przez pomyłkę, uprzejmie prosimy o 
>>> niezwłoczne zawiadomienie nadawcy i odesłanie jej z powrotem wraz z 
>>> załącznikami a także usunięcie ze swoich systemów.
>>>
>> -- 
>> You received this message because you are subscribed to the Google Groups 
>> "Jenkins Users" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to [email protected] <javascript:>.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/jenkinsci-users/36481089-02d7-417c-80ba-0f3242b2b259%40googlegroups.com
>>  
>> <https://groups.google.com/d/msgid/jenkinsci-users/36481089-02d7-417c-80ba-0f3242b2b259%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>>
>
>
> -- 
> *Pozdrawiam / Kind regards,* 
> Piotr Bracha
> *Vasco Electronics sp. z o.o. S.K.A.*
> al. Pokoju 1, CTA/350 
> 31-548 Kraków
> NIP 677 236 91 51
>  
> E-mail:  [email protected] <javascript:>
> [image: Vasco Electronics] <https://vasco-electronics.com/>
> Vasco Electronics Spółka z ograniczoną odpowiedzialnością Spółka 
> Komandytowo-Akcyjna, Al. Pokoju 1, CTA/350, 31-548 Kraków, Polska, NIP: 
> 6772369151, REGON: 122581850, zarejestrowana w Sądzie Rejonowym dla Krakowa 
> Śródmieścia XI Wydział KRS pod nr KRS: 0000421705, Kapitał zakładowy 50 000 
> zł (słownie: pięćdziesiąt tysięcy złotych) w całości wpłacony. Klauzula 
> Bezpieczeństwa: treść tej wiadomości wraz z załącznikami stanowią 
> informacje chronione przed ujawnieniem. Jeśli wiadomość ta nie jest 
> przeznaczona dla Ciebie uprzedzamy, że ujawnianie, kopiowanie, 
> rozpowszechnianie lub korzystanie z niej lub z załączników jest zabronione. 
> Jeśli otrzymałeś tę wiadomość przez pomyłkę, uprzejmie prosimy o 
> niezwłoczne zawiadomienie nadawcy i odesłanie jej z powrotem wraz z 
> załącznikami a także usunięcie ze swoich systemów.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/f192b8cb-b047-4053-bd32-8185f2f27684%40googlegroups.com.

Reply via email to