Skip to content
This repository has been archived by the owner on Mar 9, 2021. It is now read-only.

Commit

Permalink
Initial GovCMS8 Scaffold files.
Browse files Browse the repository at this point in the history
  • Loading branch information
stooit committed Nov 1, 2018
1 parent ff9d338 commit 15997ff
Show file tree
Hide file tree
Showing 14 changed files with 92 additions and 21 deletions.
18 changes: 17 additions & 1 deletion .ahoy.yml
Expand Up @@ -50,6 +50,22 @@ commands:
usage: Login to a website.
cmd: docker-compose exec -T test drush uli "$@"

lint:
usage: Lint code
cmd: docker-compose exec -T test lint-theme

test-behat:
usage: Run Behat tests.
cmd: docker-compose exec -T test behat "$@"

test-phpunit:
usage: Run PHPUnit tests.
cmd: docker-compose exec -T test phpunit "$@"

pull:
usage: Pull latest docker images.
cmd: docker image ls --format \"{{.Repository}}:{{.Tag}}\" | grep govcmslagoon/ | grep -v none | xargs -n1 docker pull | cat
cmd: docker image ls --format \"{{.Repository}}:{{.Tag}}\" | grep govcms8lagoon/ | grep -v none | xargs -n1 docker pull | cat

audit-site:
usage: Run site audit
cmd: docker-compose exec -T test drutiny profile:run ci @self "$@"
4 changes: 2 additions & 2 deletions .docker/Dockerfile.cli
@@ -1,3 +1,3 @@
FROM govcms/govcms8
FROM govcms8lagoon/govcms8

COPY themes/ /app/web/themes/custom
COPY themes/ /app/web/profiles/contrib/govcms/themes/custom
5 changes: 1 addition & 4 deletions .docker/Dockerfile.nginx-drupal
@@ -1,9 +1,6 @@
ARG CLI_IMAGE
FROM ${CLI_IMAGE} as cli

FROM govcmslagoon/nginx-drupal
FROM govcms8lagoon/nginx-drupal

COPY --from=cli /app /app

# Define where the Drupal Root is located
ENV WEBROOT=web
2 changes: 1 addition & 1 deletion .docker/Dockerfile.php
@@ -1,6 +1,6 @@
ARG CLI_IMAGE
FROM ${CLI_IMAGE} as cli

FROM govcmslagoon/php
FROM govcms8lagoon/php

COPY --from=cli /app /app
10 changes: 8 additions & 2 deletions .docker/Dockerfile.test
@@ -1,3 +1,9 @@
FROM govcms/test
FROM govcms8lagoon/test

COPY themes/ /app/web/themes/custom
COPY themes/ /app/web/profiles/contrib/govcms/themes/custom

RUN rm -Rf /app/tests/behat/features/*
COPY tests/behat/features/ /app/tests/behat/features

RUN rm -Rf /app/tests/phpunit/tests/*
COPY tests/phpunit/tests/ /app/tests/phpunit/tests
10 changes: 10 additions & 0 deletions .gitlab-ci.yml
@@ -0,0 +1,10 @@
image: integratedexperts/circleci2-builder
services:
- docker:dind
stages:
- deploy
deploy:
stage: deploy
script:
- echo "curl -X POST -d projectName=$CI_PROJECT_NAME -d branchName=$CI_COMMIT_REF_NAME http://rest2tasks-lagoon.govcms.amazee.io/deploy"
- curl -X POST -d projectName=$CI_PROJECT_NAME -d branchName=$CI_COMMIT_REF_NAME http://rest2tasks-lagoon.govcms.amazee.io/deploy
15 changes: 15 additions & 0 deletions .lagoon.yml
@@ -1 +1,16 @@
docker-compose-yaml: docker-compose.yml

tasks:
post-rollout:
- run:
name: Deploy GovCMS
command: govcms-deploy
service: cli

environments:
master:
cronjobs:
- name: drush cron
schedule: "*/15 * * * *"
command: 'drush cron'
service: cli
1 change: 1 addition & 0 deletions config/default/README.md
@@ -0,0 +1 @@
## Default config mount.
25 changes: 14 additions & 11 deletions docker-compose.yml
@@ -1,21 +1,24 @@
version: '2.3'

x-lagoon-project:
&lagoon-project govcms-saas
&lagoon-project govcms8-saas

x-lagoon-local-dev-url:
&lagoon-local-dev-url http://govcms8.docker.amazee.io
&lagoon-local-dev-url http://govcms8-saas.docker.amazee.io

x-volumes:
&default-volumes
volumes:
- ./themes:/app/themes/custom:${VOLUME_FLAGS:-delegated}
- ./themes:/app/web/profiles/contrib/govcms/themes/custom:${VOLUME_FLAGS:-delegated}
- ./files:/app/web/sites/default/files:delegated
- ./tests/behat/features:/app/web/tests/behat/features:${VOLUME_FLAGS:-delegated}
- ./tests/phpunit/tests:/app/web/tests/phpunit/tests:${VOLUME_FLAGS:-delegated}
- ./config:/app/config

x-environment:
&default-environment
LAGOON_PROJECT: *lagoon-project
LAGOON_ROUTE: &default-url ${LOCALDEV_URL:-http://govcms8.docker.amazee.io}
LAGOON_ROUTE: &default-url ${LOCALDEV_URL:-http://govcms8-saas.docker.amazee.io}

services:

Expand All @@ -27,7 +30,7 @@ services:
labels:
lagoon.type: cli-persistent
lagoon.persistent.name: nginx
lagoon.persistent: /app/web/sites/default/files/
lagoon.persistent: /app/sites/default/files/
<< : *default-volumes
environment:
<< : *default-environment
Expand All @@ -52,7 +55,7 @@ services:
CLI_IMAGE: *lagoon-project
labels:
lagoon.type: nginx-php-persistent
lagoon.persistent: /app/web/sites/default/files/
lagoon.persistent: /app/sites/default/files/
<< : *default-volumes
depends_on:
- cli
Expand All @@ -72,31 +75,31 @@ services:
labels:
lagoon.type: nginx-php-persistent
lagoon.name: nginx
lagoon.persistent: /app/web/sites/default/files/
lagoon.persistent: /app/sites/default/files/
<< : *default-volumes
depends_on:
- cli
environment:
<< : *default-environment

mariadb:
image: govcmslagoon/mariadb-drupal
image: govcms8lagoon/mariadb-drupal
labels:
lagoon.type: mariadb
lagoon.type: mariadb-shared
ports:
- "3306" # Find port on host with `docker-compose port mariadb 3306`
environment:
<< : *default-environment

redis:
image: govcmslagoon/redis
image: govcms8lagoon/redis
labels:
lagoon.type: redis
environment:
<< : *default-environment

solr:
image: govcmslagoon/solr
image: govcms8lagoon/solr
labels:
lagoon.type: solr
ports:
Expand Down
Empty file added files/.gitkeep
Empty file.
15 changes: 15 additions & 0 deletions files/.htaccess
@@ -0,0 +1,15 @@
# Turn off all options we don't need.
Options None
Options +FollowSymLinks

# Set the catch-all handler to prevent scripts from being executed.
SetHandler Drupal_Security_Do_Not_Remove_See_SA_2006_006
<Files *>
# Override the handler again if we're run later in the evaluation list.
SetHandler Drupal_Security_Do_Not_Remove_See_SA_2013_003
</Files>

# If we know how to do it safely, disable the PHP engine entirely.
<IfModule mod_php5.c>
php_flag engine off
</IfModule>
Empty file added tests/behat/features/.gitkeep
Empty file.
8 changes: 8 additions & 0 deletions tests/behat/features/home.feature
@@ -0,0 +1,8 @@
Feature: Home Page

Ensure the home page is rendering correctly

@javascript @smoke
Scenario: Anonymous user visits the homepage
Given I am on the homepage
And save screenshot
Empty file added tests/phpunit/tests/.gitkeep
Empty file.

0 comments on commit 15997ff

Please sign in to comment.