Merge branch 'main' into develop

This commit is contained in:
hoangvv 2025-01-08 00:49:27 +07:00
commit 13404e7b1e
3 changed files with 7 additions and 2 deletions

1
Jenkinsfile vendored
View File

@ -5,6 +5,7 @@ node('Node-Dev-100163') {
checkout scm
}
stage('Cleanup') {
sh "make update_tag CURR_BRANCH=${env.BRANCH_NAME}"
sh 'make clean_up'
}
stage('Build') {

View File

@ -10,10 +10,9 @@ DOCKER_PUSH=$(DOCKERCMD) push
DOCKER_IMAGE=$(DOCKERCMD) image
DEPLOY_PATH=${PWD}/deployment
SETUP_PATH=${PWD}/setup
HASH := $(shell git rev-parse HEAD)
CONFIG=odoo.conf
ODOO_IMAGE=hub.nextzenos.com/nexterp/odoo
TAG := develop
TAG := $(shell rev-parse --abbrev-ref HEAD)
CONTAINER_ID=odoo-${TAG}
install:
sudo apt -y update && \
@ -39,6 +38,8 @@ run_server_docker:
fi
cd ${DEPLOY_PATH} &&\
${DOCKER_COMPOSE_CMD} up -d
update_tag:
${SETUP_PATH}/update_tag.sh $(CURR_BRANCH)
restore_database:
@echo "Checking for backup.zip in container..."
@if sudo docker exec ${CONTAINER_ID} test -f /etc/odoo/backup/backup.zip; then \

3
setup/update_tag.sh Executable file
View File

@ -0,0 +1,3 @@
#!/usr/bin/bash
set +x
sed -i "s/TAG := \$(shell rev-parse --abbrev-ref HEAD)/TAG := $1/g" Makefile