mirror of
https://gitlab.com/hibou-io/hibou-odoo/suite.git
synced 2025-01-20 12:37:31 +02:00
Initial pipeline for 10.0
This commit is contained in:
1
.dockerignore
Normal file
1
.dockerignore
Normal file
@@ -0,0 +1 @@
|
||||
.git
|
||||
61
.gitlab-ci.yml
Normal file
61
.gitlab-ci.yml
Normal file
@@ -0,0 +1,61 @@
|
||||
image: docker:stable
|
||||
services:
|
||||
- docker:dind
|
||||
|
||||
stages:
|
||||
- build
|
||||
- trigger
|
||||
|
||||
variables:
|
||||
DOCKER_HOST: tcp://docker:2375
|
||||
DOCKER_DRIVER: overlay2
|
||||
CONTAINER_IMAGE: registry.gitlab.com/hibou-io/hibou-odoo/suite
|
||||
GITLAB_BASE_URL: https://gitlab.com
|
||||
ENTERPRISE_PROJECT_ID: 10004796
|
||||
|
||||
before_script:
|
||||
- RELEASE=$(echo $CI_COMMIT_REF_NAME | sed "s{.*\/\(.*\)\/.*{\1{g")
|
||||
- IMAGE_TAG=$(echo $CI_COMMIT_REF_SLUG | sed "s/^\([[:digit:]][[:digit:]]\)-\([[:digit:]]\)/\1\.\2/g")
|
||||
- docker login -u gitlab-ci-token -p $CI_JOB_TOKEN registry.gitlab.com
|
||||
|
||||
merge_request:
|
||||
variables:
|
||||
GIT_STRATEGY: none
|
||||
stage: build
|
||||
only:
|
||||
- /(^new\/)|(^mig\/)|(^imp\/)|(^fix\/)/
|
||||
script:
|
||||
- docker pull registry.gitlab.com/hibou-io/hibou-odoo/flow
|
||||
- docker tag registry.gitlab.com/hibou-io/hibou-odoo/flow flow
|
||||
- ENVS=`env | grep "CI_\|GITLAB_" | sed -n '/^[^\t]/s/=.*//p' | sed '/^$/d' | sed 's/^/-e /g' | tr '\n' ' '`
|
||||
- docker run $ENVS flow gitlab-automerge --target-branch "${RELEASE}-test" --automerge
|
||||
- docker run $ENVS flow gitlab-automerge --remove-source
|
||||
|
||||
build:
|
||||
variables:
|
||||
GIT_SUBMODULE_STRATEGY: recursive
|
||||
stage: build
|
||||
script:
|
||||
- sed -i "s/RELEASE/$RELEASE/g" Dockerfile-GitLab
|
||||
- docker build --pull -t $CONTAINER_IMAGE:$IMAGE_TAG -f Dockerfile-GitLab .
|
||||
- docker push $CONTAINER_IMAGE:$IMAGE_TAG
|
||||
|
||||
publish:
|
||||
stage: build
|
||||
script:
|
||||
- docker pull registry.gitlab.com/hibou-io/hibou-odoo/flow
|
||||
- docker tag registry.gitlab.com/hibou-io/hibou-odoo/flow flow
|
||||
- ENVS=`env | grep "CI_\|GITLAB_" | sed -n '/^[^\t]/s/=.*//p' | sed '/^$/d' | sed 's/^/-e /g' | tr '\n' ' '`
|
||||
- docker run -v $PWD:/src $ENVS flow odoo-publish -n "Hibou Odoo Suite" -v $RELEASE
|
||||
only:
|
||||
- /^\d\d\.\d/
|
||||
|
||||
trigger:
|
||||
variables:
|
||||
GIT_STRATEGY: none
|
||||
stage: trigger
|
||||
script:
|
||||
- docker run byrnedo/alpine-curl curl --request POST --form "token=$CI_JOB_TOKEN" --form ref=$RELEASE $GITLAB_BASE_URL/api/v4/projects/$ENTERPRISE_PROJECT_ID/trigger/pipeline
|
||||
only:
|
||||
- /^\d\d\.\d/
|
||||
|
||||
8
Dockerfile
Normal file
8
Dockerfile
Normal file
@@ -0,0 +1,8 @@
|
||||
FROM hibou/hibou-odoo:10.0
|
||||
|
||||
USER 104
|
||||
COPY --chown=104 . /opt/odoo/hibou-suite
|
||||
RUN rm /etc/odoo/odoo.conf \
|
||||
&& cp /opt/odoo/hibou-suite/debian/odoo.conf /etc/odoo/odoo.conf \
|
||||
;
|
||||
|
||||
8
Dockerfile-GitLab
Normal file
8
Dockerfile-GitLab
Normal file
@@ -0,0 +1,8 @@
|
||||
FROM registry.gitlab.com/hibou-io/hibou-odoo/odoo:RELEASE
|
||||
|
||||
USER 104
|
||||
COPY --chown=104 . /opt/odoo/hibou-suite
|
||||
RUN rm /etc/odoo/odoo.conf \
|
||||
&& cp /opt/odoo/hibou-suite/debian/odoo.conf /etc/odoo/odoo.conf \
|
||||
;
|
||||
|
||||
37
debian/odoo.conf
vendored
Normal file
37
debian/odoo.conf
vendored
Normal file
@@ -0,0 +1,37 @@
|
||||
[options]
|
||||
addons_path = /opt/odoo/hibou-suite,/opt/odoo/odoo/addons
|
||||
data_dir = /var/lib/odoo
|
||||
; admin_passwd = admin
|
||||
; csv_internal_sep = ,
|
||||
; db_maxconn = 64
|
||||
; db_name = False
|
||||
; db_template = template1
|
||||
; dbfilter = .*
|
||||
; debug_mode = False
|
||||
; email_from = False
|
||||
; limit_memory_hard = 2684354560
|
||||
; limit_memory_soft = 2147483648
|
||||
; limit_request = 8192
|
||||
; limit_time_cpu = 60
|
||||
; limit_time_real = 120
|
||||
; list_db = True
|
||||
; log_db = False
|
||||
; log_handler = [':INFO']
|
||||
; log_level = info
|
||||
; logfile = None
|
||||
; longpolling_port = 8072
|
||||
; max_cron_threads = 2
|
||||
; osv_memory_age_limit = 1.0
|
||||
; osv_memory_count_limit = False
|
||||
; smtp_password = False
|
||||
; smtp_port = 25
|
||||
; smtp_server = localhost
|
||||
; smtp_ssl = False
|
||||
; smtp_user = False
|
||||
; workers = 0
|
||||
; xmlrpc = True
|
||||
; xmlrpc_interface =
|
||||
; xmlrpc_port = 8069
|
||||
; xmlrpcs = True
|
||||
; xmlrpcs_interface =
|
||||
; xmlrpcs_port = 8071
|
||||
Reference in New Issue
Block a user