/tradeshift-rebase-toolkit

for Tradeshift china code rebase

Primary LanguageShellGNU General Public License v2.0GPL-2.0

code rebase toolkit for Tradeshift

rebase

  1. Make sure your directory structure looks like below example.
├── App-Service
├── Apps
├── Backend-Service
├── Frontend
├── Tradeshift-Proxy2
├── tradeshift-company-profile
├── tradeshift-product-engine
├── Workflow
├── p2p-apps
├── tradeshift-puppet
├── tradeshift-rebase-toolkit
  1. Make sure all project has no uncommited changes.

  2. Install related dependency.

# install pip
brew install pip

# install shyaml
sudo pip install shyaml
  1. Execute below commands to auto rebase.
cd tradeshift-rebase-toolkit
sh ./scripts/rebase.sh
  1. Resolve merge conflicts and execute git commit for every project(don't use git commit -m xxx)

Key point

Frontend

  1. Check if com.tradeshift:tradeshift-ubl defined in grails-app/conf/BuildConfig.groovy is changed, since we have china specific change. If changed, rebase and release a new ubl jar package by the jenkins job

  2. Check if tradeshift.chrome.stableVersion defined in grails-app/conf/Config.groovy is changed. If changed, release this new chrome version to ali cdn by jenkins job (TBD)

Apps

  1. Check if tradeshift-ui in package.json is updated. If changed, first, release the version to ali cdn by the jenkins job second, update puppet like this pull request

  2. Check the base image in docker/Dockerfile, currently it should be tradeshift-docker-node:onbuild, if the dockerfile in tradeshift-docker-node repo is updated, we need to rebase it with this commit, and rebuild docker image by jenkins job

  3. Don't try to resolve conflict in package-lock.json, just accept Tradeshift version and use below commands to regenerate a new one.

sed -i '' 's/npm.tradeshift.net/cn.npm.bwtsi.cn/g' package-lock.json
npm install
  1. Inform everyone to use specific version of node defined in .nvmrc and npm defined in jenkins.sh.

Backend-Service

  1. Check ubl.version defined in pom.xml, follow Frontend step 1.

Product-engine

  1. Search all ImageStorageService bean, add @Qualifier("qiniu") annotation like below.
    @Autowired
    @Qualifier("qiniu")
    private final ImageStorageService imageStorageService;

create rebase pull request