¹«Ë¾µÄgitlabÔõôÓÃ
×÷Ϊһ¿îÊ¢ÐеÄÔ´´úÂëÍйÜƽ̨£¬gitlabΪÆóÒµµÄ´úÂëÖÎÀíÌṩÁ˱ã½ÝµÄ½â¾ö¼Æ»®¡£ÔÚʵÏÖÐͬ¿ª·¢¡¢°æ±¾¿ØÖÆ¡¢ÎÊÌâ×·×ٵȹ¦Ð§µÄ»ù´¡ÉÏ£¬gitlab»¹ÌṩÁ˶àÑù»¯µÄ¹¦Ð§ºÍ¹¤¾ß£¬Ö§³Ö×Ô¶¯»¯¹¹½¨¡¢ci/cdÁ÷³Ì¡¢Çå¾²²âÊÔµÈÌØÕ÷¡£ÔÚ±¾ÎÄÖУ¬ÎÒÃǽ«ÏÈÈݹ«Ë¾µÄgitlabÔõÑùʹÓá£
Ò»¡¢Ð½¨ÏîÄ¿
ÔÚGitLabÖУ¬Ò»¸öÏîÄ¿Ö÷ÒªÓÉÒÔϼ¸¸öÔªËØ×é³É£º´úÂë¿â¡¢ÎÊÌâÁÐ±í¡¢Merge Request¡¢CI/CDÁ÷Ë®Ïߵȡ£Ð½¨Ò»¸öÏîÄ¿µÄ°ì·¨ÈçÏ£º
1.µÇ¼GitLabÕË»§£¬ÔÚÖ÷½çÃæÉÏÕÒµ½¡°New Project¡±°´Å¥¡£
2.ÔÚµ¯³öµÄÒ³ÃæÖУ¬ÊäÈëÏîÄ¿Ãû³Æ¡¢ÐÎò¡¢¿É¼ûÐÔµÈÐÅÏ¢£¬Ñ¡Ôñ´úÂë¿âµÄÖÖ±ð£¨Git¡¢SVNµÈ£©£¬×îºóµã»÷¡°Create Project¡±°´Å¥¡£
¶þ¡¢´úÂëÖÎÀí
GitLabÌṩÁ˸»ºñµÄ°æ±¾¿ØÖƹ¦Ð§£¬°üÀ¨´úÂëµÄÌá½»¡¢·ÖÖ§ÖÎÀí¡¢´úÂëºÏ²¢µÈ¡£ÎÒÃÇ¿ÉÒÔͨ¹ýÒÔϲÙ×÷À´ÖÎÀí´úÂë¿â£º
1.н¨·ÖÖ§
µã»÷¡°Branches¡±±êÇ©£¬ÔÚÐÂÒ³ÃæÖÐÑ¡Ôñ¡°New Branch¡±£¬ÊäÈë·ÖÖ§Ãû³Æ¡¢´ÓÄĸö·ÖÖ§½¨ÉèµÈÐÅÏ¢£¬µã»÷¡°Create Branch¡±¼´¿É½¨ÉèÒ»¸öзÖÖ§¡£
2.Ìá½»½ÓÂë
µã»÷¡°Files¡±±êÇ©£¬¿ÉÒÔ½øÈëµ½´úÂë±à¼Ò³Ãæ¡£ÔÚ´ËÒ³Ã棬ÎÒÃÇ¿ÉÒÔÐÂÔö¡¢Ð޸ġ¢É¾³ýÎļþ£¬È»ºóÌá½»¸ü¸Ä¡£Ìá½»½ÓÂëʱ£¬Îñ±ØÌîдÓÐÒâÒåµÄÌá½»ÐÂÎÅ£¬ÒÔ±ãÆäËû¿ª·¢ÕßÄܹ»Ã÷È·Õâ¸ö¸ü¸ÄËù½â¾öµÄÎÊÌâ¡£
3.ºÏ²¢´úÂë
µ±ÎÒÃÇÔÚÒ»¸ö·ÖÖ§ÖÐÍê³ÉÁËij¸öÐèÇ󿪷¢»òÕßÐÞ¸´Ò»¸öbug£¬¾ÍÐèÒª½«ÕâЩÐ޸ĺϲ¢µ½Ö÷·ÖÖ§ÖС£ÕâʱÎÒÃÇ¿ÉÒÔÌá³öÒ»¸öMerge Request£¬Ô¼ÇëÆäËûÈ˾ÙÐдúÂëÉó²é¡£µ±ÉóºËͨʺ󣬾ͿÉÒÔ½«´úÂëºÏ²¢µ½Ö÷·ÖÖ§¡£
Èý¡¢ÎÊÌâ×·×Ù
GitLabÄÚÖÃÁËÎÊÌâ×·×Ù¹¦Ð§£¬¿ÉÒÔ×ÊÖúÍŶÓʵʱ·¢Ã÷Ï¢Õù¾öÖÖÖÖÎÊÌâ¡£ÒÔÏÂÊÇÎÊÌâ×·×ÙµÄÁ÷³Ì£º
1.н¨ÎÊÌâ
µã»÷¡°Issues¡±±êÇ©£¬½øÈëÎÊÌâÁбíÒ³Ã棬µã»÷¡°New Issue¡±°´Å¥£¬ÌîдÎÊÌâÎÊÌâ¡¢ÐÎò¡¢±êÇ©µÈÐÅÏ¢£¬×îºóµã»÷¡°Submit issue¡±°´Å¥¼´¿É½¨ÉèÒ»¸öеÄÎÊÌâ¡£
2.Ö¸ÅÉÎÊÌâ
µ±Ò»¸öÎÊÌâ±»½¨Éèºó£¬¿ÉÒÔÑ¡ÔñÈÏÕæÈËÀ´½â¾ö¸ÃÎÊÌâ¡£ÔÚÎÊÌâÏêÇéÒ³ÃæÖУ¬µã»÷¡°Assignee¡±±êÇ©£¬Ñ¡ÔñÖ¸ÅÉÕâ¸öÎÊÌâµÄÖ°Ô±¼´¿É¡£
3.½â¾öÎÊÌâ
µ±×îÏȽâ¾öÒ»¸öÎÊÌâʱ£¬ÎÒÃÇ¿ÉÒÔ½«ÎÊÌâµÄ״̬ÐÞ¸ÄΪ¡°In Progress¡±µÈ״̬¡£ÔÚ¸Ã״̬Ï£¬ÎÒÃÇÐèÒªÆð¾¢½â¾öÎÊÌ⣬²¢ÊµÊ±¸üнâ¾ö½ø¶È¡£
4.¹Ø±ÕÎÊÌâ
µ±ÎÊÌâ»ñµÃ½â¾öºó£¬ÎÒÃÇÐèÒª½«ÎÊÌâ״̬ÐÞ¸ÄΪ¡°Closed¡±£¬ËµÃ÷¸ÃÎÊÌâÒѾ»ñµÃÏàʶ¾ö¡£
ËÄ¡¢CI/CDÁ÷Ë®Ïß
ÔÚʹÓÃGitLabʱ£¬ÎÒÃÇ¿ÉÒÔʹÓÃCI/CDÁ÷Ë®Ïß¹¦Ð§£¬¹¹½¨×Ô¶¯»¯°²ÅÅÁ÷³Ì£¬´Ó¶øʵÏÖ¸ü¿ìËÙ¡¢¸üÓÐÓÃÂʵĿª·¢¡£ÒÔÏÂÊÇÁ÷Ë®ÏßµÄʹÓÃÁ÷³Ì£º
1.±àд.gitlab-ci.ymlÎļþ
ÔÚÏîÄ¿¸ùĿ¼Ï½¨Éè.gitlab-ci.ymlÎļþ£¬±àдÏêϸµÄ×Ô¶¯»¯°²Åž籾¡£
2.ÆôÓÃCI/CD
ÔÚGitLabÖУ¬µã»÷¡°Settings¡±±êÇ©Öеġ°CI/CD¡±Ñ¡ÏÔÚ¸ÃÒ³ÃæÖпªÆôCI/CD¹¦Ð§¡£
3.ÔËÐÐÁ÷Ë®Ïß
µ±.gitlab-ci.ymlÎļþ±àдÍê³Éºó£¬µã»÷¡°CI/CD¡±±êÇ©£¬¿É¿´µ½×Ô¼ºµÄÁ÷Ë®ÏßÏîÄ¿¡£µã»÷¡°Run pipeline¡±°´Å¥£¬¼´¿ÉÆô¶¯×Ô¶¯»¯Á÷³Ì¡£
ÒÔÉÏÊÇGitLabµÄһЩ»ù±¾¹¦Ð§µÄÏÈÈÝ£¬Ö»ÒªÎÒÃÇÉÆÓÚʹÓÃGitLabÌṩµÄÖÖÖÖ¹¤¾ßºÍ²å¼þ£¬¾Í¿ÉÒÔ´ó´óÌá¸ß¿ª·¢Ð§ÂʺÍÖÊÁ¿£¬²¢ÇÒʹµÃ´úÂë¿ÍÕ»µÄÖÎÀí±äµÃÔ½·¢×¨Òµ»¯ºÍ¹æ·¶»¯¡£
ÒÔÉϾÍÊǹ«Ë¾µÄgitlabÔõôÓõÄÏêϸÄÚÈÝ£¬¸ü¶àÇë¹Ø×¢±¾ÍøÄÚÆäËüÏà¹ØÎÄÕ£¡