update
This commit is contained in:
parent
eb01adca24
commit
1fc47c4e3c
6
Jenkinsfile
vendored
6
Jenkinsfile
vendored
@ -6,17 +6,17 @@ node('Node-Dev-100163') {
|
|||||||
}
|
}
|
||||||
stage('Build') {
|
stage('Build') {
|
||||||
sh 'make install'
|
sh 'make install'
|
||||||
sh 'make build-image'
|
sh 'make build_image'
|
||||||
}
|
}
|
||||||
stage('Start Docker Container'){
|
stage('Start Docker Container'){
|
||||||
sh 'make clean_up'
|
sh 'make clean_up'
|
||||||
sh 'make run-server-docker'
|
sh 'make run_server_docker'
|
||||||
}
|
}
|
||||||
stage('Testing') {
|
stage('Testing') {
|
||||||
sh 'make run_test_docker'
|
sh 'make run_test_docker'
|
||||||
}
|
}
|
||||||
stage('Publish') {
|
stage('Publish') {
|
||||||
sh 'make push-image'
|
sh 'make push_image'
|
||||||
}
|
}
|
||||||
currentBuild.result = "SUCCESS" // Set success status after all stages complete
|
currentBuild.result = "SUCCESS" // Set success status after all stages complete
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
|
8
Makefile
8
Makefile
@ -24,13 +24,13 @@ run_test_local:
|
|||||||
odoo-bin -i all_modules --log-level=test --test-enable -d testdb --stop-after-init --config=${CONFIG}
|
odoo-bin -i all_modules --log-level=test --test-enable -d testdb --stop-after-init --config=${CONFIG}
|
||||||
gen_config:
|
gen_config:
|
||||||
${PWD}/setup/init_config.sh ${ODOO_IMAGE} ${TAG} ${CONTAINER_ID}
|
${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}
|
DOCKER_BUILDKIT=1 ${DOCKER_BUILD} . --progress plain --tag ${ODOO_IMAGE}:${TAG}
|
||||||
push-image:
|
push_image:
|
||||||
$(DOCKER_PUSH) ${ODOO_IMAGE}:${TAG}
|
$(DOCKER_PUSH) ${ODOO_IMAGE}:${TAG}
|
||||||
run-server-local:
|
run_server_local:
|
||||||
${PYTHON} odoo-bin --config=${CONFIG}
|
${PYTHON} odoo-bin --config=${CONFIG}
|
||||||
run-server-docker:
|
run_server_docker:
|
||||||
@if ! docker ps | grep -q "${CONTAINER_ID}"; then \
|
@if ! docker ps | grep -q "${CONTAINER_ID}"; then \
|
||||||
echo "Container not found. Running docker-compose up -d"; \
|
echo "Container not found. Running docker-compose up -d"; \
|
||||||
else \
|
else \
|
||||||
|
@ -57,6 +57,7 @@ def main():
|
|||||||
config_path=args.config
|
config_path=args.config
|
||||||
app_port = 10017
|
app_port = 10017
|
||||||
# Copy template files
|
# 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}/odoo.conf.template', f'{base_dir}/etc/odoo.conf')
|
||||||
shutil.copyfile(f'{base_dir}/env.template', f'{base_dir}/.env')
|
shutil.copyfile(f'{base_dir}/env.template', f'{base_dir}/.env')
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user