diff --git a/.github/workflows/ce-provision-test-web.yml b/.github/workflows/ce-provision-test-web.yml index 55a6942f4..275af558e 100644 --- a/.github/workflows/ce-provision-test-web.yml +++ b/.github/workflows/ce-provision-test-web.yml @@ -31,12 +31,12 @@ jobs: 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 + curl -sL https://raw.githubusercontent.com/codeenigma/ce-dev/${{ github.event.pull_request.base.ref }}/install.sh | /bin/sh -s -- --platform linux # Uses the ce-dev stack to run a test provision - name: Run a test provision if: ${{ github.event.pull_request.head.ref != 'documentation' }} run: | - git clone --branch 1.x https://github.com/codeenigma/ce-dev-ce-provision-config.git config + git clone --branch ${{ github.event.pull_request.base.ref }} https://github.com/codeenigma/ce-dev-ce-provision-config.git config /bin/bash ce-dev/ansible/test.sh --examples web --own-branch ${{ github.event.pull_request.base.ref }} --config-branch ${{ github.event.pull_request.base.ref }} shell: bash diff --git a/roles/debian/php-common/templates/sury.pref.j2 b/roles/debian/php-common/templates/sury.pref.j2 index 582556999..c42729d7e 100644 --- a/roles/debian/php-common/templates/sury.pref.j2 +++ b/roles/debian/php-common/templates/sury.pref.j2 @@ -1,3 +1,3 @@ Package: * Pin: origin packages.sury.org/deb/ -Pin-Priority: 1101 \ No newline at end of file +Pin-Priority: 1101 diff --git a/roles/debian/php-fpm/defaults/main.yml b/roles/debian/php-fpm/defaults/main.yml index bd11bd594..120525f84 100644 --- a/roles/debian/php-fpm/defaults/main.yml +++ b/roles/debian/php-fpm/defaults/main.yml @@ -13,7 +13,7 @@ php: # It is important to scale up processes on bigger servers, so that more # requests can be handled. Double the number of vCPUs is a good default. # Can be between 5 and 64. - max_children: "{{ [5, [ansible_facts.processor_vcpus * 2, 64] | min] | max }}" + max_children: "{{ [5, [ansible_facts.ansible_processor_nproc * 2, 64] | min] | max }}" start_servers: 2 min_spare_servers: 1 max_spare_servers: 3 diff --git a/scripts/_common.sh b/scripts/_common.sh index 8ab48b9ad..2eb8d4197 100755 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -154,14 +154,25 @@ cleanup_build_tmp_dir(){ rm -rf "$BUILD_TMP_DIR" fi } + # Trigger actual Ansible job. ansible_play(){ if [ -z "$ANSIBLE_PATH" ]; then if [ "$LINT" = "yes" ]; then # apt repo installed - ANSIBLE_BIN=$(command -v ansible-lint) + if ! command -v ansible-lint; then + echo "### Could not find ansible-lint - Exiting! ###" + exit 1 + else + ANSIBLE_BIN=$(command -v ansible-lint) + fi else - ANSIBLE_BIN=$(command -v ansible-playbook) + if ! command -v ansible-playbook; then + echo "### Could not find ansible-playbook - Exiting! ###" + exit 1 + else + ANSIBLE_BIN=$(command -v ansible-playbook) + fi fi else if [ "$LINT" = "yes" ]; then