.gitlab-ci.yml 2.28 KB
Newer Older
Giovannoni Laurent's avatar
Giovannoni Laurent committed
1 2
services:
  - postgres:latest
Giovannoni Laurent's avatar
Giovannoni Laurent committed
3
  - httpd:latest
Giovannoni Laurent's avatar
Giovannoni Laurent committed
4 5 6 7 8 9

variables:
  POSTGRES_DB: "MaarchCourrier"
  POSTGRES_USER: maarch
  POSTGRES_PASSWORD: ""

maarch's avatar
maarch committed
10 11 12 13
stages:
  - test

before_script:
Giovannoni Laurent's avatar
Giovannoni Laurent committed
14
  - service apache2 start
Giovannoni Laurent's avatar
Giovannoni Laurent committed
15
  - apt-get update > /dev/null
Giovannoni Laurent's avatar
Giovannoni Laurent committed
16
  - apt-get install apt-utils -yqq > /dev/null
Giovannoni Laurent's avatar
Giovannoni Laurent committed
17
  - bash ci/docker_install_php.sh > /dev/null
18
# - bash ci/docker_install_maarchcourrier.sh > /dev/null
Giovannoni Laurent's avatar
Giovannoni Laurent committed
19
  - bash ci/docker_install_mail_server.sh > /dev/null
Giovannoni Laurent's avatar
Giovannoni Laurent committed
20
  - bash ci/send_simple_mail.sh > /dev/null
Giovannoni Laurent's avatar
Giovannoni Laurent committed
21

Giovannoni Laurent's avatar
Giovannoni Laurent committed
22 23
job_php-7.3:
  image: php:7.3-apache
Giovannoni Laurent's avatar
Giovannoni Laurent committed
24 25
  stage: test
  script:
Giovannoni Laurent's avatar
Giovannoni Laurent committed
26 27 28
    - mkdir -p /opt/maarch/
    - cp -R /builds/maarch/MaarchCapture/ /opt/maarch/
    - mkdir -p /opt/maarch/MaarchCapture/files/TEST_IMPORT/backup/
Giovannoni Laurent's avatar
Giovannoni Laurent committed
29
    - cp /opt/maarch/MaarchCapture/config/samples/Capture_ci.xml.default /opt/maarch/MaarchCapture/config/Capture.xml
Giovannoni Laurent's avatar
Giovannoni Laurent committed
30
    - cp /opt/maarch/MaarchCapture/modules/MailCapture/samples/MailCapture_ci.xml.default /opt/maarch/MaarchCapture/modules/MailCapture/MailCapture_ci.xml
Giovannoni Laurent's avatar
Giovannoni Laurent committed
31
    - cp /opt/maarch/MaarchCapture/modules/MaarchWSClient/samples/MaarchWSClient_ci.xml.default /opt/maarch/MaarchCapture/modules/MaarchWSClient/MaarchWSClient_ci.xml
Giovannoni Laurent's avatar
Giovannoni Laurent committed
32 33
    - cp /opt/maarch/MaarchCapture/scripts/samples/linux/MAARCH_CI_SCAN.sh.default /opt/maarch/MaarchCapture/scripts/MAARCH_CI_SCAN.sh
    - cp /opt/maarch/MaarchCapture/scripts/samples/linux/MAARCH_CI_MAIL.sh.default /opt/maarch/MaarchCapture/scripts/MAARCH_CI_MAIL.sh
Giovannoni Laurent's avatar
Giovannoni Laurent committed
34 35
    - cp /opt/maarch/MaarchCapture/scripts/samples/linux/MAARCH_CI_SCAN_TO_MC.sh.default /opt/maarch/MaarchCapture/scripts/MAARCH_CI_SCAN_TO_MC.sh
    - cp /opt/maarch/MaarchCapture/scripts/samples/linux/MAARCH_CI_MAIL_TO_MC.sh.default /opt/maarch/MaarchCapture/scripts/MAARCH_CI_MAIL_TO_MC.sh
Giovannoni Laurent's avatar
Giovannoni Laurent committed
36
    - cp /opt/maarch/MaarchCapture/ci/samples/sample.pdf /opt/maarch/MaarchCapture/files/TEST_IMPORT/
Giovannoni Laurent's avatar
Giovannoni Laurent committed
37 38 39 40
    - chown -R www-data. /opt/maarch/
    - chown -R www-data. /var/www/html/
    - chmod -R 775 /opt/maarch/
    - chmod -R 775 /var/www/html/
Giovannoni Laurent's avatar
Giovannoni Laurent committed
41
    - bash /opt/maarch/MaarchCapture/scripts/MAARCH_CI_SCAN.sh
Giovannoni Laurent's avatar
Giovannoni Laurent committed
42
    - bash /opt/maarch/MaarchCapture/scripts/MAARCH_CI_MAIL.sh
Giovannoni Laurent's avatar
Giovannoni Laurent committed
43 44 45
    - bash /opt/maarch/MaarchCapture/ci/send_simple_mail.sh
    - bash /opt/maarch/MaarchCapture/scripts/MAARCH_CI_SCAN_TO_MC.sh
    - bash /opt/maarch/MaarchCapture/scripts/MAARCH_CI_MAIL_TO_MC.sh
Giovannoni Laurent's avatar
Giovannoni Laurent committed
46 47
    - ls -al /opt/maarch/MaarchCapture/files/*
    
48 49
  only:
    - develop