mirror of
https://github.com/cgrates/cgrates.git
synced 2026-02-15 13:19:53 +05:00
Changes and addittion for Drone CI
This commit is contained in:
committed by
Dan Christian Bogos
parent
d4f6086322
commit
9e92552df5
227
.drone.yml
227
.drone.yml
@@ -2,56 +2,217 @@ kind: pipeline
|
||||
type: docker
|
||||
name: unit
|
||||
|
||||
|
||||
workspace:
|
||||
path: /cgrates
|
||||
|
||||
steps:
|
||||
- name: unit
|
||||
pull: never
|
||||
image: cgrates-integration
|
||||
image: cgrates-it-entrypoint
|
||||
commands:
|
||||
- docker-entrypoint.sh
|
||||
- ./test.sh
|
||||
- name: notify
|
||||
pull: never
|
||||
image: trial97/drone-email
|
||||
image: drillster/drone-email
|
||||
settings:
|
||||
from: cgrates.test01@gmail.com
|
||||
credentials:
|
||||
from_secret: credentials
|
||||
token:
|
||||
from_secret: token
|
||||
host: smtp.gmail.com
|
||||
username:
|
||||
from_secret: email_username
|
||||
password:
|
||||
from_secret: email_password
|
||||
subject: >
|
||||
[{{ build.status }}]
|
||||
{{ repo.owner }}/{{ repo.name }}
|
||||
({{ commit.branch }})
|
||||
body: >
|
||||
Build number: # {{ build.number }}
|
||||
Build link: {{ build.link }}
|
||||
Build started: {{ build.started }}
|
||||
Build ended: {{ build.finished }}
|
||||
Commit author: {{ commit.author.name }}
|
||||
Commit message: {{ commit.message }}
|
||||
Commit branch: {{ commit.branch }}
|
||||
Commit link: {{ commit.link }}
|
||||
recipients_file: recipients
|
||||
recipients_only: true
|
||||
when:
|
||||
status: [ changed, failure ]
|
||||
status: failure
|
||||
|
||||
---
|
||||
kind: pipeline
|
||||
type: docker
|
||||
name: integration-internal
|
||||
|
||||
|
||||
# ---
|
||||
# kind: pipeline
|
||||
# type: docker
|
||||
# name: default
|
||||
workspace:
|
||||
path: /cgrates
|
||||
|
||||
# workspace:
|
||||
# path: /cgrates
|
||||
steps:
|
||||
- name: integration-internal
|
||||
pull: never
|
||||
image: cgrates-it-entrypoint
|
||||
commands:
|
||||
- docker-entrypoint.sh
|
||||
- ./integration_test.sh -dbtype=*internal
|
||||
- name: notify
|
||||
pull: never
|
||||
image: drillster/drone-email
|
||||
settings:
|
||||
from: cgrates.test01@gmail.com
|
||||
host: smtp.gmail.com
|
||||
username:
|
||||
from_secret: email_username
|
||||
password:
|
||||
from_secret: email_password
|
||||
subject: >
|
||||
[{{ build.status }}]
|
||||
{{ repo.owner }}/{{ repo.name }}
|
||||
({{ commit.branch }})
|
||||
body: >
|
||||
Build number: # {{ build.number }}
|
||||
Build link: {{ build.link }}
|
||||
Build started: {{ build.started }}
|
||||
Build ended: {{ build.finished }}
|
||||
Commit author: {{ commit.author.name }}
|
||||
Commit message: {{ commit.message }}
|
||||
Commit branch: {{ commit.branch }}
|
||||
Commit link: {{ commit.link }}
|
||||
recipients_file: recipients
|
||||
recipients_only: true
|
||||
when:
|
||||
status: failure
|
||||
|
||||
# steps:
|
||||
# - name: integration
|
||||
# pull: never
|
||||
# image: cgrates-integration
|
||||
# commands:
|
||||
# - docker-entrypoint.sh
|
||||
# - ./integration_test.sh
|
||||
---
|
||||
kind: pipeline
|
||||
type: docker
|
||||
name: integration-mysql
|
||||
|
||||
# - name: notify
|
||||
# pull: never
|
||||
# image: trial97/drone-email
|
||||
# settings:
|
||||
# from: cgrates.test01@gmail.com
|
||||
# credentials:
|
||||
# from_secret: credentials
|
||||
# token:
|
||||
# from_secret: token
|
||||
# when:
|
||||
# status: [ changed, failure ]
|
||||
|
||||
# depends_on:
|
||||
# - unit
|
||||
workspace:
|
||||
path: /cgrates
|
||||
|
||||
steps:
|
||||
- name: integration-mysql
|
||||
pull: never
|
||||
image: cgrates-it-entrypoint
|
||||
commands:
|
||||
- docker-entrypoint.sh
|
||||
- ./integration_test.sh -dbtype=*mysql
|
||||
- name: notify
|
||||
pull: never
|
||||
image: drillster/drone-email
|
||||
settings:
|
||||
from: cgrates.test01@gmail.com
|
||||
host: smtp.gmail.com
|
||||
username:
|
||||
from_secret: email_username
|
||||
password:
|
||||
from_secret: email_password
|
||||
subject: >
|
||||
[{{ build.status }}]
|
||||
{{ repo.owner }}/{{ repo.name }}
|
||||
({{ commit.branch }})
|
||||
body: >
|
||||
Build number: # {{ build.number }}
|
||||
Build link: {{ build.link }}
|
||||
Build started: {{ build.started }}
|
||||
Build ended: {{ build.finished }}
|
||||
Commit author: {{ commit.author.name }}
|
||||
Commit message: {{ commit.message }}
|
||||
Commit branch: {{ commit.branch }}
|
||||
Commit link: {{ commit.link }}
|
||||
recipients_file: recipients
|
||||
recipients_only: true
|
||||
when:
|
||||
status: failure
|
||||
|
||||
---
|
||||
kind: pipeline
|
||||
type: docker
|
||||
name: integration-mongo
|
||||
|
||||
|
||||
workspace:
|
||||
path: /cgrates
|
||||
|
||||
steps:
|
||||
- name: integration-mongo
|
||||
pull: never
|
||||
image: cgrates-it-entrypoint
|
||||
commands:
|
||||
- docker-entrypoint.sh
|
||||
- ./integration_test.sh -dbtype=*mongo
|
||||
- name: notify
|
||||
pull: never
|
||||
image: drillster/drone-email
|
||||
settings:
|
||||
from: cgrates.test01@gmail.com
|
||||
host: smtp.gmail.com
|
||||
username:
|
||||
from_secret: email_username
|
||||
password:
|
||||
from_secret: email_password
|
||||
subject: >
|
||||
[{{ build.status }}]
|
||||
{{ repo.owner }}/{{ repo.name }}
|
||||
({{ commit.branch }})
|
||||
body: >
|
||||
Build number: # {{ build.number }}
|
||||
Build link: {{ build.link }}
|
||||
Build started: {{ build.started }}
|
||||
Build ended: {{ build.finished }}
|
||||
Commit author: {{ commit.author.name }}
|
||||
Commit message: {{ commit.message }}
|
||||
Commit branch: {{ commit.branch }}
|
||||
Commit link: {{ commit.link }}
|
||||
recipients_file: recipients
|
||||
recipients_only: true
|
||||
when:
|
||||
status: failure
|
||||
|
||||
---
|
||||
kind: pipeline
|
||||
type: docker
|
||||
name: integration-postgres
|
||||
|
||||
|
||||
workspace:
|
||||
path: /cgrates
|
||||
|
||||
steps:
|
||||
- name: integration-postgres
|
||||
pull: never
|
||||
image: cgrates-it-entrypoint
|
||||
commands:
|
||||
- docker-entrypoint.sh
|
||||
- ./integration_test.sh -dbtype=*postgres
|
||||
- name: notify
|
||||
pull: never
|
||||
image: drillster/drone-email
|
||||
settings:
|
||||
from: cgrates.test01@gmail.com
|
||||
host: smtp.gmail.com
|
||||
username:
|
||||
from_secret: email_username
|
||||
password:
|
||||
from_secret: email_password
|
||||
subject: >
|
||||
[{{ build.status }}]
|
||||
{{ repo.owner }}/{{ repo.name }}
|
||||
({{ commit.branch }})
|
||||
body: >
|
||||
Build number: # {{ build.number }}
|
||||
Build link: {{ build.link }}
|
||||
Build started: {{ build.started }}
|
||||
Build ended: {{ build.finished }}
|
||||
Commit author: {{ commit.author.name }}
|
||||
Commit message: {{ commit.message }}
|
||||
Commit branch: {{ commit.branch }}
|
||||
Commit link: {{ commit.link }}
|
||||
recipients_file: recipients
|
||||
recipients_only: true
|
||||
when:
|
||||
status: failure
|
||||
@@ -4,7 +4,7 @@ RUN groupadd -r mongodb && useradd -r -g mongodb mongodb
|
||||
RUN groupadd -r redis && useradd -r -g redis redis
|
||||
RUN groupadd -r kafka && useradd -r -g kafka kafka
|
||||
|
||||
RUN mkdir -p /usr/share/man/man1 /var/spool/cgrates/ers/in /var/spool/cgrates/ers/out /var/spool/cgrates/cdre/csv /var/spool/cgrates/cdre/fwv /var/spool/cgrates/tpe /var/spool/cgrates/failed_posts /var/spool/cgrates/analyzers /run /data/configdb /data/db /kafka /logs
|
||||
RUN mkdir -p /usr/share/cgrates/conf /usr/share/man/man1 /var/spool/cgrates/ers/in /var/spool/cgrates/ers/out /var/spool/cgrates/cdre/csv /var/spool/cgrates/cdre/fwv /var/spool/cgrates/tpe /var/spool/cgrates/failed_posts /var/spool/cgrates/analyzers /run /data/configdb /data/db /kafka /logs
|
||||
|
||||
RUN echo 'debconf debconf/frontend select Noninteractive' | debconf-set-selections
|
||||
|
||||
@@ -18,8 +18,11 @@ RUN echo "deb http://repo.mongodb.org/apt/debian buster/mongodb-org/4.4 main" |
|
||||
RUN wget -qO - https://www.postgresql.org/media/keys/ACCC4CF8.asc | apt-key add -
|
||||
RUN echo "deb http://apt.postgresql.org/pub/repos/apt buster-pgdg main" | tee /etc/apt/sources.list.d/pgdg.list
|
||||
|
||||
RUN wget -qO - https://github.com/rabbitmq/signing-keys/releases/download/2.0/rabbitmq-release-signing-key.asc | apt-key add -
|
||||
RUN printf "deb https://dl.bintray.com/rabbitmq-erlang/debian buster erlang\ndeb https://dl.bintray.com/rabbitmq/debian buster main" | tee /etc/apt/sources.list.d/bintray.rabbitmq.list
|
||||
RUN wget https://packages.erlang-solutions.com/erlang-solutions_1.0_all.deb
|
||||
RUN dpkg -i erlang-solutions_1.0_all.deb
|
||||
RUN apt-get update
|
||||
RUN apt-get install -y erlang erlang-nox
|
||||
RUN curl -s https://packagecloud.io/install/repositories/rabbitmq/rabbitmq-server/script.deb.sh | bash
|
||||
|
||||
RUN apt-get update
|
||||
RUN apt-get install -y mongodb-org postgresql rabbitmq-server
|
||||
|
||||
@@ -7,7 +7,8 @@ export KAFKA_HEAP_OPTS="-Xmx100M -Xms100M"
|
||||
/kafka/bin/kafka-server-start.sh -daemon /kafka/config/server.properties
|
||||
|
||||
rsyslogd -f /etc/rsyslogd.conf
|
||||
pg_ctlcluster 13 main start &
|
||||
version=$(ls /var/lib/postgresql)
|
||||
pg_ctlcluster $version main start &
|
||||
mongod --bind_ip 127.0.0.1 --logpath /logs/mongodb.log &
|
||||
redis-server /etc/redis/redis.conf &
|
||||
MYSQL_ROOT_PASSWORD="CGRateS.org" /scripts/mariadb-ep.sh mysqld > /logs/mariadb_script.log 2>&1
|
||||
@@ -56,4 +57,4 @@ mysql -u root -pCGRateS.org -h localhost < /scripts/mysql/create_db_with_users_e
|
||||
mysql -u root -pCGRateS.org -h localhost -D cgrates < /scripts/mysql/create_cdrs_tables.sql > /dev/null 2>&1
|
||||
mysql -u root -pCGRateS.org -h localhost -D cgrates < /scripts/mysql/create_tariffplan_tables.sql > /dev/null 2>&1
|
||||
|
||||
ln -s /cgrates/data /usr/share/cgrates
|
||||
cp -r data/. /usr/share/cgrates
|
||||
1
data/docker/integration/scripts/mongo
Symbolic link
1
data/docker/integration/scripts/mongo
Symbolic link
@@ -0,0 +1 @@
|
||||
../../../storage/mongo/
|
||||
1
data/docker/integration/scripts/mysql
Symbolic link
1
data/docker/integration/scripts/mysql
Symbolic link
@@ -0,0 +1 @@
|
||||
../../../storage/mysql/
|
||||
@@ -1,9 +0,0 @@
|
||||
|
||||
--
|
||||
-- Sample db and users creation. Replace here with your own details
|
||||
--
|
||||
|
||||
CREATE DATABASE cgrates2;
|
||||
|
||||
GRANT ALL on cgrates.* TO 'cgrates'@'127.0.0.1' IDENTIFIED BY 'CGRateS.org';
|
||||
GRANT ALL on cgrates2.* TO 'cgrates'@'127.0.0.1' IDENTIFIED BY 'CGRateS.org';
|
||||
1
data/docker/integration/scripts/postgres
Symbolic link
1
data/docker/integration/scripts/postgres
Symbolic link
@@ -0,0 +1 @@
|
||||
../../../storage/postgres/
|
||||
5
recipients
Normal file
5
recipients
Normal file
@@ -0,0 +1,5 @@
|
||||
andrei.andronache@itsyscom.com
|
||||
alexandru.tripon@itsyscom.com
|
||||
ionut.boangiu@itsyscom.com
|
||||
adrian.porosnicu@itsyscom.com
|
||||
nickolas.filip@itsyscom.com
|
||||
Reference in New Issue
Block a user