当前位置:网站首页>Jenkins releases PHP project code

Jenkins releases PHP project code

2022-06-25 23:47:00 ndrandy

be based on Jenkins Release php Code , In fact, the core is three plug-ins

  • git/svn plug-in unit
  • Push Over SSH plug-in unit  
  • Role-based Authorization Strategy ( This plug-in is used to manage multiple projects , User permission assignment , Different roles control different projects )

Information on the Internet , It is basically a legend tutorial on how to configure , But this article does not cover these , There are a lot of configuration information , The purpose of this article is to let you know the whole release process .

install jenkins The server of this article is called : Release machine

The server that runs the project code is called : Project machines

jenkins Is based on “ Release machine ” And “ Project machines ” Between the ssh Avoid secret landing , And then through scp perhaps rsync Synchronize to each project machine , If there is shell The script will be executed later shell.

Brief description of configuration process

  • stay Push Over SSH Plug in ( System management -> The system configuration -> Publish over SSH), Need configuration “ Release machine ” Private key information , as well as N Configuration information of project machines ( machine name、ip、ssh Password free user name , Project code path, etc )
  • Configure a new project ,jenkins called Item,   The points needing attention in the configuration are :

          # structure (Build)  about php In terms of projects , You can execute directly here Code release +shell, This situation is generally used for The mode of directly releasing code

         # For those that need code rollback php project ,“ structure ” This step allows you to perform a code backup , Or will rollback Version of the code covers jenkins Of workspace in ,linux To think in silence :/var/lib/jenkins/workspace,  And then in “ Post-build operation ” Is executing Publishing +shell Execution, etc . This situation can put “ structure ” Understood as a pre-publish namely : Release preparation

        # Details of the release process , For example, to filter the transferred files , Directly in ssh servers( Project machine cluster ) Medium Transfer Set To configure

  • Assign roles to each project , In this way, different project team members manage their own projects , The key configuration is :Manage and Assign Roles->Manage Roles in Configure each item role Overall situation Global roles, General “ Mission ” tag Of read jurisdiction , Then the core is Item roles Give your own role Specify the project name by regular .

 

 

原网站

版权声明
本文为[ndrandy]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/176/202206252056449507.html