Skip to content

Commit

Permalink
Merge branch 'develop' into feature/944-update-script-handler
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexSkrypnyk committed Mar 16, 2024
2 parents b82b274 + d6be52c commit fd06ef3
Show file tree
Hide file tree
Showing 7 changed files with 28 additions and 16 deletions.
3 changes: 0 additions & 3 deletions .drevops/tests/bats/_helper.bash
Original file line number Diff line number Diff line change
Expand Up @@ -69,9 +69,6 @@ setup() {
command -v docker >/dev/null || (echo "[ERROR] docker command is not available." && exit 1)
command -v ahoy >/dev/null || (echo "[ERROR] ahoy command is not available." && exit 1)
command -v jq >/dev/null || (echo "[ERROR] jq command is not available." && exit 1)
[ -n "${TEST_GITHUB_TOKEN}" ] || (echo "[ERROR] The required TEST_GITHUB_TOKEN variable is not set. Tests will not proceed." && exit 1)
[ -n "${TEST_DOCKER_USER}" ] || (echo "[ERROR] The required TEST_DOCKER_USER variable is not set. Tests will not proceed." && exit 1)
[ -n "${TEST_DOCKER_PASS}" ] || (echo "[ERROR] The required TEST_DOCKER_PASS variable is not set. Tests will not proceed." && exit 1)
# @formatter:on

##
Expand Down
6 changes: 3 additions & 3 deletions .drevops/tests/bats/_helper.circleci.bash
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ circleci_get_previous_job_numbers() {
circleci_get_workflow_id_from_job_number() {
curl -sSL --request GET \
-H "Authorization: Basic $(echo -n "${TEST_CIRCLECI_TOKEN}" | base64)" \
"https:/circleci.com/api/v2/project/gh/${CIRCLE_PROJECT_REPONAME}/${CIRCLE_PROJECT_USERNAME}/job/${1}" |
"https:/circleci.com/api/v2/project/gh/${CIRCLE_PROJECT_USERNAME}/${CIRCLE_PROJECT_REPONAME}/job/${1}" |
jq -r '.latest_workflow.id'
}

Expand All @@ -39,7 +39,7 @@ circleci_get_workflow_id_from_job_number() {
circleci_get_job_artifacts() {
curl -sSL --request GET \
-H "Authorization: Basic $(echo -n "${TEST_CIRCLECI_TOKEN}" | base64)" \
"https:/circleci.com/api/v2/project/gh/${CIRCLE_PROJECT_REPONAME}/${CIRCLE_PROJECT_USERNAME}/${1}/artifacts"
"https:/circleci.com/api/v2/project/gh/${CIRCLE_PROJECT_USERNAME}/${CIRCLE_PROJECT_REPONAME}/${1}/artifacts"
}

#
Expand All @@ -48,5 +48,5 @@ circleci_get_job_artifacts() {
circleci_get_job_test_metadata() {
curl -sSL --request GET \
-H "Authorization: Basic $(echo -n "${TEST_CIRCLECI_TOKEN}" | base64)" \
"https:/circleci.com/api/v2/project/gh/${CIRCLE_PROJECT_REPONAME}/${CIRCLE_PROJECT_USERNAME}/${1}/tests"
"https:/circleci.com/api/v2/project/gh/${CIRCLE_PROJECT_USERNAME}/${CIRCLE_PROJECT_REPONAME}/${1}/tests"
}
5 changes: 5 additions & 0 deletions .drevops/tests/bats/_helper.deployment.bash
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,12 @@ provision_site() {

if [ "${should_build:-}" = "1" ]; then
step "Build project"

export DOCKER_USER="${TEST_DOCKER_USER?Test Docker user is not set}"
export DOCKER_PASS="${TEST_DOCKER_PASS?Test Docker pass is not set}"

export DREVOPS_PROVISION_POST_OPERATIONS_SKIP=1

ahoy build
sync_to_host
fi
Expand Down
3 changes: 3 additions & 0 deletions .drevops/tests/bats/_helper.workflow.bash
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,9 @@ assert_ahoy_build() {
db_file_exists=0
[ -f ".data/db.sql" ] && db_file_exists=1

export DOCKER_USER="${TEST_DOCKER_USER?Test Docker user is not set}"
export DOCKER_PASS="${TEST_DOCKER_PASS?Test Docker pass is not set}"

run ahoy build
run sync_to_host

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 @@ -43,7 +43,7 @@ load _helper.circleci.bash
}

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

Expand Down
3 changes: 3 additions & 0 deletions .drevops/tests/bats/workflow.smoke.bats
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,9 @@ load _helper.workflow.bash
composer config repositories.test-private-package vcs [email protected]:drevops/test-private-package.git
jq --indent 4 '.require += {"drevops/test-private-package": "^1"}' composer.json >composer.json.tmp && mv -f composer.json.tmp composer.json

export DOCKER_USER="${TEST_DOCKER_USER?Test Docker user is not set}"
export DOCKER_PASS="${TEST_DOCKER_PASS?Test Docker pass is not set}"

step "Build without a GITHUB_TOKEN token"
unset GITHUB_TOKEN
run ahoy build
Expand Down
22 changes: 13 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
</picture>
</div>

<h3 align="center">Drupal project template</h3>
<h3 align="center">Drupal project scaffold</h3>
<h4 align="center"><em>Onboarding in minutes, not hours or days!</em></h4>

<div align="center">
Expand All @@ -21,31 +21,35 @@

## Purpose

Make it easy to set up, develop and support high-quality Drupal websites
Make it easy to set up, develop and maintain Drupal websites

## Approach

Use **tested** Drupal project template with DevOps integrations for CI and hosting platforms
Use **tested** Drupal project scaffold with DevOps integrations for CI and hosting platforms

## How it works
Similar to [Zen of Python](https://www.python.org/dev/peps/pep-0020/), we use our own set of principles:

1. You run the installer script once
2. DrevOps integrates the latest project template release into your codebase
3. You choose which changes to commit
* Simple is better than complex.
* Rely on upstream sources as much as possible.
* Favor standard practices over custom implementations.
* Errors should never pass silently.
* Explicit logging helps.
* Readability counts.
* If the implementation is hard to explain, it's a bad idea.

[Read more about architecture](https://docs.drevops.com/latest/introduction/architecture/)

## Installation

Our [installer](https://github.com/drevops/installer) simplifies setup, letting you choose only the features you need:
Our [installer](https://github.com/drevops/installer) simplifies setup, letting you choose only the features you need. It will integrate the latest scaffold release into your codebase and you will choose which changes to commit.

```bash
curl -SsL https://install.drevops.com > install.php
php install.php
rm -r install.php
```

Alternatively, clone the repository and adjust the configuration by manually editing or deleting the sections that aren't necessary for your setup.
Alternatively, clone this repository and adjust the configuration by manually editing or deleting the sections that aren't necessary for your setup.

## Features

Expand Down

0 comments on commit fd06ef3

Please sign in to comment.