mirror of
https://github.com/e107inc/e107.git
synced 2025-08-16 11:36:08 +02:00
Automated acceptance tests
Includes a Dockerfile that can be used to build the ghcr.io/e107inc/e107/e107-dev container
This commit is contained in:
27
e107_tests/lib/ci/Dockerfile
Normal file
27
e107_tests/lib/ci/Dockerfile
Normal file
@@ -0,0 +1,27 @@
|
||||
FROM ubuntu:20.04
|
||||
|
||||
ENV DEBIAN_FRONTEND noninteractive
|
||||
|
||||
RUN apt-get update
|
||||
RUN apt-get install -y wget gnupg
|
||||
RUN wget -O - https://repo.saltstack.com/py3/ubuntu/20.04/amd64/latest/SALTSTACK-GPG-KEY.pub | apt-key add -
|
||||
RUN mkdir -pv /etc/apt/sources.list.d/
|
||||
RUN echo 'deb http://repo.saltstack.com/py3/ubuntu/20.04/amd64/latest focal main' |\
|
||||
tee /etc/apt/sources.list.d/saltstack.list
|
||||
RUN apt-get update
|
||||
RUN apt-get install -y systemd-sysv salt-minion openssh-server rsync
|
||||
RUN systemctl disable salt-minion.service
|
||||
RUN mkdir -pv /etc/salt/
|
||||
|
||||
COPY salt /var/tmp/salt
|
||||
COPY config.ci.yml /var/tmp/salt/pillars/config-local.sls
|
||||
RUN rm -fv /var/tmp/salt/pillars/config.sls && touch /var/tmp/salt/pillars/config.sls
|
||||
RUN rm -fv /var/tmp/salt/pillars/config-sample.sls && touch /var/tmp/salt/pillars/config-sample.sls
|
||||
RUN cp -fv /var/tmp/salt/master /etc/salt/minion
|
||||
|
||||
WORKDIR /var/tmp/salt
|
||||
RUN salt-call -l debug --id=e107-dev --local state.apply e107-dev
|
||||
WORKDIR /
|
||||
|
||||
VOLUME ["/sys/fs/cgroup"]
|
||||
ENTRYPOINT ["/usr/sbin/init"]
|
@@ -1,9 +1,15 @@
|
||||
---
|
||||
deployer: 'local'
|
||||
url: 'http://set-this-to-your-acceptance-test-url.local/'
|
||||
deployer: 'sftp'
|
||||
url: 'http://target/e107/'
|
||||
db:
|
||||
host: 'db'
|
||||
dbname: 'app'
|
||||
user: 'root'
|
||||
password: 'Database Password for Continuous Integration'
|
||||
populate: true
|
||||
fs:
|
||||
host: 'target'
|
||||
user: 'www-data'
|
||||
port: '22'
|
||||
password: 'UNIX Password for Continuous Integration'
|
||||
path: '/var/www/html/e107/'
|
@@ -34,7 +34,8 @@ class SFTPDeployer extends Deployer
|
||||
|
||||
private function generateRsyncRemoteShell()
|
||||
{
|
||||
$prefix = 'ssh -p '.escapeshellarg($this->getFsParam('port'));
|
||||
$prefix = 'ssh -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -p '.
|
||||
escapeshellarg($this->getFsParam('port'));
|
||||
if (!empty($this->getFsParam('privkey_path')))
|
||||
return $prefix.' -i ' . escapeshellarg($this->getFsParam('privkey_path'));
|
||||
else
|
||||
|
Reference in New Issue
Block a user