From 9165010608049581d1d12b0460ca06720c2d1160 Mon Sep 17 00:00:00 2001 From: Kevin Date: Thu, 7 Apr 2016 15:51:37 -0400 Subject: [PATCH 1/3] Converting to ansible Added travis fpm build and deploy to bintray Signed-off-by: Kevin --- .bintray_descriptor.json | 24 ++++++++ .gitignore | 4 ++ .travis.yml | 24 ++++++-- Vagrantfile | 39 ++++++++++++- build_release.sh | 3 + ops/ansible/group_vars/all/vars_file.yml | 3 + ops/ansible/inventory | 0 .../files/apache2/postmaster.conf} | 0 .../roles/postmaster_deploy/handlers/main.yml | 29 ++++++++++ .../roles/postmaster_deploy/tasks/main.yml | 55 +++++++++++++++++++ .../roles/postmaster_deploy/tasks/mysql.yml | 26 +++++++++ ops/ansible/run_ansible.sh | 2 + ops/ansible/site.yml | 6 ++ 13 files changed, 209 insertions(+), 6 deletions(-) create mode 100644 .bintray_descriptor.json create mode 100644 build_release.sh create mode 100644 ops/ansible/group_vars/all/vars_file.yml create mode 100644 ops/ansible/inventory rename ops/{apache.conf => ansible/roles/postmaster_deploy/files/apache2/postmaster.conf} (100%) create mode 100644 ops/ansible/roles/postmaster_deploy/handlers/main.yml create mode 100644 ops/ansible/roles/postmaster_deploy/tasks/main.yml create mode 100644 ops/ansible/roles/postmaster_deploy/tasks/mysql.yml create mode 100644 ops/ansible/run_ansible.sh create mode 100644 ops/ansible/site.yml diff --git a/.bintray_descriptor.json b/.bintray_descriptor.json new file mode 100644 index 0000000..e7e2ee0 --- /dev/null +++ b/.bintray_descriptor.json @@ -0,0 +1,24 @@ +{ + "package": { + "name": "PostMaster", + "repo": "PostMaster", + "subject": "stackfocus", + "desc": "PostMaster is a beautiful web application to manage domains, users, and aliases on a Linux mail server ", + "website_url": "https://github.com/StackFocus/PostMaster", + "issue_tracker_url": "https://github.com/StackFocus/PostMaster/issues", + "vcs_url": "https://github.com/StackFocus/PostMaster.git", + "licenses": ["AGPL"], + "labels": ["Postmaster", "Stackfocus", "Flask"], + "public_download_numbers": true, + "public_stats": true + }, + "version": { + "name": "1.0.0", + "desc": "Abbey Road" + }, + "files": + [ + {"includePattern": "*.deb" } + ], + "publish": true +} diff --git a/.gitignore b/.gitignore index b2b338e..4152b0b 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,5 @@ # Created by https://www.gitignore.io +site.retry .vagrant .idea @@ -64,3 +65,6 @@ docs/_build/ target/ env/ +*.deb + + diff --git a/.travis.yml b/.travis.yml index 5ea2455..0fe4017 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,11 +1,25 @@ -language: python -python: +language: python +python: - "2.7" -install: +install: - pip install -r requirements.txt before_script: - ./pylint-check.py -script: +script: - py.test -v --cov postmaster --cov-report term-missing tests/ -after_success: +after_success: - coveralls + +before_deploy: + - gem install fpm + - ./build_release.sh + +deploy: + provider: bintray + file: .bintray_descriptor.json + user: thatarchguy + key: + secure: qoGnfUwsoajFoclGpmhTFj8rP6botEqdXHBOP8xG3EvdNMvF1FNhH6DjhKBF3bwQf7/VEczz/TqVaTsOgrdHJvVLTxYSckM569wbdFLn6/b1MohdBaxu1/mcXXw+RVTjep45cwlzaMQoe3aZn8KPtjfal5Bitc2U2cNepkoaj+nftNGpCZVh1pWI/uQXlKQK/CfzS8mQSKrdsRuBvko88R7Th8otqdSwx+dM+IwtimJsupAhlbpU5XlK01zNn++QVvZ3kkPGWVxRFLlPhDhWWxK/RmTBLZ/HqoE6oyHBsd+e8ydLvVovMjAdagBq4ABXPstSr9/vYfaS9o6RTaqWbt0MFdkUpQdpfUnFARay8rPYJkzkRdqRll5byRh9IHxZc34z+j3lVjbzKRyb0kfeCTDdidULJytWa3SWN4xdCMhyyjjpULsMI1X4RYYtO89Uc85BlD0AQrWCkmJ7rqpUPxkaSfBEuhotTi0PUyUIaU1xLpgtNQFf70Pf3bSEG6W3XDR3vy2k6yiZWWSRAQWSbxTA64DmW0wk/q9ePxso3uqzALYU1M5WflEEnCBkXGFQh8MqAmugHjP7BMjoe+vlJFt5ddoa7yNV14EkvbHY/rb1JVA2Oa4FgVVyt0JOYEnPIvD+NY0VjFHWrOAro3uKHNlOg5nUaMEddwIuKZpoZgo= + dry-run: true + on: + tags: true diff --git a/Vagrantfile b/Vagrantfile index f92a2f1..576e771 100644 --- a/Vagrantfile +++ b/Vagrantfile @@ -1,9 +1,46 @@ # -*- mode: ruby -*- # vi: set ft=ruby : +# do this to patch ansible because +#https://github.com/mitchellh/vagrant/issues/6793 +$script = <