Merge branch 'main' into develop
This commit is contained in:
commit
13404e7b1e
1
Jenkinsfile
vendored
1
Jenkinsfile
vendored
@ -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') {
|
||||
|
5
Makefile
5
Makefile
@ -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
3
setup/update_tag.sh
Executable file
@ -0,0 +1,3 @@
|
||||
#!/usr/bin/bash
|
||||
set +x
|
||||
sed -i "s/TAG := \$(shell rev-parse --abbrev-ref HEAD)/TAG := $1/g" Makefile
|
Loading…
Reference in New Issue
Block a user