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

Commit

Permalink
Merge pull request #335 from govCMS/circleci_fix
Browse files Browse the repository at this point in the history
[GOVCMSD8-451] update circleCI config
  • Loading branch information
drupal-spider authored Oct 11, 2019
2 parents 8ab07f0 + 0e237d2 commit 7370777
Show file tree
Hide file tree
Showing 5 changed files with 684 additions and 429 deletions.
27 changes: 11 additions & 16 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ jobs:
build:
working_directory: /app
docker:
- image: integratedexperts/ci-builder
- image: quay.io/govcms/govcms-ci
environment:
COMPOSER_ALLOW_SUPERUSER: 1
COMPOSE_PROJECT_NAME: govcms8
Expand All @@ -25,34 +25,29 @@ jobs:
- run:
name: Build project
command: |
ahoy -v build
docker-compose up -d --build
docker-compose exec test dockerize -wait tcp://mariadb:3306 -timeout 1m
- run:
name: Install site
command: ahoy -v install -- install_configure_form.enable_update_status_module=NULL install_configure_form.enable_update_status_emails=NULL
command: docker-compose exec -T test drush si -y govcms --site-name="Welcome to GovCMS" install_configure_form.enable_update_status_module=NULL install_configure_form.enable_update_status_emails=NULL
- run:
name: Get site and module version status
command: |
docker-compose exec -T test php -v
docker-compose exec -T test drush st
docker-compose exec -T test drush pml
- run:
name: Lint code
command: ahoy -v lint || true
command: docker-compose exec -T test lint-theme || true
- run:
name: Run Behat tests with rerun
command: ahoy test-behat -- --format=progress_fail || ahoy test-behat -- --format=progress_fail --rerun
command: docker-compose exec -T test behat --format=progress_fail || docker-compose exec -T test behat --format=progress_fail --rerun
- run:
name: Copy artifacts
command: mkdir -p /tmp/artifacts/behat && docker cp $(docker-compose -p govcms8 ps -q test):/app/tests/behat/screenshots /tmp/artifacts/behat
when: always
- store_artifacts:
path: /tmp/artifacts
- run:
name: Push Docker images to Dockerhub
command: |
if [ "${DEPLOY_ANY_BRANCH}" != "" ] || [ "${CIRCLE_BRANCH}" == "${DEPLOY_BRANCH}" ] || [ ! -z ${CIRCLE_TAG} ]; then
echo "IMAGE_VERSION_TAG=$CIRCLE_TAG">>.env
docker login -u $DOCKER_USER -p $DOCKER_PASS
export $(grep -v '^#' .env | xargs)
ahoy push
else
echo "Skipping deployment"
fi
workflows:
version: 2
main:
Expand Down
4 changes: 2 additions & 2 deletions .docker/Dockerfile.govcms8
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM amazeeio/php:7.1-cli-drupal as builder
FROM amazeeio/php:7.2-cli-drupal as builder

COPY . /src
COPY composer-lagoon.json /app/composer.json
Expand All @@ -7,7 +7,7 @@ COPY scripts /app/scripts
RUN composer --profile install --no-dev \
&& mkdir -p /app/config/default

FROM amazeeio/php:7.1-cli-drupal
FROM amazeeio/php:7.2-cli-drupal
COPY --from=builder /app /app

# Add composer bin to PATH
Expand Down
2 changes: 1 addition & 1 deletion .docker/Dockerfile.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
ARG CLI_IMAGE
FROM ${CLI_IMAGE} as cli

FROM amazeeio/php:7.1-fpm
FROM amazeeio/php:7.2-fpm

COPY --from=cli /app /app
2 changes: 1 addition & 1 deletion .docker/Dockerfile.test
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
ARG CLI_IMAGE
FROM ${CLI_IMAGE} as cli

FROM amazeeio/php:7.1-cli-drupal
FROM amazeeio/php:7.2-cli-drupal

ENV DOCKERIZE_VERSION v0.6.1
RUN wget https://github.com/jwilder/dockerize/releases/download/$DOCKERIZE_VERSION/dockerize-alpine-linux-amd64-$DOCKERIZE_VERSION.tar.gz \
Expand Down
Loading

0 comments on commit 7370777

Please sign in to comment.