Ohara: Enable jenkins to run ohara-it with different image

Created on 18 Apr 2019  ·  4Comments  ·  Source: oharastream/ohara

Sometimes we need to update the script of zk, bk or wk image. However, our QA still use stale image to run the QA and it always makes a failed report. Our jenkins should be able to pass the specific image version to QA.

I plan to add following changes.

  • [x] jenkins automatically build a temporary docker images (zk, bk, and wk) for PR if PR requires tests of ohara-it. The image tag is based on sha of PR. (this task doesn't touch git repo so there is no PR)

After this issue, jenkins doesn't force all nodes to sync images from docker hub if the PR doesn't need the IT tests. If PR needs IT tests, jenkins will build the temporary images based on the PR's code and then sync temporary images to all IT ndoes (the temporary images are not pushed to docker hub). Building temporary images are not cheap but it ensure IT tests are close to PR's code totally.

  • [x] the VersionUtils generated at runtime accept a env variable to change the default version to specific string (of course, jenkins pass sha of PR to it) (#798)

The side-effect is that jenkins has to take more time to complete tests of IT. But, this new feature makes our jenkins more smart :)

jenkins v0.4.0

Most helpful comment

Jenkins will tag sha of commit to temporary images and then change the default image name’s tag to sha (see #798)

All 4 comments

FYI @vitojeng @jackyoh @saivirtue @konekoya @eechih @wu87988622

在執行整合測試時會自動 build 出 temporary 的 docker image, 那 docker image 的命名規則要如何定義?

Jenkins will tag sha of commit to temporary images and then change the default image name’s tag to sha (see #798)

All sub tasks are completed. I will close this issue later if no objections are raised.

Was this page helpful?
0 / 5 - 0 ratings