Skip to content

Commit

Permalink
Merge pull request #85 from ec-europa/develop
Browse files Browse the repository at this point in the history
Release candidate 3.0.7
  • Loading branch information
jonhy81 authored Apr 30, 2018
2 parents d6241ee + e2d7a90 commit 7561ec4
Show file tree
Hide file tree
Showing 29 changed files with 553 additions and 379 deletions.
143 changes: 113 additions & 30 deletions .drone.yml
Original file line number Diff line number Diff line change
@@ -1,63 +1,146 @@
# ==============================================================================
# Workspace location.
# ==============================================================================
workspace:
base: /test
path: toolkit

# ==============================================================================
# Matrix section
# ==============================================================================
matrix:
PHING_OPTS:
- -logger phing.listener.AnsiColorLogger
DOCKER_PROPS:
- TOOLKIT_ENV_PROPS=/test/toolkit/includes/phing/props/docker.props
PLATFORM_DEV:
- 2.3
- 2.4
- 2.5

# ==============================================================================
# Main services
# ==============================================================================
services:
web:
image: fpfis/php56-dev
image: fpfis/php56-build
environment:
- DOCUMENT_ROOT=/test/toolkit/build
mysql:
image: fpfis/mysql56
selenium:
image: selenium/standalone-chrome
image: percona/percona-server:5.6
environment:
- SE_OPTS=-log /tmp/selenium.log
solr:
image: fpfis/solr5
- MYSQL_ALLOW_EMPTY_PASSWORD=yes

# ==============================================================================
# Pipelines
# ==============================================================================
pipeline:
toolkit:

# ============================================================================
# Setup section:
# ============================================================================
setup:
image: fpfis/php56-dev
environment:
- ${DOCKER_PROPS}
group: setup
commands:
- PROJECT=$(pwd) composer toolkit-install
- rm -rf ./.tmp/ ./build
- cp ./includes/phing/props/drone.props build.develop.props
- ./toolkit/phing project-properties-validate ${PHING_OPTS}
volumes:
- /cache:/cache
- /cache/${DRONE_REPO_NAME}:/cache

tunnel:
image: fpfis/drone-frpc-plugin:latest
group: setup
detach: true
secrets: [ frpc_token, frpc_server ]
environment:
- PLUGIN_ENDPOINT=web:8080
- PLUGIN_GEN_AUTH=yes
- PLUGIN_DOMAIN=${DRONE_REPO_NAME}-${DRONE_BUILD_NUMBER}-${DRONE_JOB_NUMBER}.ci.fpfis.tech.ec.europa.eu
- PLUGIN_URL_OUTPUT_FILE=/test/toolkit/.frpc

# ============================================================================
# Build section:
# ============================================================================
build:
image: fpfis/php56-dev
environment:
- ${DOCKER_PROPS}
group: build
commands:
- ./toolkit/phing build-platform build-subsite-dev -D'platform.package.version'='${PLATFORM_DEV}' ${PHING_OPTS}
volumes:
- /cache/${DRONE_REPO_NAME}:/cache

solr:
image: fpfis/solr5
group: build
detach: true

# ============================================================================
# Install section:
# ============================================================================
install-clean:
image: fpfis/php56-dev
commands:
- ./toolkit/phing build-platform ${PHING_OPTS}
- ./toolkit/phing build-subsite-dev ${PHING_OPTS}
- ./toolkit/phing install-clean -D'project.url.base'="$(cat /test/toolkit/.frpc)" ${PHING_OPTS}
- ./toolkit/phing drush-sql-dump -D'database-file'='/test/toolkit/dump.sql' ${PHING_OPTS}
volumes:
- /cache:/cache
- /cache/share:/tmp/toolkit
- /cache/${DRONE_REPO_NAME}:/cache

install:
visreg-before:
image: fpfis/php56-build
secrets: [ BACKTRAC_TOKEN, BACKTRAC_DYNAMIC_PROJECT_ID ]
commands:
- ./toolkit/phing drush-settings-generate test-run-backtrac -D'project.url.base'="$(cat /test/toolkit/.frpc)" -D'backtrac.secure'='false' -D'backtrac.token'=$${BACKTRAC_TOKEN} -D'project.backtrac.id'=$${BACKTRAC_DYNAMIC_PROJECT_ID} -D'backtrac.env'='development' -D'backtrac.compare.mode'='snapshot' ${PHING_OPTS} || return 0

# ============================================================================
# Clone section:
# ============================================================================
install-clone:
image: fpfis/php56-dev
environment:
- ${DOCKER_PROPS}
commands:
- ./toolkit/phing install-clean ${PHING_OPTS}
- ./toolkit/phing install-clone -D'project.db.file'='/test/toolkit/dump.sql' ${PHING_OPTS}
volumes:
- /cache:/cache
- /cache/share:/tmp/toolkit
- /cache/${DRONE_REPO_NAME}:/cache

test:
# Run backtrac self compare of build (may not be accurate):
# Possible that it starts comparing against another build.
# TODO: solve with better thing. (always green)
visreg-after:
image: fpfis/php56-build
group: prebehat
secrets: [ BACKTRAC_TOKEN, BACKTRAC_DYNAMIC_PROJECT_ID ]
commands:
- ./toolkit/phing drush-settings-generate test-run-backtrac -D'project.url.base'="$(cat /test/toolkit/.frpc)" -D'backtrac.secure'='false' -D'backtrac.token'=$${BACKTRAC_TOKEN} -D'project.backtrac.id'=$${BACKTRAC_DYNAMIC_PROJECT_ID} -D'backtrac.env'='development' -D'backtrac.compare.mode'='compare_itself' ${PHING_OPTS} || return 0

selenium:
image: selenium/standalone-chrome
group: prebehat
detach: true

# ============================================================================
# Test section:
# ============================================================================
behat:
image: fpfis/php56-dev
environment:
- ${DOCKER_PROPS}
commands:
- ./toolkit/phing test-run-behat ${PHING_OPTS}
- ./toolkit/phing drush-settings-generate test-run-behat -D'project.url.base'='$${behat.base_url}' ${PHING_OPTS}
volumes:
- /cache:/cache
- /cache/${DRONE_REPO_NAME}:/cache

# ============================================================================
# Notify section:
# ============================================================================
slack:
image: plugins/slack
channel: ci
username: Subsite-QA
icon_url: https://www.drupal.org/files/examples_meatwad256.png
secrets: [ slack_webhook ]
when:
status: [ success, failure ]
template: >
{{#success build.status}}
{{repo.name}}@{{build.branch}} <{{build.link}}|passed> all subsite tests.
{{else}}
{{repo.name}}@{{build.branch}} <{{build.link}}|failed> subsite tests.
{{/success}}
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,9 @@ build
.tmp
toolkit
vendor
bin
build.project.xml
lib/
phpcs-ruleset.xml
resources/
tests/
Loading

0 comments on commit 7561ec4

Please sign in to comment.