From bae488a7eaeae6ec7f197e7f472e15720efea504 Mon Sep 17 00:00:00 2001 From: Nikos Roussos Date: Fri, 8 Sep 2017 18:42:21 +0300 Subject: [PATCH] Update configuration for Gitlab transition * Add CI config * Update README * Remove Changelog (moving to CD) * Split docker to dev and test --- .gitlab-ci.yml | 39 +++++++++++++++ .pyup.yml | 12 ----- .travis.yml | 16 ------- Changelog.md | 74 ---------------------------- README.md | 13 +++-- {docker => bin}/run-celery.sh | 0 {docker => bin}/run-web.sh | 0 db/templates/base.html | 2 +- db/templates/base/faq.html | 6 +-- docker-compose.yml | 82 +++++++++++++++++--------------- Dockerfile => docker/dev | 8 +--- docker/test | 9 ++++ docs/installation-docker.rst | 2 +- docs/installation-virtualenv.rst | 2 +- .env-dist => env-dist | 0 15 files changed, 106 insertions(+), 159 deletions(-) create mode 100644 .gitlab-ci.yml delete mode 100644 .pyup.yml delete mode 100644 .travis.yml delete mode 100644 Changelog.md rename {docker => bin}/run-celery.sh (100%) rename {docker => bin}/run-web.sh (100%) rename Dockerfile => docker/dev (83%) create mode 100644 docker/test rename .env-dist => env-dist (100%) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 0000000..4c9080c --- /dev/null +++ b/.gitlab-ci.yml @@ -0,0 +1,39 @@ +image: registry.gitlab.com/librespacefoundation/satnogs/satnogs-db:latest + +stages: + - test + - deploy + +test: + stage: test + script: + - pip install --no-cache-dir --require-hashes --no-deps -r /app/requirements/dev.txt + - cp env-dist .env + - flake8 . + - pytest + - eslint 'db/static/js/*.js' + - stylelint 'db/static/css/*.css' + +stage: + stage: deploy + environment: stage + only: + - dev + script: + - mkdir -p ~/.ssh + - echo "$SSH_PRIVATE_KEY" >> ~/.ssh/id_rsa + - chmod -R u=rwX,o=,g= ~/.ssh/ + - echo "$SSH_SERVER_HOSTKEY" > ~/.ssh/known_hosts + - git push -u ssh://$SERVER_USER@$SERVER_HOST$SERVER_PATH dev + +production: + stage: deploy + environment: production + only: + - master + script: + - mkdir -p ~/.ssh + - echo "$SSH_PRIVATE_KEY" >> ~/.ssh/id_rsa + - chmod -R u=rwX,o=,g= ~/.ssh/ + - echo "$SSH_SERVER_HOSTKEY" > ~/.ssh/known_hosts + - git push -u ssh://$SERVER_USER@$SERVER_HOST$SERVER_PATH master diff --git a/.pyup.yml b/.pyup.yml deleted file mode 100644 index 856c53d..0000000 --- a/.pyup.yml +++ /dev/null @@ -1,12 +0,0 @@ -# Full list of options at https://pyup.io/docs/configuration/ -update: all -pin: True -branch: dev -schedule: "every week on friday" -search: False -requirements: - - requirements/production.txt -assignees: comzeradd -branch_prefix: pyup- -pr_prefix: "[update]" -close_prs: True diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index d9e6ee7..0000000 --- a/.travis.yml +++ /dev/null @@ -1,16 +0,0 @@ -language: python -dist: trusty -notifications: - email: false -python: - - "2.7" -install: - - pip install -r requirements/dev.txt - - npm install -g eslint stylelint -script: - - flake8 . - - pytest - - eslint 'db/static/js/*.js' - - stylelint 'db/static/css/*.css' -after_success: - - coveralls diff --git a/Changelog.md b/Changelog.md deleted file mode 100644 index 82c5da8..0000000 --- a/Changelog.md +++ /dev/null @@ -1,74 +0,0 @@ -## 2017.05-1 -* Counts of payloads on satellite page -* Recamp homepage UI -* Fetch and keep on TLE per Satellite -* Add gulp support -* Upgrade to Django 1.11 -* Add task to export satellite frames on csv -* Add Satellite status -* Add decoder for UniSAT-6 -* Add description field on Satellites - -## 0.9 -* Add redis support for cache -* Add dnd-helper for Do-Not-Track -* Add CSP support -* Use hashes for pip -* First iteratio of SiDS support -* Add API Key Tokens -* Split fetch and decode telemetry data jobs - -## 0.8 - -* Add telemetry decoding functionlity -* Add telemetry UI per satellite -* Add travis support -* Switch to bower for static dependencies -* Increase frq precision -* Add stats visualizations - -## 0.7 - -* Provide initiliaze command for developers -* Enhance Satellite view with image -* Fix case sensitivity on filtering -* Add static files compression -* Show suggestion to frontend for admins -* Email admins on new suggestion - -## 0.6 - -* Redesign homepage UI -* Satellite additional names and image -* Move Modes to model - -## 0.5 - -* Rename Transponders to Transmitters - -## 0.4 - -* Hide suggestions counter when None -* Command to fetch satellites names -* Opbeat logging -* Notify user when their suggestion is approved -* API filtering -* Custom 404/500 pages - -## 0.3 - -* Show active link on top menu -* Beautify freqs as MHz -* Add Suggestions stats - -## 0.2 - -* Simplify suggestions UI -* About page -* FAQ -* Opbeat -* Suggestion approval admin action - -## 0.1 - -* Initial release diff --git a/README.md b/README.md index 8f7765a..3dfbdae 100644 --- a/README.md +++ b/README.md @@ -2,24 +2,23 @@ SatNOGS DB is a transmitter suggestions and crowd-sourcing app. -## Install and Contribute +## Contribute -See the [documentation](http://docs.satnogs.org/en/stable/db/). +Check out the [documentation](https://docs.satnogs.org/en/stable/satnogs-db/docs/) on how to setup a local development instance. The main repository lives on [Gitlab](https://gitlab.com/librespacefoundation/satnogs/satnogs-db). ## Join +[![irc](https://img.shields.io/badge/Matrix-%23satnogs:matrix.org-blue.svg)](https://riot.im/app/#/room/#satnogs:matrix.org) [![irc](https://img.shields.io/badge/IRC-%23satnogs%20on%20freenode-blue.svg)](https://webchat.freenode.net/?channels=satnogs) -[![irc](https://img.shields.io/badge/forum-discourse-blue.svg)](https://community.satnogs.org/) +[![irc](https://img.shields.io/badge/forum-discourse-blue.svg)](https://community.libre.space/c/satnogs) ## Current Development [![kanban](https://img.shields.io/badge/kanban-board-lightgray.svg)](https://gitlab.com/librespacefoundation/satnogs/satnogs-db/boards/345706) -[![travis](https://img.shields.io/travis/satnogs/satnogs-db/dev.svg?label=tests)](http://travis-ci.org/satnogs/satnogs-db/) -[![coveralls](https://img.shields.io/coveralls/satnogs/satnogs-db/dev.svg)](https://coveralls.io/github/satnogs/satnogs-db) -[![updates](https://pyup.io/repos/github/satnogs/satnogs-db/shield.svg)](https://pyup.io/repos/github/satnogs/satnogs-db/) -[![Python 3](https://pyup.io/repos/github/satnogs/satnogs-db/python-3-shield.svg)](https://pyup.io/repos/github/satnogs/satnogs-db/) +[![build](https://gitlab.com/librespacefoundation/satnogs/satnogs-db/badges/dev/build.svg)](https://gitlab.com/librespacefoundation/satnogs/satnogs-db/commits/dev) +[![coverage](https://gitlab.com/librespacefoundation/satnogs/satnogs-db/badges/dev/coverage.svg)](https://gitlab.com/librespacefoundation/satnogs/satnogs-db/commits/dev) ## License diff --git a/docker/run-celery.sh b/bin/run-celery.sh similarity index 100% rename from docker/run-celery.sh rename to bin/run-celery.sh diff --git a/docker/run-web.sh b/bin/run-web.sh similarity index 100% rename from docker/run-web.sh rename to bin/run-web.sh diff --git a/db/templates/base.html b/db/templates/base.html index b66f36d..10baefb 100644 --- a/db/templates/base.html +++ b/db/templates/base.html @@ -43,7 +43,7 @@
  • About
  • Statistics
  • FAQ
  • -
  • Community
  • +
  • Community