Skip to content

Commit

Permalink
Codeserver docs + ubuntu 24 integration tests (#71)
Browse files Browse the repository at this point in the history
* Add docs around IDE identity

* Add build step

* test on ubuntu 24.04 and record db in logs

* fixup link

* Update README.template.md
  • Loading branch information
joecorall authored Nov 12, 2024
1 parent 0a24db0 commit 612df53
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 3 deletions.
11 changes: 8 additions & 3 deletions .github/workflows/integration-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,10 @@ on:
- cron: '15 11 * * *'
jobs:
build:
runs-on: ubuntu-latest
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-22.04, ubuntu-24.04]
env:
ISLANDORA_TAG: "${{ github.event.inputs.buildkit-tag }}"
ISLANDORA_STARTER_REF: "${{ github.event.inputs.starter-site-ref }}"
Expand All @@ -43,13 +46,14 @@ jobs:
for service in $services; do
docker compose --profile dev logs $service > "logs/${service}.log"
done
docker compose --profile dev exec mariadb-dev mysqldump drupal_default > logs/drupal_default.sql
- name: Upload logs as artifacts
if: ${{ always() }}
uses: actions/upload-artifact@v3
with:
name: docker-logs
path: logs/*.log
path: logs/*

- name: Notify Slack on nightly test failure
if: failure() && github.event_name == 'schedule'
Expand All @@ -58,4 +62,5 @@ jobs:
"text": "🚨 Scheduled job failed! Click to view the run: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}",
}'
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}

16 changes: 16 additions & 0 deletions README.template.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
- [OSX and Linux](#osx-and-linux-2)
- [Upgrading Isle Docker Images](#upgrading-isle-docker-images)
- [Drupal Development](#drupal-development)
- [Pushing code changes](#pushing-code-changes)
- [Production](#production)
- [Generate secrets](#generate-secrets)
- [Production Domain](#production-domain)
Expand Down Expand Up @@ -405,6 +406,21 @@ the Drupal Docker image, see [building](#building) for how.
> should be fairly locked down, and only permit changes to content and not
> configuration.
### Pushing code changes

The [IDE] configured for local development receives its identity from the host system using `ssh-agent`. This is how you are able to `git push` from within the IDE container to a remote git origin (e.g. GitHub). Depending on whether the host is [Mac OS or Linux the docker compose overrides](#docker-compose) can be seen in the respective override file on how the host identity is propagated into the IDE container.

> [!WARNING]
> If ssh-agent is not configured properly on your host, code changes made in the IDE may be lost
>
> For linux host systems such as Debian or Ubuntu 24+ an environment variable `SSH_AUTH_SOCK` (set by `ssh-agent`) needs to be available in order to pass the host system's SSH identity into the IDE container. If this environment variable is not set (which can be checked on the host by seeing if `echo $SSH_AUTH_SOCK` prints output) it will need to be configured on your host system in order to allow the IDE to `git push` code changes to remote git origins. One possible solution to set this is to add this to your shell's login profile. e.g.
>
>```
>echo 'eval $(ssh-agent -s)' >> ~/.bashrc
>```
After ensuring `SSH_AUTH_SOCK` is set properly, you will need to restart the codeserver service to pickup the changes. Then you should be able to push changes made in your IDE to a remote git origin.
# Production
Running in production makes use of the [production profile], which requires
Expand Down
1 change: 1 addition & 0 deletions tests/init-template-starter.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ cp ./tests/solr.php drupal/rootfs/var/www/drupal/
./generate-certs.sh
./generate-secrets.sh

docker compose --profile dev build --pull
docker compose --profile dev up -d

echo "Waiting for installation..."
Expand Down

0 comments on commit 612df53

Please sign in to comment.