This commit is contained in:
hoangvv 2025-01-07 18:31:57 +07:00
parent eb01adca24
commit 1fc47c4e3c
3 changed files with 8 additions and 7 deletions

6
Jenkinsfile vendored
View File

@ -6,17 +6,17 @@ node('Node-Dev-100163') {
}
stage('Build') {
sh 'make install'
sh 'make build-image'
sh 'make build_image'
}
stage('Start Docker Container'){
sh 'make clean_up'
sh 'make run-server-docker'
sh 'make run_server_docker'
}
stage('Testing') {
sh 'make run_test_docker'
}
stage('Publish') {
sh 'make push-image'
sh 'make push_image'
}
currentBuild.result = "SUCCESS" // Set success status after all stages complete
} catch (err) {

View File

@ -24,13 +24,13 @@ run_test_local:
odoo-bin -i all_modules --log-level=test --test-enable -d testdb --stop-after-init --config=${CONFIG}
gen_config:
${PWD}/setup/init_config.sh ${ODOO_IMAGE} ${TAG} ${CONTAINER_ID}
build-image: gen_config
build_image: gen_config
DOCKER_BUILDKIT=1 ${DOCKER_BUILD} . --progress plain --tag ${ODOO_IMAGE}:${TAG}
push-image:
push_image:
$(DOCKER_PUSH) ${ODOO_IMAGE}:${TAG}
run-server-local:
run_server_local:
${PYTHON} odoo-bin --config=${CONFIG}
run-server-docker:
run_server_docker:
@if ! docker ps | grep -q "${CONTAINER_ID}"; then \
echo "Container not found. Running docker-compose up -d"; \
else \

View File

@ -57,6 +57,7 @@ def main():
config_path=args.config
app_port = 10017
# Copy template files
color_log.Show(3,f"Copy {base_dir}/odoo.conf.template to {base_dir}/etc/odoo.conf")
shutil.copyfile(f'{base_dir}/odoo.conf.template', f'{base_dir}/etc/odoo.conf')
shutil.copyfile(f'{base_dir}/env.template', f'{base_dir}/.env')