Separate Building from Deployment with Hudson

后端 未结 3 1742
暗喜
暗喜 2021-02-06 11:53

We have started using Hudson, and the current workflow is:

checkout locally > code > run tests > update > run tests > commit

Rather that polling, Hudson simply

相关标签:
3条回答
  • 2021-02-06 11:55

    I ended up doing something similar to Peter Schuetze suggestion. I used only the only job however. I use 3 build parameters, deploy (bool), environment (choice) and revision (text). I then altered my Phing scripts to only do deployments if the deploy parameter is true, in which case it will deploy the specified revision to the specified environment. By default deploy is false, revision is head and environment is staging. Now when Hudson polls svn, it sees the deploy parameter is false and bypasses the deployment tasks.

    0 讨论(0)
  • 2021-02-06 12:07

    I separated the build/test job (job1) and the deploy job (job2). Job1 runs on trunk after every commit (Hudson polls, but post commit hook would work as well). It also archives the build artifacts. Job2 will be started manually. It gets the build_number from job1 as a build parameter (I like the run parameter) and downloads the artifacts from job1, into it's own workspace. It them runs the deployment. In you case I would add another parameter (choice parameter) to determine to what environment you want to deploy.

    With the description setter plugin, you can print out the run number from job1 and the environment and you can than easily see in the job history what build was deployed when to what environment.

    0 讨论(0)
  • 2021-02-06 12:17

    I'm not entirely clear on what you want to achieve, but I'm wondering whether you are using the Phing plugin? Perhaps what you want is not currently possible through Hudson and may require changing your development process to make it possible.

    0 讨论(0)
提交回复
热议问题