git-octopus icon indicating copy to clipboard operation
git-octopus copied to clipboard

Create a Jenkins Template ready to use (French description)

Open dbaeli opened this issue 8 years ago • 4 comments

FRENCH REQUEST REPORTED ON THE MAILING LIST (to translate)

J'effectue en ce moment une évaluation de Git Octopus :) J'essaie notamment de l'intégrer le mieux possible dans notre processus de delivery (basé sur le trio Bitbucket/Jenkins/Chef).

Est-ce qu'il y a un template pour un job Jenkins qui effectue l'ensemble des actions nécessaires ? En effet, j'ai l'impression qu'il me manque certaines commandes / options pour :

  • le cleanup du workspace (options du plugin Git de Jenkins)
  • fetch des branches remotes
  • git octopus origin/features/* origin/octopus
  • mise en forme des conflits dans un report (capture dans la console ?)

Je suis preneur de vos conseils pour m'assurer que j'utilise bien correctement Git Octopus

dbaeli avatar Jan 07 '17 01:01 dbaeli

En tous cas c'est pas bien compliqué à installer normalement : apflieger answer:

  • Le cleanup est effectivement geré par le plugin git de jenkins. Ca fait longtemps que je n'y ai pas touché, peut être un clean checkout à chaque build ?
  • De mémoire, le plugin Git de Jenkins ne fetch pas toutes les branches mais seulement celle qui a déclenché le build. Le script de build peut commencer par faire un git fetch origin +refs/heads/:refs/remotes/origin/
  • La commande octopus dépend alors de ce que tu veux faire. A savoir que git octopus inclu toujours la branche sur laquelle le repo est au moment de lancer la commande. Attention, il ne faut (normalement) pas mettre origin/octopus en paramètre du merge. Dis moi si c'est pas clair Si tu veux merger les branches qui suivent un pattern de nommage (features/* par ex), Ca sera git octopus origin/features/* origin/master && git push origin +HEAD:refs/heads/octopus Si tu veux merger toutes les branches du repo, il faut penser à exclure la branche octopus : git octopus -e origin/octopus origin/* && git push origin +HEAD:refs/heads/octopus
  • Effectivement, le rapport est printé dans la console

dbaeli avatar Jan 07 '17 01:01 dbaeli

Hi guys, I think I have a good starting point for such a feature, I gave a BBL lastly about your great tool and I use the following Jenkinsfile for the time being.

Do you want a PR with it ?

CedricGatay avatar May 22 '17 09:05 CedricGatay

We could just link it from the README. Can somebody review it ?

A thought though: it seems that you checkout the master before executing the merge. This is not mandatory. If you let the octopus run on the branch that triggered the build, you get a better information in case of failure. You'll know which branch has conflict with the current one. This configuration is a bit unstable compared to what you use, so I don't know which one we should advise...

apflieger avatar May 22 '17 11:05 apflieger

In fact I am always manually triggering the octopus for the time being, so the source branch information is not useful to me.

CedricGatay avatar May 22 '17 11:05 CedricGatay