Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Latest commit

 

History

History
History
93 lines (75 loc) · 2.98 KB

File metadata and controls

93 lines (75 loc) · 2.98 KB
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
version: 0.2
phases:
install:
commands:
# This file configures apt to remove it's cache after installs - we want this cache, so we remove this config
- rm -f /etc/apt/apt.conf.d/docker-clean
# Install required packages
- |
set -e
export DEBIAN_FRONTEND=noninteractive
#Install php7.1
apt-get update
apt-get install -y software-properties-common
LC_ALL=C.UTF-8 add-apt-repository -y ppa:ondrej/php
apt-get update
# Install PHP 7.1. The ondrej/php repository also contains other versions of php, try just changing the version number
apt-get install -y php7.1\
php7.1-ldap \
php7.1-xml \
php7.1-xmlrpc \
php7.1-zip \
php7.1-mysql \
php7.1-mbstring \
php7.1-mcrypt \
php7.1-gd \
php7.1-readline \
php7.1-opcache \
php7.1-xdebug \
php7.1-dom \
php-xdebug \
php7.1-curl \
unzip
#Enable xdebug - phpunit uses this for code coverage
phpenmod xdebug
#Install composer
php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"
php composer-setup.php ;
php -r "unlink('composer-setup.php');" ;
mv composer.phar /usr/local/bin/composer
#Various handy node based dev tools - do you need these during your build? Comment if not.
#npm install -g gulp
#npm install -g grunt
#npm install -g webpack
# Start Mysql if you need it
# - apt-get install -y mysql-server
# - su mysql -s /bin/bash -c "/usr/sbin/mysqld" &
- bash -c "$(curl -fsSL https://raw.githubusercontent.com/thii/aws-codebuild-extras/master/install)"
build:
commands:
- echo Build started on `date`
- echo Installing composer deps
- composer install --no-progress --no-suggest
post_build:
commands:
- echo Build completed on `date`
# Create a mysql database
# Do you need to do this? In many cases phpunit will use sqllite or similar to avoid the need for a real DB.
# If you don't need it delete it
# - /usr/bin/mysql -u root -e "GRANT ALL ON *.* TO 'test'@'localhost' IDENTIFIED BY '' WITH GRANT OPTION"
# - mysqladmin -u test create test
# Run your tests
- ./vendor/bin/phpunit --coverage-html coverage
- aws s3 sync --delete coverage/ "s3://${COVERAGE_S3_BUCKET}/coverage"
# Deployment to the SFTP server
- bash ./codebuild-deploy.sh
cache:
paths:
# Debian package caches, so we don't need to keep redownloading debian packages and lists:
- /var/cache/apt/**/*
- /var/lib/apt/lists/**/*
# Composer cache:
- /root/.composer/**/*
# Node modules, if you need nodejs based tools like webpack during your build
- /root/.npm/**/*
- /usr/lib/node_modules/**/*
Morty Proxy This is a proxified and sanitized view of the page, visit original site.