Skip to content
This repository was archived by the owner on Oct 8, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
efc5d22
Fixing linting so CI can work.
gregharvey Apr 14, 2023
1cb5a6d
More linting fixes.
gregharvey Apr 14, 2023
7d9463d
Downgrading Ubuntu due to Docker issues with ce-dev and latest.
gregharvey Apr 14, 2023
da0bb08
Making pipefail shell commands use /bin/bash.
gregharvey Apr 14, 2023
c24f6a3
Adding pipefail code to cachetool installer block.
gregharvey Apr 14, 2023
d69de84
Adding executable for drush install checker.
gregharvey Apr 14, 2023
2e9a3f2
Merge branch '1.x' into bug_fixes
gregharvey Apr 19, 2023
92107be
Fixing D7 ctools behaviour to match features handling.
gregharvey Apr 19, 2023
330a126
Merge branch '1.x' into bug_fixes-PR-1.x
gregharvey Apr 19, 2023
eca7316
Merge branch 'bug_fixes' into bug_fixes-PR-1.x
gregharvey Apr 19, 2023
e8a6920
Merge branch '1.x' into bug_fixes
gregharvey Apr 26, 2023
bb65b12
Jinja2 template looking for settings.php using wrong path.
gregharvey Apr 26, 2023
37c305b
Merge branch '1.x' into bug_fixes-PR-1.x
gregharvey Apr 26, 2023
15f8897
Merge branch 'bug_fixes' into bug_fixes-PR-1.x
gregharvey Apr 26, 2023
0b26394
Fixing config_generate for Drupal.
gregharvey May 11, 2023
00331c2
Making host checking more robust.
gregharvey May 11, 2023
f2bbc9e
Merge branch 'bug_fixes' into bug_fixes-PR-1.x
gregharvey May 11, 2023
2bbb925
Removing variable declaration that will break host check.
gregharvey May 11, 2023
287a23f
Merge branch 'bug_fixes' into bug_fixes-PR-1.x
gregharvey May 11, 2023
0f7a89d
Allow us to use deploy_code with a completely custom build and do not…
gregharvey May 11, 2023
2e04af8
Merge branch 'bug_fixes' into bug_fixes-PR-1.x
gregharvey May 11, 2023
f23a77b
Make PHP cachetool install optional.
gregharvey May 12, 2023
afdb3b9
Merge branch '1.x' into bug_fixes-PR-1.x
gregharvey May 12, 2023
9535d24
Merge branch 'bug_fixes' into bug_fixes-PR-1.x
gregharvey May 12, 2023
b955749
Fixing bug introduced by failed_when - need to check for return code …
gregharvey May 17, 2023
fdd74c5
Merge branch '1.x' into bug_fixes-PR-1.x
gregharvey May 17, 2023
9fb9149
Merge branch 'bug_fixes' into bug_fixes-PR-1.x
gregharvey May 17, 2023
a54569c
Moving where opcache clears get called so they can be excluded if nec…
gregharvey May 25, 2023
da2ebfd
Merge branch '1.x' into bug_fixes-PR-1.x
gregharvey May 25, 2023
f3790af
Merge branch 'bug_fixes' into bug_fixes-PR-1.x
gregharvey May 25, 2023
904c152
Merge branch '1.x' into bug_fixes
gregharvey Jun 21, 2023
a43c759
Fixing linting errors around white space.
gregharvey Jun 21, 2023
de9c0dd
Merge branch '1.x' into bug_fixes
gregharvey Jul 10, 2023
6d8b72c
The unarchive module requires 'dest' to be a directory.
gregharvey Jul 10, 2023
68fcca0
Merge branch '1.x' into bug_fixes-PR-1.x
gregharvey Jul 10, 2023
a377ef9
Merge branch 'bug_fixes' into bug_fixes-PR-1.x
gregharvey Jul 10, 2023
749664e
Fixing Drupal example templates.
gregharvey Jul 19, 2023
bd10146
Logically splitting tests and removing LGD because it's broken.
gregharvey Jul 19, 2023
273eacd
Adding extra plugin LGD needs.
gregharvey Jul 19, 2023
d5526d7
Merge branch '1.x' into bug_fixes-PR-1.x
gregharvey Jul 19, 2023
3b3d20d
Merge branch 'bug_fixes' into bug_fixes-PR-1.x
gregharvey Jul 19, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 28 additions & 0 deletions .github/workflows/ce-deploy-lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Linting

# Run this workflow every time a new commit pushed to your repository
on: pull_request

jobs:
# Set the job key. The key is displayed as the job name
# when a job name is not provided
run-linting:
# Name the Job
name: Linting
# Set the type of machine to run on
runs-on: ubuntu-20.04

steps:
# Checks out a copy of your repository on the ubuntu-latest machine
- name: Checkout code
uses: actions/checkout@v2

# Linter checks.
- name: Run linters.
if: ${{ always() }}
run: |
sudo apt-get update
sudo apt-get install -y ansible-lint yamllint shellcheck
find ./roles -name "*.yml" | xargs ansible-lint
yamllint ./roles
cd scripts && shellcheck *.sh
Original file line number Diff line number Diff line change
@@ -1,14 +1,18 @@
name: Run tests and build docs
name: Publish documentation

# Run this workflow every time a new commit pushed to your repository
on: pull_request
on:
pull_request:
types: [closed]
branches:
- 1.x

jobs:
# Set the job key. The key is displayed as the job name
# when a job name is not provided
run-tests:
publish-docs:
# Name the Job
name: Run tests against Ansible code base
name: Publish ce-deploy documentation
# Set the type of machine to run on
runs-on: ubuntu-20.04

Expand All @@ -17,15 +21,11 @@ jobs:
- name: Checkout code
uses: actions/checkout@v2

# Linter checks.
- name: Run linters.
if: ${{ always() }}
# Configures global Git variables for committing
- name: Configure Git
run: |
sudo apt-get update
sudo apt-get install -y ansible-lint yamllint shellcheck
find ./roles -name "*.yml" | xargs ansible-lint
yamllint ./roles
cd scripts && shellcheck *.sh
git config --global user.email "sysadm@codeenigma.com"
git config --global user.name "Code Enigma CI"

# Installs the ce-dev stack
- name: Install ce-dev
Expand All @@ -41,46 +41,6 @@ jobs:
rm -Rf mkcert
curl -sL https://raw.githubusercontent.com/codeenigma/ce-dev/1.x/install.sh | /bin/sh -s -- linux

# Configures global Git variables for committing
- name: Configure Git
run: |
git config --global user.email "sysadm@codeenigma.com"
git config --global user.name "Code Enigma CI"

# Uses the ce-dev stack to run a test Drupal deploy
- name: Run a test ce-dev deploy with Drupal 8
run: |
ce-dev create -p test -t drupal8 -d ~/test
cd ~/test
ce-dev init
ce-dev start
ce-dev provision
ce-dev deploy
curl https://www.test.local
shell: bash

- name: Run a test ce-dev deploy with Drupal 9
run: |
ce-dev create -p testnine -t drupal9 -d ~/testnine
cd ~/testnine
ce-dev init
ce-dev start
ce-dev provision
ce-dev deploy
curl https://www.testnine.local
shell: bash

- name: Run a test ce-dev deploy with Localgov
run: |
ce-dev create -p testlocalgov -t localgov -d ~/testlocalgov
cd ~/testlocalgov
ce-dev init
ce-dev start
ce-dev provision
ce-dev deploy
curl https://www.testlocalgov.local
shell: bash

# Builds the table of contents for the docs
- name: Documentation (build table of contents)
if: ${{ github.event.pull_request.base.ref == '1.x' }}
Expand Down
44 changes: 44 additions & 0 deletions .github/workflows/ce-deploy-test-drupal8.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: Run test for Drupal 8

# Run this workflow every time a new commit pushed to your repository
on: pull_request

jobs:
# Set the job key. The key is displayed as the job name
# when a job name is not provided
run-tests:
# Name the Job
name: Run Drupal 8 test build
# Set the type of machine to run on
runs-on: ubuntu-20.04

steps:
# Checks out a copy of your repository on the ubuntu-latest machine
- name: Checkout code
uses: actions/checkout@v2

# Installs the ce-dev stack
- name: Install ce-dev
run: |
cd /tmp
wget https://golang.org/dl/go1.16.3.linux-amd64.tar.gz
sudo tar -C /usr/local -xzf go1.16.3.linux-amd64.tar.gz
export PATH=$PATH:/usr/local/go/bin
git clone https://github.com/FiloSottile/mkcert && cd mkcert
go build -ldflags "-X main.Version=$(git describe --tags)"
sudo mv ./mkcert /usr/local/bin && cd ../
sudo chmod +x /usr/local/bin/mkcert
rm -Rf mkcert
curl -sL https://raw.githubusercontent.com/codeenigma/ce-dev/1.x/install.sh | /bin/sh -s -- linux

# Uses the ce-dev stack to run a test Drupal deploy
- name: Run a test ce-dev deploy with Drupal 8
run: |
ce-dev create -p test -t drupal8 -d ~/test
cd ~/test
ce-dev init
ce-dev start
ce-dev provision
ce-dev deploy
curl https://www.test.local
shell: bash
44 changes: 44 additions & 0 deletions .github/workflows/ce-deploy-test-drupal9.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: Run test for Drupal 9

# Run this workflow every time a new commit pushed to your repository
on: pull_request

jobs:
# Set the job key. The key is displayed as the job name
# when a job name is not provided
run-tests:
# Name the Job
name: Run Drupal 9 test build
# Set the type of machine to run on
runs-on: ubuntu-20.04

steps:
# Checks out a copy of your repository on the ubuntu-latest machine
- name: Checkout code
uses: actions/checkout@v2

# Installs the ce-dev stack
- name: Install ce-dev
run: |
cd /tmp
wget https://golang.org/dl/go1.16.3.linux-amd64.tar.gz
sudo tar -C /usr/local -xzf go1.16.3.linux-amd64.tar.gz
export PATH=$PATH:/usr/local/go/bin
git clone https://github.com/FiloSottile/mkcert && cd mkcert
go build -ldflags "-X main.Version=$(git describe --tags)"
sudo mv ./mkcert /usr/local/bin && cd ../
sudo chmod +x /usr/local/bin/mkcert
rm -Rf mkcert
curl -sL https://raw.githubusercontent.com/codeenigma/ce-dev/1.x/install.sh | /bin/sh -s -- linux

# Uses the ce-dev stack to run a test Drupal deploy
- name: Run a test ce-dev deploy with Drupal 9
run: |
ce-dev create -p test -t drupal9 -d ~/test
cd ~/test
ce-dev init
ce-dev start
ce-dev provision
ce-dev deploy
curl https://www.test.local
shell: bash
2 changes: 1 addition & 1 deletion ce-dev/ansible/common.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Common vars for local development.
is_local: yes
is_local: true
ce_deploy:
username: "ce-dev"
own_repository: "https://github.com/codeenigma/ce-deploy.git"
Expand Down
33 changes: 27 additions & 6 deletions ce-dev/ansible/examples/drupal8/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,14 +37,35 @@
pre_tasks:
# You can safely remove these steps once you have a working composer.json.
- name: Download composer file.
get_url:
url: https://raw.githubusercontent.com/drupal/recommended-project/8.8.x/composer.json
ansible.builtin.get_url:
url: https://raw.githubusercontent.com/drupal/recommended-project/8.9.x/composer.json
dest: "{{ deploy_path }}/composer.json"
force: no
force: false
- name: Adding composer/installers plugin to composer config.
community.general.composer:
command: config
arguments: allow-plugins.composer/installers true
working_dir: "{{ deploy_path }}"
- name: Adding drupal/core-composer-scaffold plugin to composer config.
community.general.composer:
command: config
arguments: allow-plugins.drupal/core-composer-scaffold true
working_dir: "{{ deploy_path }}"
- name: Adding drupal/core-project-message plugin to composer config.
community.general.composer:
command: config
arguments: allow-plugins.drupal/core-project-message true
working_dir: "{{ deploy_path }}"
- name: Adding dealerdirect/phpcodesniffer-composer-installer plugin to composer config.
community.general.composer:
command: config
arguments: allow-plugins.dealerdirect/phpcodesniffer-composer-installer true
working_dir: "{{ deploy_path }}"
- name: Install drush.
command:
cmd: composer require drush/drush
chdir: "{{ deploy_path }}"
community.general.composer:
command: require
arguments: drush/drush:10.*
working_dir: "{{ deploy_path }}"
roles:
- _init # Sets some variables the deploy scripts rely on.
- composer # Composer install step.
Expand Down
13 changes: 7 additions & 6 deletions ce-dev/ansible/examples/drupal9/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,14 +37,15 @@
pre_tasks:
# You can safely remove these steps once you have a working composer.json.
- name: Download composer file.
get_url:
url: https://raw.githubusercontent.com/drupal/recommended-project/9.3.x/composer.json
ansible.builtin.get_url:
url: https://raw.githubusercontent.com/drupal/recommended-project/9.5.x/composer.json
dest: "{{ deploy_path }}/composer.json"
force: no
force: false
- name: Install drush.
command:
cmd: composer require drush/drush:11.*
chdir: "{{ deploy_path }}"
community.general.composer:
command: require
arguments: drush/drush:11.*
working_dir: "{{ deploy_path }}"
roles:
- _init # Sets some variables the deploy scripts rely on.
- composer # Composer install step.
Expand Down
49 changes: 38 additions & 11 deletions ce-dev/ansible/examples/localgov/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,23 +37,50 @@
pre_tasks:
# You can safely remove these steps once you have a working composer.json.
- name: Download composer file.
get_url:
url: https://raw.githubusercontent.com/drupal/recommended-project/9.3.x/composer.json
dest: "{{ deploy_path }}/composer.json"
force: false
ansible.builtin.get_url:
url: https://raw.githubusercontent.com/drupal/recommended-project/9.1.x/composer.json
dest: "{{ deploy_path }}/composer.json"
force: false
- name: Adding composer/installers plugin to composer config.
community.general.composer:
command: config
arguments: allow-plugins.composer/installers true
working_dir: "{{ deploy_path }}"
- name: Adding drupal/core-composer-scaffold plugin to composer config.
community.general.composer:
command: config
arguments: allow-plugins.drupal/core-composer-scaffold true
working_dir: "{{ deploy_path }}"
- name: Adding drupal/core-project-message plugin to composer config.
community.general.composer:
command: config
arguments: allow-plugins.drupal/core-project-message true
working_dir: "{{ deploy_path }}"
- name: Adding dealerdirect/phpcodesniffer-composer-installer plugin to composer config.
community.general.composer:
command: config
arguments: allow-plugins.dealerdirect/phpcodesniffer-composer-installer true
working_dir: "{{ deploy_path }}"
- name: Adding cweagans/composer-patches plugin to composer config.
community.general.composer:
command: config
arguments: allow-plugins.cweagans/composer-patches true
working_dir: "{{ deploy_path }}"
- name: Install drush.
command:
cmd: composer require drush/drush:11.*
chdir: "{{ deploy_path }}"
community.general.composer:
command: require
arguments: drush/drush:10.*
working_dir: "{{ deploy_path }}"
- name: Install localgov.
command:
cmd: composer require localgovdrupal/localgov
chdir: "{{ deploy_path }}"
community.general.composer:
command: require
arguments: localgovdrupal/localgov
working_dir: "{{ deploy_path }}"
roles:
- _init # Sets some variables the deploy scripts rely on.
- composer # Composer install step.
- database_backup # This is still needed to generate credentials.
- config_generate # Generates settings.php
# - sync/database_sync # Grab database from a remote server.
- database_apply # Run drush updb and config import.
- _exit # Some common housekeeping.
- _exit # Some common housekeeping.