diff --git a/.github/workflows/build_deploy_and_test.yml b/.github/workflows/build_deploy_and_test.yml index 411d473..de59925 100644 --- a/.github/workflows/build_deploy_and_test.yml +++ b/.github/workflows/build_deploy_and_test.yml @@ -323,6 +323,14 @@ jobs: app-name: ${{ env.AZURE_WEBAPP_NAME }} publish-profile: ${{ secrets.AZURE_WEBAPP_PUBLISH_PROFILE }} images: 'ghcr.io/${{ env.REPO }}-azure:${{ github.sha }}' + - name: Drush deploy + run: | + az webapp create-remote-connection \ + --resource-group drupal-example-stirred-dove \ + --name drupal-example-precious-seasnail \ + --port 16385 & + sleep 30 + sshpass -pDocker\! ssh root@127.0.0.1 -m hmac-sha1 -p 16385 -o "StrictHostKeyChecking no" /var/www/vendor/bin/drush deploy e2e_test: name: Feature tests diff --git a/Dockerfile b/Dockerfile index a731d02..ad38e62 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,6 +1,17 @@ # check=skip=SecretsUsedInArgOrEnv FROM ghcr.io/uceap/devcontainer-drupal:v2.3.0 + +# Install SSH server +RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \ + && apt-get install -y openssh-server \ + && apt-get clean -y && rm -rf /var/lib/apt/lists/* \ + && echo "Port 2222" >> /etc/ssh/sshd_config.d/azure.conf \ + && echo 'PermitRootLogin yes' >> /etc/ssh/sshd_config.d/azure.conf \ + && echo 'root:Docker!' | chpasswd +COPY docker-uceap-entrypoint /usr/local/bin/docker-uceap-entrypoint +ENTRYPOINT ["docker-uceap-entrypoint"] + ARG MYSQL_HOST ARG MYSQL_TCP_PORT ARG MYSQL_USER diff --git a/docker-uceap-entrypoint b/docker-uceap-entrypoint new file mode 100755 index 0000000..8c2e892 --- /dev/null +++ b/docker-uceap-entrypoint @@ -0,0 +1,6 @@ +#!/bin/sh +set -e + +service ssh start + +exec apache2-foreground