Skip to content

Commit

Permalink
Docker Build Again (#704)
Browse files Browse the repository at this point in the history
* Remove composer update hook to also run composer update in control site. 

* put back bin-tools so they are available in bin/ and fix path lookup, aligning with composer's new bin trick.

* Put back Ansible playbook run in docker build command so we can save images.

* Fix up docker-systemd-prepare file.

* Adding run-quiet script to main scripts.

* Run both devshop-install-prerequisites (to install ansible) AND docker-systemd-prepare to ensure fully functioning container.

* Default to ubuntu1804 when using docker/docker-compose.yml

* fix entry points, missing env vars in docker compose, build args, etc.

* Fix robo up and build.

* output more debugging info in GitHub actions.

* Get systems working right in GitHub actions and locally, by REMOVING the systems volume! ¯⁠\⁠_⁠(⁠ツ⁠)⁠_⁠/⁠¯

* thanks geerlingguy/docker-ubuntu2004-ansible#18 (comment)
  • Loading branch information
jonpugh authored Jan 20, 2023
1 parent dc36642 commit fe77cdd
Showing 1 changed file with 28 additions and 14 deletions.
42 changes: 28 additions & 14 deletions tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,18 @@
name: safe.directory
value: "{{ devshop_cli_path }}"

- name: "Retrieve git information"
git:
repo: "{{ devshop_cli_repo }}"
dest: "{{ devshop_cli_path }}"
clone: no
update: no
register: devshop_installed_git_info

- name: Git Information
debug:
msg: "{{ devshop_installed_git_info }}"

- name: Detect currently installed version of DevShop.
command: "{{ devshop_cli_path }}/scripts/branch-or-tag"
register: __devshop_version_installed
Expand Down Expand Up @@ -130,7 +142,19 @@
force: "{{ not devshop_cli_skip_update }}"
when: not devshop_cli_skip_update

- name: "Configure Composer Globally"
- name: Ensure DevShop Control code is owned by platform user.
file:
state: directory
path: "{{ item }}"
group: "{{ aegir_user_name }}"
owner: "{{ aegir_user_name }}"
recurse: true
tags: [always]
with_items:
- "{{ devshop_control_git_root }}"
- "{{ devshop_cli_path }}"

- name: "Composer Install DevShop Source"
command: "{{ php_executable }} {{ composer_path }} {{ devshop_cli_composer_install_command }}"
# Changed: true is so we don't fail ansible lint.
changed_when: true
Expand All @@ -139,6 +163,9 @@
chdir: "{{ item }}"
with_items:
- "{{ devshop_cli_path }}"
become: true
become_user: "{{ aegir_user_name }}"
become_method: "{{ ansible_become_method_aegir }}"

- name: "Install DevShop dependencies with composer"
command: "{{ php_executable }} {{ composer_path }} {{ devshop_cli_composer_install_command }}"
Expand All @@ -150,19 +177,6 @@
with_items:
- "{{ devshop_cli_path }}"

- name: Ensure DevShop Control code is owned by aegir user.
file:
state: directory
path: "{{ item }}"
group: "{{ aegir_user_name }}"
owner: "{{ aegir_user_name }}"
recurse: true
when: devshop_control_git_root is match(devshop_cli_path)
tags: [always]
with_items:
- "{{ devshop_control_git_root }}"
- "{{ devshop_cli_path }}/devmaster"

- name: Add DevShop bin directory to Path
copy:
dest: /etc/profile.d/devshop-cli-path.sh
Expand Down

0 comments on commit fe77cdd

Please sign in to comment.