runs-on: ${{ matrix.os.runs_on }}
+ container:
+ image: ${{ matrix.os.docker }}
+ # "privileged" is needed for Samba install
+ # "memory-swap -1" enables full use of host swap and may help
+ # with containers randomly quitting with "The operation was
+ # canceled"
+ options: >-
+ --privileged
+ --memory-swap -1
+
strategy:
fail-fast: false
matrix:
# changes.
name: "master-${{ matrix.os.name }}-${{ matrix.env.NAME}}"
+ # The standard GitHub environment contains PostgreSQL and
+ # MySQL already. However when running on hosted GitHub runners
+ # we need to run separate database containers to provide these.
+ services:
+ mariadb:
+ image: mariadb
+ env:
+ MARIADB_ALLOW_EMPTY_ROOT_PASSWORD: yes
+ ports:
+ - 3306:3306
+ options: >-
+ --health-cmd="mysqladmin ping"
+ --health-interval 10s
+ --health-timeout 5s
+ --health-retries 10
+
+ postgres:
+ image: postgres
+ env:
+ POSTGRES_HOST_AUTH_METHOD: trust
+ ports:
+ - 5432:5432
+ options: >-
+ --health-cmd pg_isready
+ --health-interval 10s
+ --health-timeout 5s
+ --health-retries 5
+
+ redis:
+ image: redis
+ ports:
+ - 6379:6379
+ options: >-
+ --health-cmd "redis-cli ping"
+ --health-interval 10s
+ --health-timeout 5s
+ --health-retries 5
+
+ threeds:
+ image: 389ds/dirsrv
+ ports:
+ - 3389
+ - 3636
+ options: >-
+ -e DS_SUFFIX_NAME=dc=example,dc=com
+ -e DS_DM_PASSWORD=secret123
+ --health-cmd "dsctl localhost healthcheck --check backends:localhost:search"
+ --health-interval 10s
+ --health-timeout 5s
+ --health-retries 5
+
steps:
# Checkout, but defer pulling LFS objects until we've restored the cache
#!/bin/sh
-# Remove previous samba config and stop all services
-sudo systemctl stop smbd
-sudo systemctl disable smbd
-sudo systemctl mask smbd
-
-sudo systemctl stop nmbd
-sudo systemctl disable nmbd
-sudo systemctl mask nmbd
+if [ "$USE_DOCKER" != "true" ]; then
+ # Remove previous samba config and stop all services
+ sudo systemctl stop smbd
+ sudo systemctl disable smbd
+ sudo systemctl mask smbd
+
+ sudo systemctl stop nmbd
+ sudo systemctl disable nmbd
+ sudo systemctl mask nmbd
+
+ # Enable the AD-DC samba service
+ sudo systemctl unmask samba-ad-dc
+ sudo systemctl enable samba-ad-dc
+ sudo systemctl stop samba-ad-dc
+fi
sudo rm /etc/samba/smb.conf
-# Enable the AD-DC samba service
-sudo systemctl unmask samba-ad-dc
-sudo systemctl enable samba-ad-dc
-sudo systemctl stop samba-ad-dc
-
# Remove other samba data
for DIR in $(/usr/sbin/smbd -b | awk '/LOCKDIR|STATEDIR|CACHEDIR|PRIVATE_DIR/{print $2}'); do
sudo rm -rf "$DIR"/*
sudo sed -i 's/\[global\]/\[global\]\n\tldap server require strong auth = no/' /etc/samba/smb.conf
# Start the domain controller
-sudo systemctl start samba-ad-dc
+if [ "$USE_DOCKER" != "true" ]; then
+ sudo systemctl start samba-ad-dc
+else
+ /usr/sbin/samba
+fi