opendatahub-io / modelmesh-serving

Controller for ModelMesh
Apache License 2.0
3 stars 31 forks source link

Sync caikit-tgis-backend repository(main branch) #159

Closed vaibhavjainwiz closed 12 months ago

vaibhavjainwiz commented 1 year ago
cd ${SYNC_HOME}

export TARGET_REPO_NAME=caikit-tgis-backend

git clone git@github.com:${GH_USER_NAME}/${TARGET_REPO_NAME}.git
cd ${TARGET_REPO_NAME}/ 

Sync odh main to personal main branch

git remote add odh git@github.com:opendatahub-io/${TARGET_REPO_NAME}.git
git fetch odh
git merge odh/main 
git push 

Sync caikit-tgis-backend release tag to a new release branch

git remote add caikit https://github.com/caikit/${TARGET_REPO_NAME}
git fetch caikit 
git fetch caikit ${UPSTREAM_TARGET_TAG}
git checkout -b caikit_tgis_backend_${UPSTREAM_TARGET_TAG} caikit/${UPSTREAM_TARGET_TAG}
git checkout -b ${TODAY_DATE}_sync_main origin/main
git merge caikit_tgis_backend_${UPSTREAM_TARGET_TAG}  

Fix conflict(Manual)

Commit Sync source

if [[ $TARGET_REPO_NAME != "caikit-tgis-backend" ]]; then
  go mod tidy
fi 
git add .
git commit -S -s -m "Sync upstream ${UPSTREAM_TARGET_TAG}"

Build/Push fast tag

GIT_COMMIT=$(git rev-parse HEAD) 
BUILD_ID=$(date '+%Y%m%d')-$(git rev-parse HEAD | cut -c -5)
IMAGE_TAG_VERSION=fast 
#IMAGE_TAG=${IMAGE_TAG_VERSION}-$(git branch --show-current)_${BUILD_ID}
docker build -t quay.io/opendatahub/${TARGET_REPO_NAME}:${IMAGE_TAG_VERSION} \
     --build-arg imageVersion=${IMAGE_TAG} \
     --build-arg buildId=${BUILD_ID} \
     --build-arg commitSha=${GIT_COMMIT} .
docker push quay.io/opendatahub/${TARGET_REPO_NAME}:${IMAGE_TAG_VERSION}
israel-hdez commented 12 months ago

Closing old task, already done.