Skip to content

Commit

Permalink
Merge branch 'develop' into feature/1126-update-ci-workspace-locations
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexSkrypnyk authored Jan 15, 2024
2 parents 9c3170d + 489473a commit 50fe447
Show file tree
Hide file tree
Showing 57 changed files with 847 additions and 4,187 deletions.
108 changes: 0 additions & 108 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -617,91 +617,6 @@ jobs:
# Use custom cache key for this workflow to make sure that caches from
# the main workflow are separated from this one.
DREVOPS_CI_DB_CACHE_BRANCH: drevops-dev-didi-ii

#-----------------------------------------------------------------------------
# Publish docs to docs.drevops.com
# @todo Move this to GitHub Actions.
#-----------------------------------------------------------------------------
drevops-dev-deploy-docs:
<<: *runner_config
steps:
- checkout
- *step_process_codebase
- *step_setup_remote_docker
- *step_setup_docker_network
- add_ssh_keys:
fingerprints:
- "22:fe:71:f4:65:8d:cb:81:9c:31:09:4e:03:0b:33:b7"
- run:
name: Build and test docs
command: |
cd .drevops/docs
ahoy build
ahoy lint
ahoy test
- run:
name: Publish docs
command: |
cd .drevops/docs
export DOCS_PUBLISH_REMOTE_URL=https://github.com/drevops/drevops_docs.git
export DOCS_PUBLISH_SRC_TAG=${CIRCLE_TAG:-}
export DOCS_PUBLISH_SRC_BRANCH=${CIRCLE_BRANCH:-}
export DOCS_PUBLISH_SSH_FINGERPRINT="22:fe:71:f4:65:8d:cb:81:9c:31:09:4e:03:0b:33:b7"
export DOCS_PUBLISH_CANARY_BRANCH="develop"
export DOCS_PUBLISH_COMMIT_MESSAGE="Automatically pushed from drevops/drevops"
export DOCS_PUBLISH_GIT_EMAIL="[email protected]"
./.utils/publish.sh
#-----------------------------------------------------------------------------
# Publish installer to install.drevops.com
# @todo Move this to GitHub Actions.
#-----------------------------------------------------------------------------
drevops-dev-deploy-installer:
<<: *runner_config
steps:
- checkout
- *step_process_codebase
- *step_setup_remote_docker
- *step_setup_docker_network
- add_ssh_keys:
fingerprints:
- "f6:b2:bb:a8:1d:9d:fb:03:c6:39:27:1e:71:bb:9a:9b"
- run:
name: Prepare installer.
command: |
cd .drevops/installer
composer install
sed -i "s/\"git-tag-ci\": \"dev\"/\"git-tag-ci\": \"${CIRCLE_TAG:-${CIRCLE_SHA1}}\"/g" box.json
composer build
mkdir -p /tmp/installer/docs
cp .build/install.phar /tmp/installer/docs/index.html
echo "install.drevops.com" > /tmp/installer/docs/CNAME
- run:
name: Configure SSH.
command: |
DEPLOY_DOCS_SSH_FINGERPRINT="f6:b2:bb:a8:1d:9d:fb:03:c6:39:27:1e:71:bb:9a:9b"
# Configure SSH to configure git and SSH to connect to remote servers for deployment.
[ "$(git config --global user.name)" == "" ] && git config --global user.name "Deployment robot"
[ "$(git config --global user.email)" == "" ] && git config --global user.email "[email protected]"
mkdir -p "${HOME}/.ssh/"
echo -e "Host *\n\tStrictHostKeyChecking no\n" > "${HOME}/.ssh/config"
DEPLOY_DOCS_SSH_FILE="${DEPLOY_DOCS_SSH_FINGERPRINT//:}"
DEPLOY_DOCS_SSH_FILE="${HOME}/.ssh/id_rsa_${DEPLOY_DOCS_SSH_FILE//\"}"
if [ -f "${DEPLOY_DOCS_SSH_FILE}" ]; then
echo "Found Deploy SSH key file ${DEPLOY_DOCS_SSH_FILE}"
ssh-add -D > /dev/null
ssh-add "${DEPLOY_DOCS_SSH_FILE}"
fi
- run:
name: Deploy installer
command: |
cd /tmp/installer
git init
git checkout -b main
git add -A
git commit -m "Automatically pushed from drevops/drevops"
git remote add origin [email protected]:drevops/installer.git
git push origin main --force
#=============================================================================
#;> DREVOPS_DEV

Expand Down Expand Up @@ -812,29 +727,6 @@ workflows:
tags:
only: /^[0-9]+(\.[0-9]+)+(-rc[0-9]+)?$/

# Build and publish DrevOps docs.
- drevops-dev-deploy-docs:
requires:
- build
- drevops-dev-test
- drevops-dev-test-workflow
filters:
branches:
# 'main' or any branch with 'docs' in the name.
only: /^main$|^develop$|.*docs.*/
tags:
only: /^[0-9]+(\.[0-9]+)+(-rc[0-9]+)?$/

# Publish DrevOps installer.
- drevops-dev-deploy-installer:
requires:
- drevops-dev-test
filters:
branches:
only: /^feature\/installer-update$/
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:
jobs:
Expand Down
12 changes: 6 additions & 6 deletions .drevops/devtool/composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 12 additions & 0 deletions .drevops/docs/.utils/.aspell.en.pws
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ PHPMD
PHPStan
PHPUnit
PRs
PSR
Packagist
PhpStorm
Profiler
Expand Down Expand Up @@ -80,10 +81,13 @@ Upgradable
VueJS
WIP
Webhook
Webserver
Xdebug
YAML
YOURORG
YOURSITE
acquia
amazee
amazeeio
assignees
autotesting
Expand All @@ -95,10 +99,12 @@ changelog
checkstyle
codebase
commandfiles
config
contrib
cron
customisations
dev
docblock
drush
env
fe
Expand All @@ -116,21 +122,27 @@ md
newrelic
npm
onboarding
overcomplicated
php
phpcs
pre
readme
roadmap
runtime
runtime's
sanitization
scaffolded
scalability
sql
suboptimal
toc
tokenizes
toolset
txt
uat
uncommented
unmapped
untrusted
upgradable
url
webhook
Expand Down
1 change: 1 addition & 0 deletions .drevops/docs/.utils/composer.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"name": "drevops/docs",
"require": {
"php": ">=8.1",
"alexskrypnyk/shellvar": "^0.5"
},
"authors": [
Expand Down
6 changes: 4 additions & 2 deletions .drevops/docs/.utils/composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 8 additions & 8 deletions .drevops/docs/.utils/lint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,24 +8,24 @@
set -eu
[ "${DREVOPS_DEBUG-}" = "1" ] && set -x

CUR_DIR="$(dirname "${BASH_SOURCE[0]}")"
cur_dir="$(dirname "${BASH_SOURCE[0]}")"

DICTIONARY="${CUR_DIR}/.aspell.en.pws"
dictionary="${cur_dir}/.aspell.en.pws"

targets=()
while IFS= read -r -d $'\0'; do
targets+=("${REPLY}")
done < <(
find \
"${CUR_DIR}/.." \
"${cur_dir}/.." \
-type f \
\( -name "*.md" \) \
-not -path "*vendor*" -not -path "*node_modules*" \
-print0
)

echo -n "==> Validating dictionary."
if head -1 "${DICTIONARY}" | grep -q "personal_ws-1.1 en 28"; then
echo -n "==> Validating dictionary... "
if head -1 "${dictionary}" | grep -q "personal_ws-1.1 en 28"; then
echo "OK"
else
echo "ERROR: invalid dictionary format"
Expand All @@ -45,14 +45,14 @@ for file in "${targets[@]}"; do
# Remove HTML.
sed -E 's/<([^<]+)>//g' |
# Remove code blocks.
sed -n '/\`\`\`/,/\`\`\`/ !p' |
sed '/^[[:space:]]*```/,/^[[:space:]]*```/d' |
# Remove inline code.
sed -n '/\`/,/\`/ !p' |
sed 's/`[^`]*`//g' |
# Remove anchors.
sed -E 's/\[.+\]\([^\)]+\)//g' |
# Remove links.
sed -E 's/http(s)?:\/\/([^ ]+)//g' |
aspell --lang=en --encoding=utf-8 --personal="${DICTIONARY}" list | tee /dev/stderr | [ "$(wc -l)" -eq 0 ]
aspell --lang=en --encoding=utf-8 --personal="${dictionary}" list | tee /dev/stderr | [ "$(wc -l)" -eq 0 ]

if [ "$?" -ne 0 ]; then
exit 1
Expand Down
2 changes: 2 additions & 0 deletions .drevops/docs/.utils/publish.sh
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,8 @@ push_to_remote() {
# Directory with files to push to remote.
local src_dir="${1:-}"

echo "Pushing ${src_dir} to remote."

configure_ssh

# Temp directory to use for the local repo.
Expand Down
2 changes: 1 addition & 1 deletion .drevops/docs/.utils/terminalizer/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ npm install -g terminalizer
terminalizer record <recording-name>
```

2. Update produced YML file with settings from `example.yml`.
2. Update produced YAML file with settings from `example.yml`.

3. Render
```shell
Expand Down
2 changes: 1 addition & 1 deletion .drevops/docs/content/workflows/deployment.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ variable as a comma-separated list of one or multiple supported deployment types

After setting up the deployment integration, you can begin using it by adding
the `$DREVOPS_DEPLOY_PROCEED` variable with a value of `1` in the CircleCI user
interface. This variable is used as a failsafe to prevent accidental
interface. This variable is used as a fail-safe to prevent accidental
deployments while setting up DrevOps.

## Using deployments
Expand Down
2 changes: 1 addition & 1 deletion .drevops/docs/content/workflows/variables.md
Original file line number Diff line number Diff line change
Expand Up @@ -445,7 +445,7 @@ Defined in: `ACQUIA ENVIRONMENT`

Overwrite existing database if it exists.

Usually set to `0` in deployed environments and can be temporary set to `1` for<br />a specific deployment.<br />Set this to `1` in .env.local to override when developing localy.
Usually set to `0` in deployed environments and can be temporary set to `1` for<br />a specific deployment.<br />Set this to `1` in .env.local to override when developing locally.

Default value: `UNDEFINED`

Expand Down
6 changes: 5 additions & 1 deletion .drevops/installer/.gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
.build
/.build
/.coverage-html
/.phpunit.cache
/cobertura.xml
/composer.lock
/vendor
/vendor-bin
Loading

0 comments on commit 50fe447

Please sign in to comment.