Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
MaarchCourrier
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Redmine
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Harbor Registry
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Maarch
MaarchCourrier
Commits
22831beb
Commit
22831beb
authored
7 years ago
by
Giovannoni Laurent
Browse files
Options
Downloads
Patches
Plain Diff
test ci
parent
f1ec72e1
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
.gitlab-ci.yml
+44
-0
44 additions, 0 deletions
.gitlab-ci.yml
ci/docker_install_database.sh
+14
-0
14 additions, 0 deletions
ci/docker_install_database.sh
ci/docker_install_php.sh
+14
-0
14 additions, 0 deletions
ci/docker_install_php.sh
with
72 additions
and
0 deletions
.gitlab-ci.yml
0 → 100644
+
44
−
0
View file @
22831beb
services
:
-
postgres:latest
variables
:
POSTGRES_DB
:
"
MaarchCourrier"
POSTGRES_USER
:
maarch
POSTGRES_PASSWORD
:
"
"
stages
:
-
test
before_script
:
-
apt-get update > /dev/null
-
apt-get install wget -yqq > /dev/null
-
apt-get install npm -yqq > /dev/null
-
apt-get install git -yqq > /dev/null
-
bash ci/docker_install_php.sh > /dev/null
-
bash ci/docker_install_database.sh > /dev/null
-
wget https://composer.github.io/installer.sig -O - -q | tr -d '\n' > installer.sig
-
php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"
-
php -r "if (hash_file('SHA384', 'composer-setup.php') === file_get_contents('installer.sig')) { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;"
-
php composer-setup.php
-
php -r "unlink('composer-setup.php'); unlink('installer.sig');"
-
php composer.phar install
-
mv composer.phar /usr/local/bin/composer
-
chmod +x /usr/local/bin/composer
job_php-7.0
:
image
:
php:7.0-apache
stage
:
test
script
:
-
mkdir -p /var/www/html/
-
cp -R /builds/maarch/MaarchCourrier/ /var/www/html/
-
cd /var/www/html/MaarchCourrier
-
mkdir -p /var/www/html/MaarchCourrier
-
composer -n install
-
npm install --production
-
sed 's/<databaseserver>.*<\/databaseserver>/<databaseserver>postgres<\/databaseserver>/;s/<databasepassword>.*<\/databasepassword>/<databasepassword><\/databasepassword>/;s/<databasename>.*<\/databasename>/<databasename>MaarchCourrier<\/databasename>/;s/<databaseuser>.*<\/databaseuser>/<databaseuser>maarch<\/databaseuser>/' apps/maarch_entreprise/xml/config.xml.default > apps/maarch_entreprise/xml/config.xml
-
curl --location -s --output /usr/local/bin/phpunit https://phar.phpunit.de/phpunit.phar
-
chmod +x /usr/local/bin/phpunit
#- cd App/MaarchRM
-
phpunit --coverage-text -c phpunit.xml
only
:
-
gitlab-ci-test
This diff is collapsed.
Click to expand it.
ci/docker_install_database.sh
0 → 100644
+
14
−
0
View file @
22831beb
#!/bin/bash
# We need to install dependencies only for Docker
[[
!
-e
/.dockerenv
]]
&&
exit
0
set
-xe
apt-get
install
postgresql-client
-yqq
#export PGPASSWORD=$POSTGRES_PASSWORD
psql
-h
"postgres"
-U
"
$POSTGRES_USER
"
-d
"
$POSTGRES_DB
"
-w
< /builds/maarch/MaarchCourrier/sql/structure.sql
psql
-h
"postgres"
-U
"
$POSTGRES_USER
"
-d
"
$POSTGRES_DB
"
-w
< /builds/maarch/MaarchCourrier/sql/data_fr.sql
This diff is collapsed.
Click to expand it.
ci/docker_install_php.sh
0 → 100644
+
14
−
0
View file @
22831beb
#!/bin/bash
# We need to install dependencies only for Docker
[[
!
-e
/.dockerenv
]]
&&
exit
0
set
-xe
apt-get
install
-y
libpq-dev libxml2-dev libxslt1-dev
\
&&
docker-php-ext-configure pgsql
-with-pgsql
=
/usr/local/pgsql
\
&&
docker-php-ext-install pdo_pgsql pgsql xsl zip
#&& pecl install xdebug \
#&& docker-php-ext-enable xdebug
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment