mirror of
https://github.com/dokku/dokku.git
synced 2025-12-29 00:25:08 +01:00
ci stuff
This commit is contained in:
26
tests/ci/boot.sh
Executable file
26
tests/ci/boot.sh
Executable file
@@ -0,0 +1,26 @@
|
||||
#!/usr/bin/env bash
|
||||
set -eo pipefail
|
||||
|
||||
export DEBIAN_FRONTEND=noninteractive
|
||||
apt-get install -y git make curl
|
||||
|
||||
cd /tmp
|
||||
|
||||
wget http://j.mp/godeb
|
||||
tar -zxvf ./godeb
|
||||
./godeb install 1.1.2
|
||||
|
||||
git clone https://github.com/flynn/gitreceive-next.git
|
||||
cd gitreceive-next && make install
|
||||
|
||||
curl https://raw.github.com/progrium/dokku/master/tests/ci/receiver -s > /tmp/receiver
|
||||
chmod +x /tmp/receiver
|
||||
|
||||
ssh-keygen -f $HOME/.ssh/id_rsa -t rsa -N ''
|
||||
|
||||
cat<<EOF > /etc/init/gitreceived.conf
|
||||
start on runlevel [2345]
|
||||
exec /usr/local/bin/gitreceived -p 2022 -n /root/.ssh/id_rsa /tmp/receiver
|
||||
EOF
|
||||
|
||||
start gitreceived
|
||||
27
tests/ci/receiver
Executable file
27
tests/ci/receiver
Executable file
@@ -0,0 +1,27 @@
|
||||
#!/usr/bin/env bash
|
||||
set -eo pipefail
|
||||
|
||||
if [[ $3 == *dokku* ]]; then
|
||||
mkdir $HOME/build
|
||||
cd $HOME/build
|
||||
tar -xf -
|
||||
echo "-----> Installing dependencies"
|
||||
sudo DEBIAN_FRONTEND=noninteractive apt-get install -y git make curl software-properties-common
|
||||
echo "-----> Running make install"
|
||||
sudo DEBIAN_FRONTEND=noninteractive HOSTNAME=dokku.me make install
|
||||
echo "-----> Generating keypair..."
|
||||
ssh-keygen -f $HOME/.ssh/id_rsa -t rsa -N ''
|
||||
echo "-----> Installing SSH public key..."
|
||||
cat ~/.ssh/id_rsa.pub | sudo sshcommand acl-add dokku test
|
||||
echo "-----> Intitial SSH connection to populate known_hosts..."
|
||||
ssh -o StrictHostKeyChecking=no dokku@dokku.me help
|
||||
echo "-----> Running tests"
|
||||
cd tests
|
||||
for app_path in apps/*; do
|
||||
app=$(basename $app_path)
|
||||
echo "-----> Running test deploy of $app..."
|
||||
./test_deploy $app_path dokku.me $FORWARDED_PORT
|
||||
done
|
||||
else
|
||||
echo "-----> Repository invalid."
|
||||
fi
|
||||
Reference in New Issue
Block a user