Package pipeline migration

Alex Li, Jack Rui

Why we need to do extra works for migration?

Different Infrastructure
 

Munich's Jenkins agent has all dependencies/tools required by pkg build installed.

 

Warriors's Jenkins agents are shared between teams

All in POM

 

All build and test steps are included in POM and not separated stages in pipeline.

Different environments

 

Local build environment  is different with CI.

  • Use docker-compose to organise and run integration/contact/functional tests instead of using maven docker plugin
  • Create a profile `pom-build` to keep the legacy way of running tests
  • Create volume to share mvn repository cache and artefacts
  • Create a pre-commit.sh to perform checking before push commit
  • Segregate stages for tests in Jenkins file

What are changes

Before & After

TEST_MODULE

 | - ci

     | - docker-compose.yml

     | - verify.sh

     | - teardown.sh

in Jenkins file, you can find a stage for the test

 

Pattern for test modules

Similar pattern with above except the ci folder under the project root

 

Pattern for integration tests

  • Test and merge migration branch 
  • Use maven wrapper
  • Refactor ui-functional-tests module to follow the pattern

Some further works

Made with Slides.com