Skip to content

Commit

Permalink
Updated development stack and fixed CI. (dpc-sdp#31)
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexSkrypnyk authored Jan 22, 2019
1 parent 1f447b4 commit a10e3ee
Show file tree
Hide file tree
Showing 17 changed files with 116 additions and 789 deletions.
55 changes: 21 additions & 34 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -1,55 +1,41 @@
version: 2
aliases:

- &build
# Re-usable job to run different types of builds.
- &job-build
working_directory: /app
docker:
- image: singledigital/bay-circle:latest
environment: &environment
COMPOSER_ALLOW_SUPERUSER: 1
COMPOSE_PROJECT_NAME: mysite
COMPOSE_FILE: docker-compose.yml
INSTALL_SUGGEST: 0
BEHAT_PROFILE: ""
- image: &builder-image integratedexperts/ci-builder
environment:
INSTALL_NEW_SITE: 1
LAGOON_ENVIRONMENT_TYPE: ci
steps:
- attach_workspace:
at: /workspace
- checkout
# Init environment for development.
- run: if [ -f "./dev-init.sh" ] && [ ! "$DEV_TOOLS" ]; then ./dev-init.sh; fi
- setup_remote_docker:
docker_layer_caching: true
version: 17.06.0-ce
- run:
name: Composer validate
# @dev
command: composer validate --ansi --strict --no-check-all
- run:
name: Start containers
command: |
printenv
echo "COMPOSE_FILE=$COMPOSE_FILE" >> .env.local
echo "GITHUB_TOKEN=$GITHUB_TOKEN" >> .env.local
echo "BEHAT_PROFILE=$BEHAT_PROFILE" >> .env.local
make docker-start
- run:
name: Copy files into container
command: docker cp -L /app/. $(docker-compose ps -q cli):/app/
- run:
name: Install dev dependencies
command: make install
- run: .circleci/build.sh
- run: .circleci/test.sh
- run:
name: Lint code
command: make lint
name: Copy artifacts
command: .circleci/test-artifacts.sh
when: always
- store_artifacts:
path: /tmp/artifacts

jobs:
build:
<<: *build
<<: *job-build

build_suggest:
<<: *build
<<: *job-build
docker:
- image: singledigital/bay-circle:latest
- image: *builder-image
environment:
<<: *environment
INSTALL_NEW_SITE: 1
LAGOON_ENVIRONMENT_TYPE: ci
INSTALL_SUGGEST: 1
BEHAT_PROFILE: "--profile=suggest"

Expand All @@ -58,3 +44,4 @@ workflows:
main:
jobs:
- build
- build_suggest
4 changes: 0 additions & 4 deletions .dockerignore

This file was deleted.

5 changes: 0 additions & 5 deletions .editorconfig

This file was deleted.

58 changes: 44 additions & 14 deletions .env
Original file line number Diff line number Diff line change
@@ -1,18 +1,48 @@
MODULE_NAME=tide
COMPOSE_FILE=docker-compose.yml:docker-compose.local.yml
PHP_LINT_TARGETS="."
PHPCS_TARGETS="tide.info.yml"
COMPOSER_DEV_URL=https://raw.githubusercontent.com/dpc-sdp/tide/master/composer.dev.json?token=AAHUz0o0rlonLN0CbgcxwADlZo5zVyhvks5bVRWowA

################################################################################
# Local overrides.
##
# File with per-project environment variables.
#
# Copy lines below into "env.local" file and exclude "env.local" file globally.
################################################################################
# It is used by Ahoy and other scripts to read default values.
#
# The values must be scalar (cannot be another variable). This file must have
# at least 1 valid (exportable) assignment of value.
#
# You may create .env.local file and store your local environment variables
# there - it will also be loaded by Ahoy and it is excluded from git.
#
# This file may be left as is to assume default values specified in .ahoy.yml.

# Uncomment and epcify your GitHub token below (CI already uses this).
# GITHUB_TOKEN=<INSERT YOUR TOKEN HERE>
# Project name.
# Defaults to the name of the current directory with stripped hyphens and
# underscores.
# PROJECT_NAME=mysite

# Uncomment below to install suggsted packages.
# INSTALL_SUGGEST=1
# Path to the root of the project inside of the container.
# APP=/app

# Path to the site installation relative to the current directory.
# WEBROOT=docroot

# Local development URL.
# Make sure that there is no trailing slash in the value.
# Defaults to http://<CURRENTDIR>.docker.amazee.io
# LOCALDEV_URL=http://mysite.docker.amazee.io

# Docker Compose project name.
# All containers will have this prefix.
# Defaults to $PROJECT_NAME
# COMPOSE_PROJECT_NAME=mysite

# Database connection details.
# MYSQL_HOST=mariadb
# MYSQL_PORT=3306

# Change to composer.json for site build.
COMPOSER=composer.build.json

# Uncomment this for site build and set the profile name.
DRUPAL_PROFILE=tide

# Uncomment to run the build in suggest mode.
# In this mode, modules from "suggested" part of composer.json will be
# installed.
# INSTALL_SUGGEST=1
11 changes: 5 additions & 6 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
# Ignore files for distribution archives.

.gitattributes export-ignore
.gitignore export-ignore
.github export-ignore
.circleci export-ignore
.circleci/config.yml export-ignore
.env export-ignore
tests export-ignore
circle.yml export-ignore
composer.lock export-ignore
phpcs.xml export-ignore
phpunit.xml export-ignore
xdebug.sh export-ignore
composer.json export-ignore
dev-init.sh export-ignore
16 changes: 10 additions & 6 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
vendor
vendor-local
# To ignore OS temporary files use global .gitignore
# https://help.github.com/articles/ignoring-files/#create-a-global-gitignore

/composer.lock
build
/composer.build.json
/composer.build.lock
/docroot
/dpc-sdp
.env.local
docker-compose.override.yml
screenshots
composer.dev.json
composer.build.json
composer.build.lock
vendor
Loading

0 comments on commit a10e3ee

Please sign in to comment.