Skip to content

Commit

Permalink
Merge branch 'develop' into feature/add-update-lagoon-variable
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexSkrypnyk authored Mar 1, 2024
2 parents a75ee56 + e5808aa commit d2bf97e
Show file tree
Hide file tree
Showing 12 changed files with 212 additions and 137 deletions.
129 changes: 4 additions & 125 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -374,93 +374,17 @@ jobs:
- run: renovate
#;> RENOVATEBOT


#;============================================================================
#; DREVOPS development section. Removed during DrevOps installation/update.
#;============================================================================
#;
#; We are using CircleCI config file to both run the application tests (what
#; a consumer site would use) and DrevOps' own tests (to make sure that
#; this project is "buildable" at any time).
#;
#;< DREVOPS_DEV
#
#-----------------------------------------------------------------------------
# Test suite for DrevOps.
#-----------------------------------------------------------------------------
drevops-dev-test:
<<: *runner_config
parallelism: 1
steps:
- checkout
- *step_process_codebase_for_ci
- *step_setup_remote_docker
- *step_setup_docker_network
- run:
name: Lint DrevOps project
command: cd .drevops && ahoy lint
- run:
name: Run common tests
command: cd .drevops && DREVOPS_DEV_VOLUMES_MOUNTED=0 DREVOPS_DEV_TEST_COVERAGE_DIR=/tmp/artifacts/coverage ahoy test
no_output_timeout: 60m
- store_test_results:
path: *test_results
- store_artifacts:
path: *artifacts
- run:
name: Upload code coverage reports to Codecov
command: codecov -Z -s /tmp/artifacts/coverage

drevops-dev-test-workflow:
<<: *runner_config
parallelism: 3
resource_class: large
steps:
- checkout
- *step_process_codebase_for_ci
- *step_setup_remote_docker
- *step_setup_docker_network
- run:
name: Run workflow tests (long)
command: cd .drevops && DREVOPS_DEV_VOLUMES_MOUNTED=0 DREVOPS_DEV_TEST_COVERAGE_DIR=/tmp/artifacts/coverage ahoy test-workflow
no_output_timeout: 60m
- store_test_results:
path: *test_results
- store_artifacts:
path: *artifacts
- run:
name: Upload code coverage reports to Codecov
command: codecov -Z -s /tmp/artifacts/coverage

drevops-dev-test-deployment:
<<: *runner_config
parallelism: 2
steps:
- checkout
- *step_process_codebase_for_ci
- *step_setup_remote_docker
- *step_setup_docker_network
- add_ssh_keys:
fingerprints:
- *deploy_ssh_fingerprint
- attach_workspace:
at: /tmp/workspace
- run:
name: Run deployment tests (long)
command: cd .drevops && DREVOPS_DEV_VOLUMES_MOUNTED=0 DREVOPS_DEV_TEST_COVERAGE_DIR=/tmp/artifacts/coverage ahoy test-deployment
no_output_timeout: 60m
- store_test_results:
path: *test_results
- store_artifacts:
path: *artifacts
- run:
name: Upload code coverage reports to Codecov
command: codecov -Z -s /tmp/artifacts/coverage

# Run tests after 'build' job.
drevops-dev-test-postbuild:
# Run DrevOps tests after 'build' job to test CircleCI's configuration.
drevops-dev-test-ci-postbuild:
<<: *runner_config
parallelism: 1
steps:
- checkout
- *step_process_codebase_for_ci
Expand All @@ -477,13 +401,6 @@ jobs:
name: Upload code coverage reports to Codecov
command: codecov -Z -s /tmp/artifacts/coverage

# Deployment of feature branches and tags for DrevOps itself.
drevops-dev-deploy:
<<: *job_deploy

drevops-dev-deploy-tags:
<<: *job-deploy-tags

#-----------------------------------------------------------------------------
# Launching and testing databases stored within Docker data image.
#-----------------------------------------------------------------------------
Expand Down Expand Up @@ -625,54 +542,16 @@ workflows:
#;============================================================================
#;
#;< DREVOPS_DEV
# Run unit and functional tests for DrevOps.
# Run functional tests for DrevOps.
# Note that these jobs must run within the "commit" workflow, because they
# depend on the "build" job.
- drevops-dev-test:
filters:
tags:
only: /.*/
- drevops-dev-test-workflow:
filters:
tags:
only: /.*/
# Run deployment tests for DrevOps.
- drevops-dev-test-deployment:
filters:
tags:
only: /.*/
# Run tests after 'build' job.
- drevops-dev-test-postbuild:
- drevops-dev-test-ci-postbuild:
requires:
- build
filters:
tags:
only: /.*/
# Run actual deployment of DrevOps code to destination codebase (integration test).
# @see https://github.com/drevops/drevops-destination
- drevops-dev-deploy:
requires:
- build
- drevops-dev-test
- drevops-dev-test-workflow
filters:
branches:
# Allowed branches: 7.x, 8.x, 9.x, feature/7.x-description, feature/8.x-description, feature/9.x-description
only: /main|develop|7\.x|feature\/(?:7\.x)[a-zA-z0-9\-\.\,]+/
tags:
ignore: /.*/
# Run actual deployment of DrevOps code to destination codebase (integration test).
# @see https://github.com/drevops/drevops-destination
- drevops-dev-deploy-tags:
requires:
- build
- drevops-dev-test
- drevops-dev-test-workflow
filters:
branches:
ignore: /.*/
tags:
only: /^[0-9]+(\.[0-9]+)+(-rc[0-9]+)?$/

# Test workflow to test DREVOPS_DB_DOCKER_IMAGE workflow for DB from file.
drevops-dev-didi-fi:
Expand Down
2 changes: 1 addition & 1 deletion .docker/cli.dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
#
# @see https://hub.docker.com/r/uselagoon/php-8.2-cli-drupal/tags
# @see https://github.com/uselagoon/lagoon-images/tree/main/images/php-cli-drupal
FROM uselagoon/php-8.2-cli-drupal:24.1.0
FROM uselagoon/php-8.2-cli-drupal:24.2.0

# Add missing variables.
# @todo Remove once https://github.com/uselagoon/lagoon/issues/3121 is resolved.
Expand Down
2 changes: 1 addition & 1 deletion .docker/mariadb.dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
# @see https://github.com/drevops/mariadb-drupal-data
#
# The ARG value will be updated with a value passed from docker-compose.yml
ARG IMAGE=uselagoon/mariadb-drupal:24.1.0
ARG IMAGE=uselagoon/mariadb-drupal:24.2.0

# hadolint ignore=DL3006
FROM ${IMAGE}
Expand Down
2 changes: 1 addition & 1 deletion .docker/nginx-drupal.dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ FROM ${CLI_IMAGE:-cli} as cli

# @see https://hub.docker.com/r/uselagoon/nginx-drupal/tags?page=1
# @see https://github.com/uselagoon/lagoon-images/tree/main/images/nginx-drupal
FROM uselagoon/nginx-drupal:24.1.0
FROM uselagoon/nginx-drupal:24.2.0

# Webroot is used for Nginx docroot configuration.
ARG WEBROOT=web
Expand Down
2 changes: 1 addition & 1 deletion .docker/php.dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ FROM ${CLI_IMAGE:-cli} as cli

# @see https://hub.docker.com/r/uselagoon/php-8.2-fpm/tags
# @see https://github.com/uselagoon/lagoon-images/tree/main/images/php-fpm
FROM uselagoon/php-8.2-fpm:24.1.0
FROM uselagoon/php-8.2-fpm:24.2.0

RUN apk add --no-cache tzdata

Expand Down
2 changes: 1 addition & 1 deletion .docker/solr.dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ FROM ${CLI_IMAGE} as cli

# @see https://hub.docker.com/r/uselagoon/solr-8/tags
# @see https://github.com/uselagoon/lagoon-images/blob/main/images/solr/8.Dockerfile
FROM uselagoon/solr-8:24.1.0
FROM uselagoon/solr-8:24.2.0

# Solr Jump-start config needs to be manually copied from search_api_solr module
# /app/docroot/modules/contrib/search_api_solr/jump-start/solr8/config-set.
Expand Down
2 changes: 1 addition & 1 deletion .drevops/tests/bats/circleci.bats
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ load _helper.bash
load _helper.circleci.bash

@test "CircleCI artifacts are saved" {
if [ -z "${CI}" ]; then
if [ -z "${CIRCLECI}" ]; then
skip "This test is only run on CircleCI"
fi

Expand Down
2 changes: 1 addition & 1 deletion .drevops/tests/test.deployment.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ TEST_DIR="${ROOT_DIR}/.drevops/tests"
# Create stub of local framework.
docker network create amazeeio-network 2>/dev/null || true

index="${CIRCLE_NODE_INDEX:-*}"
index="${TEST_NODE_INDEX:-*}"
echo "==> Run deployment functional tests (${index})."
[ ! -d "${TEST_DIR}/node_modules" ] && echo " > Install test Node dependencies." && npm --prefix="${TEST_DIR}" ci

Expand Down
6 changes: 4 additions & 2 deletions .drevops/tests/test.workflow.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ TEST_DIR="${ROOT_DIR}/.drevops/tests"
# Create stub of local framework.
docker network create amazeeio-network 2>/dev/null || true

index="${CIRCLE_NODE_INDEX:-*}"
index="${TEST_NODE_INDEX:-*}"
echo "==> Run workflow functional tests (${index})."
[ ! -d "${TEST_DIR}/node_modules" ] && echo " > Install test Node dependencies." && npm --prefix="${TEST_DIR}" ci

Expand Down Expand Up @@ -61,7 +61,9 @@ case ${index} in
bats "${TEST_DIR}"/bats/workflow.smoke.bats
bats "${TEST_DIR}"/bats/workflow.install.bats
bats "${TEST_DIR}"/bats/workflow.storage.image.bats
bats "${TEST_DIR}"/bats/workflow.storage.image_cached.bats
# Disabled due to intermittent failures.
# @see https://github.com/drevops/drevops/issues/893
# bats "${TEST_DIR}"/bats/workflow.storage.image_cached.bats
bats "${TEST_DIR}"/bats/workflow.storage.curl.bats
bats "${TEST_DIR}"/bats/workflow.utilities.bats
;;
Expand Down
Loading

0 comments on commit d2bf97e

Please sign in to comment.