mirror of
https://github.com/FriendsOfTYPO3/tea.git
synced 2024-12-23 03:26:10 +01:00
[TASK] Add base gitlab ci composer build (#80)
Co-authored-by: Łukasz Uznański <l.uznanski@macopedia.pl>
This commit is contained in:
parent
46e598e7e1
commit
0c972ed7f6
2 changed files with 38 additions and 0 deletions
25
.gitlab-ci.yml
Normal file
25
.gitlab-ci.yml
Normal file
|
@ -0,0 +1,25 @@
|
|||
---
|
||||
stages:
|
||||
- build
|
||||
|
||||
default:
|
||||
image: php:7.4
|
||||
before_script:
|
||||
- bash .gitlab/build/docker_install.sh > /dev/null
|
||||
|
||||
build-composer-dependencies:
|
||||
stage: build
|
||||
variables:
|
||||
COMPOSER_CACHE_DIR: '.composer'
|
||||
script:
|
||||
- COMPOSER_CACHE_DIR=.composer
|
||||
composer install --prefer-dist --no-progress --optimize-autoloader
|
||||
artifacts:
|
||||
when: on_success
|
||||
expire_in: 2 weeks
|
||||
paths:
|
||||
- .Build
|
||||
cache:
|
||||
paths:
|
||||
- .composer
|
||||
- .Build
|
13
.gitlab/build/docker_install.sh
Normal file
13
.gitlab/build/docker_install.sh
Normal file
|
@ -0,0 +1,13 @@
|
|||
#!/bin/bash
|
||||
|
||||
[[ ! -e /.dockerenv ]] && exit 0
|
||||
|
||||
set -xe
|
||||
|
||||
apt-get update -yqq
|
||||
apt-get install git libzip-dev unzip -yqq
|
||||
|
||||
php -r "readfile('http://getcomposer.org/installer');" | php -- --install-dir=/usr/local/bin/ --filename=composer
|
||||
chmod +x /usr/local/bin/composer
|
||||
|
||||
docker-php-ext-install zip
|
Loading…
Reference in a new issue