-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy path.travis.yml
36 lines (33 loc) · 1.39 KB
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
# os: osx # enable this if you need macOS support
language: ruby
rvm:
- 2.3.7
addons:
hosts:
- sftp.server.example
before_install:
- sudo apt-get install openssl
before_script:
- sudo adduser --disabled-password --gecos "SFTP Test" sftp_test
- echo "sftp_test:password" | sudo chpasswd
- sudo mkdir -p /home/sftp_test/.ssh/
- sudo mkdir -p /home/sftp_test/existing_upload_folder/
- sudo chown sftp_test:sftp_test /home/sftp_test/existing_upload_folder
- sudo mkdir -p /home/sftp_test/non_empty_folder/subfolder
- sudo touch /home/sftp_test/non_empty_folder/old.txt
- sudo touch /home/sftp_test/non_empty_folder/subfolder/old.txt
- sudo chown -R sftp_test:sftp_test /home/sftp_test/non_empty_folder
- sudo mkdir -p /var/ftp/sftp_test/
- sudo chown sftp_test:sftp_test /var/ftp/sftp_test/
- sudo mkdir -p /home/sftp_test/download/sub_folder
- sudo touch /home/sftp_test/download/file_01.txt
- sudo touch /home/sftp_test/download/file_02.txt
- sudo touch /home/sftp_test/download/sub_folder/file_03.txt
- sudo touch /home/sftp_test/download/sub_folder/file_04.txt
- sudo chown -R sftp_test:sftp_test /home/sftp_test/download
- sudo cat /etc/ssh/sshd_config
- sudo cp -f assets/sshd_config /etc/ssh/
- sudo cp -f assets/authorized_keys /home/sftp_test/.ssh/
- chmod -R go= assets/keys
- ssh-keyscan -H sftp.server.example >> ~/.ssh/known_hosts
- sudo service ssh restart