Separate Building from Deployment with Hudson

后端 未结 3 1737
暗喜
暗喜 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 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.

提交回复
热议问题