Sorry for late answer from me. Thank you for your solution. Really
appreciate. It's really hard subject for me (not long time ago I have only
heard about something like Jenkins and Docker). Currently I have:
1. Multibranch Pipeline.
2. Dockerfile is inside project folder. What is "Jenkins ChangeSet" - do
you mean "currentBuild.changeSets"? Why and how should I change dockerfile
during pipeline execution? :)
3. Currently I made own image of jenkins slave based on
https://hub.docker.com/r/jenkinsci/jnlp-slave/ + installed postgres, rail,
ruby. Whole multibranch pipeline works perfect (build with success) on this
slave.
4. Do you run build/test using some plugin or by adding something to
Jenkinsfile or maybe something another?
5. Honestly, also no idea how... :/

pt., 24 maj 2019 o 03:17 Quang Truong <[email protected]>
napisał(a):

> We implemented a similar Use Case:
>
>    - Create an isolate environment for each team
>    - Whenever they have commit/PR triggers a build and create a container
>    to build that project.
>    - If the Dockerfile in that project has changed, refresh the docker
>    image then create container based on the new image.
>
> The solution is (refer and tailor on your case):
>
>    - Use multibranch project so Jenkins will trigger with git commit/PR
>    - Put Dockerfile into the project folder (let the team maintains their
>    environment), use the Jenkins ChangeSet to verify if the Dockerfile has
>    changed so you will refresh (remove the existing image then build a new one
>    with the updated Dockerfile) the docker image on your Jenkins executor
>    - Build the docker image/container as a Jenkins slave (use
>    swarm-client, accept the security issue with this plugin)
>    - Run the build/test the project on your new slave container (consider
>    about concurrent pipeline with the new container)
>    - If the build is green, back to the slave/host then push/update the
>    image into the docker registry
>
> Hope this can help
>
> --
> 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/5ca8978f-78ed-468a-8050-f7193df7f5c1%40googlegroups.com
> <https://groups.google.com/d/msgid/jenkinsci-users/5ca8978f-78ed-468a-8050-f7193df7f5c1%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>


-- 
*Pozdrawiam / Kind regards,*
Piotr Bracha
Administrator Systemów
*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/>[image:
wKarteczkach Logo]  <http://wkarteczkach.pl/>[image: Tłumacze Elektroniczne
Logo] <https://tlumacze-elektroniczne.pl/>
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/CAKfpvwefwtPPwAQE-evjsv45shCRQXj-0ntnwUL-d9hO2U8oHA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to