From 5acfdb491b5e7f6ce9530c2cf5882e805f2e0ba9 Mon Sep 17 00:00:00 2001 From: Brandon Lopez Date: Sun, 29 Jul 2018 20:34:29 -0700 Subject: [PATCH 01/17] Updated .gitignore --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index e5d9ef6..d95c119 100644 --- a/.gitignore +++ b/.gitignore @@ -4,3 +4,4 @@ ve/ share/vim/.vim/ share/vim/.viminfo typescript +venv/ From 22953bb109adc45c142e0653ca87f10d7a798065 Mon Sep 17 00:00:00 2001 From: Brandon Lopez Date: Sun, 29 Jul 2018 23:51:41 -0700 Subject: [PATCH 02/17] Can now build a Docker image of the app with cheatsheets pulled in at build time and use Docker Compose to get it running with Redis --- Dockerfile | 9 +++++++++ bin/srv.py | 3 ++- docker-compose.yml | 15 +++++++++++++++ lib/beautifier.py | 4 ++-- lib/get_answer.py | 4 ++-- lib/globals.py | 3 ++- lib/stateful_queries.py | 3 ++- share/scripts/get-sheets.sh | 2 +- 8 files changed, 35 insertions(+), 8 deletions(-) create mode 100644 Dockerfile create mode 100644 docker-compose.yml diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..c4586bb --- /dev/null +++ b/Dockerfile @@ -0,0 +1,9 @@ +FROM alpine:latest +RUN apk add --update --no-cache python2 py2-pip py2-gevent \ + py2-flask py2-requests py2-pygments py2-redis \ + py2-cffi py2-icu bash vim gawk sed +WORKDIR /app +COPY . /app +RUN apk add --update --no-cache --virtual build-deps python2-dev build-base git && pip install -r requirements.txt && sh share/scripts/get-sheets.sh && apk del build-deps +ENTRYPOINT ["python2"] +CMD ["bin/srv.py"] \ No newline at end of file diff --git a/bin/srv.py b/bin/srv.py index ce646aa..858cf3b 100644 --- a/bin/srv.py +++ b/bin/srv.py @@ -6,8 +6,9 @@ Main server program. """ from __future__ import print_function -from gevent.pywsgi import WSGIServer from gevent.monkey import patch_all +from gevent.pywsgi import WSGIServer + patch_all() # pylint: disable=wrong-import-position,wrong-import-order diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..91a6f84 --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,15 @@ +version: '3.6' +services: + app: + build: + context: . + depends_on: + - redis + ports: + - "8002:8002" + redis: + image: redis:3.2-alpine + volumes: + - redis_data:/data +volumes: + redis_data: \ No newline at end of file diff --git a/lib/beautifier.py b/lib/beautifier.py index 3a257d2..1518b33 100644 --- a/lib/beautifier.py +++ b/lib/beautifier.py @@ -36,10 +36,10 @@ import redis MYDIR = os.path.abspath(os.path.join(__file__, '..', '..')) sys.path.append("%s/lib/" % MYDIR) from languages_data import VIM_NAME -from globals import PATH_VIM_ENVIRONMENT +from globals import PATH_VIM_ENVIRONMENT, REDISHOST # pylint: enable=wrong-import-position,wrong-import-order -REDIS = redis.StrictRedis(host='localhost', port=6379, db=1) +REDIS = redis.StrictRedis(host=REDISHOST, port=6379, db=1) FNULL = open(os.devnull, 'w') TEXT = 0 CODE = 1 diff --git a/lib/get_answer.py b/lib/get_answer.py index e4363cf..aac6fb8 100644 --- a/lib/get_answer.py +++ b/lib/get_answer.py @@ -25,13 +25,13 @@ from polyglot.detect.base import UnknownLanguage import time import beautifier -from globals import MYDIR, PATH_TLDR_PAGES, PATH_CHEAT_PAGES, PATH_CHEAT_SHEETS, COLOR_STYLES +from globals import MYDIR, PATH_TLDR_PAGES, PATH_CHEAT_PAGES, PATH_CHEAT_SHEETS, COLOR_STYLES, REDISHOST from adapter_learnxiny import get_learnxiny, get_learnxiny_list, is_valid_learnxy from languages_data import LANGUAGE_ALIAS, SO_NAME from colorize_internal import colorize_internal # pylint: enable=wrong-import-position,wrong-import-order -REDIS = redis.StrictRedis(host='localhost', port=6379, db=0) +REDIS = redis.StrictRedis(host=REDISHOST, port=6379, db=0) MAX_SEARCH_LEN = 20 diff --git a/lib/globals.py b/lib/globals.py index c285369..3c3b700 100644 --- a/lib/globals.py +++ b/lib/globals.py @@ -9,6 +9,7 @@ import os from pygments.styles import get_all_styles MYDIR = os.path.abspath(os.path.join(__file__, '..', '..')) +REDISHOST = 'redis' ANSI2HTML = os.path.join(MYDIR, "share/ansi2html.sh") @@ -18,7 +19,7 @@ TEMPLATES = os.path.join(MYDIR, 'share/templates') STATIC = os.path.join(MYDIR, 'share/static') PATH_VIM_ENVIRONMENT = os.path.join(MYDIR, 'share/vim') -USE_OS_PACKAGES = True # change it False if you pull cheat sheets repositories from GitHub +USE_OS_PACKAGES = False # change it False if you pull cheat sheets repositories from GitHub if USE_OS_PACKAGES: PATH_TLDR_PAGES = "/home/igor/.tldr/cache/pages/*/*.md" PATH_CHEAT_PAGES = "/usr/local/lib/python2.7/dist-packages/cheat/cheatsheets/*" diff --git a/lib/stateful_queries.py b/lib/stateful_queries.py index 424072a..578e2e2 100644 --- a/lib/stateful_queries.py +++ b/lib/stateful_queries.py @@ -3,8 +3,9 @@ Support for the stateful queries """ import redis +from globals import REDISHOST -REDIS = redis.StrictRedis(host='localhost', port=6379, db=1) +REDIS = redis.StrictRedis(host=REDISHOST, port=6379, db=1) def save_query(client_id, query): """ diff --git a/share/scripts/get-sheets.sh b/share/scripts/get-sheets.sh index 7145e54..c72184b 100644 --- a/share/scripts/get-sheets.sh +++ b/share/scripts/get-sheets.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/bin/sh ## this doesn't error check, if it breaks and destroys things I'm sorry From 13ec7989db784870b839796e3ecca0c8341a080f Mon Sep 17 00:00:00 2001 From: Brandon Lopez Date: Mon, 30 Jul 2018 13:01:25 -0700 Subject: [PATCH 03/17] TravisCI test --- .travis.yml | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 .travis.yml diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..22a824f --- /dev/null +++ b/.travis.yml @@ -0,0 +1,15 @@ +env: + DOCKER_COMPOSE_VERSION: 1.22.0 + +before_install: + - sudo apt-get update + - sudo apt-get install -o Dpkg::Options::="--force-confold" --force-yes -y docker-engine + - docker-compose --version + - sudo rm /usr/local/bin/docker-compose + - curl -L https://github.com/docker/compose/releases/download/${DOCKER_COMPOSE_VERSION}/docker-compose-`uname -s`-`uname -m` > docker-compose + - chmod +x docker-compose + - sudo mv docker-compose /usr/local/bin + - docker-compose --version + - docker-compose build + - docker-compose start + - docker ps From f5833732f5da3a7ab2cfe6f005fe24a80ca56b5c Mon Sep 17 00:00:00 2001 From: Brandon Lopez Date: Mon, 30 Jul 2018 13:09:10 -0700 Subject: [PATCH 04/17] Fix up .travisci.yml --- .travis.yml | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/.travis.yml b/.travis.yml index 22a824f..bf137c5 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,15 +1,22 @@ +dist: trusty +sudo: required + +services: + - docker + env: DOCKER_COMPOSE_VERSION: 1.22.0 +addons: + apt: + packages: + - docker-ce + before_install: - - sudo apt-get update - - sudo apt-get install -o Dpkg::Options::="--force-confold" --force-yes -y docker-engine - - docker-compose --version - sudo rm /usr/local/bin/docker-compose - curl -L https://github.com/docker/compose/releases/download/${DOCKER_COMPOSE_VERSION}/docker-compose-`uname -s`-`uname -m` > docker-compose - chmod +x docker-compose - sudo mv docker-compose /usr/local/bin - - docker-compose --version - docker-compose build - docker-compose start - docker ps From 80dedbb9ea6086a34a3d0d7a19c9efa3e52cd1cb Mon Sep 17 00:00:00 2001 From: Brandon Lopez Date: Mon, 30 Jul 2018 13:17:35 -0700 Subject: [PATCH 05/17] Fix up .travisci.yml, compose up instead of start --- .travis.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index bf137c5..203aa96 100644 --- a/.travis.yml +++ b/.travis.yml @@ -17,6 +17,5 @@ before_install: - curl -L https://github.com/docker/compose/releases/download/${DOCKER_COMPOSE_VERSION}/docker-compose-`uname -s`-`uname -m` > docker-compose - chmod +x docker-compose - sudo mv docker-compose /usr/local/bin - - docker-compose build - - docker-compose start + - docker-compose up -d - docker ps From 1d042ed1040c83cd6bed1ca59798c84671ff8f66 Mon Sep 17 00:00:00 2001 From: Brandon Lopez Date: Mon, 30 Jul 2018 13:27:07 -0700 Subject: [PATCH 06/17] Stupid little issues with .travisci.yml, changed language to generic --- .travis.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.travis.yml b/.travis.yml index 203aa96..3a40513 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,6 +1,9 @@ dist: trusty sudo: required +language: + - generic + services: - docker From 6b48b06f203066db95a76542c259d49d101a9468 Mon Sep 17 00:00:00 2001 From: Brandon Lopez Date: Mon, 30 Jul 2018 20:44:47 -0700 Subject: [PATCH 07/17] Dockerfile clean up --- Dockerfile | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/Dockerfile b/Dockerfile index c4586bb..7a05870 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,9 +1,14 @@ FROM alpine:latest -RUN apk add --update --no-cache python2 py2-pip py2-gevent \ - py2-flask py2-requests py2-pygments py2-redis \ - py2-cffi py2-icu bash vim gawk sed WORKDIR /app COPY . /app -RUN apk add --update --no-cache --virtual build-deps python2-dev build-base git && pip install -r requirements.txt && sh share/scripts/get-sheets.sh && apk del build-deps +RUN apk add --update --no-cache python2 py2-pip py2-gevent \ + py2-flask py2-requests py2-pygments py2-redis \ + py2-cffi py2-icu bash vim gawk sed \ + && apk add --update --no-cache --virtual build-deps python2-dev \ + build-base git \ + && pip install -r requirements.txt \ + && sh share/scripts/get-sheets.sh \ + && apk del build-deps \ + && rm -rf /var/cache/apk/* ENTRYPOINT ["python2"] -CMD ["bin/srv.py"] \ No newline at end of file +CMD ["bin/srv.py"] From 5ac5ae5117a64d46fe902adc0d2cb448ffaa3b5c Mon Sep 17 00:00:00 2001 From: Brandon Lopez Date: Mon, 30 Jul 2018 20:45:35 -0700 Subject: [PATCH 08/17] Add dockerignore --- .dockerignore | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .dockerignore diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000..30a9ca2 --- /dev/null +++ b/.dockerignore @@ -0,0 +1,5 @@ +.travis.yml +.git +.gitignore +docker-compose.yml +Dockerfile From 06af6b158779f07106fbdb488b3b9e6c07109e15 Mon Sep 17 00:00:00 2001 From: Brandon Lopez Date: Tue, 31 Jul 2018 09:20:50 -0700 Subject: [PATCH 09/17] Changed docker-compose.yml version from 3.6 to 2 for compatibility --- docker-compose.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker-compose.yml b/docker-compose.yml index 91a6f84..29ffb36 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,4 +1,4 @@ -version: '3.6' +version: '2' services: app: build: From 81aa27f1631080e8ae77f888dea9925d019795d9 Mon Sep 17 00:00:00 2001 From: Brandon Lopez Date: Tue, 31 Jul 2018 10:50:25 -0700 Subject: [PATCH 10/17] Update docker-compose.yml redis 3.2 -> 4 --- docker-compose.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index 29ffb36..589033c 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -8,8 +8,8 @@ services: ports: - "8002:8002" redis: - image: redis:3.2-alpine + image: redis:4-alpine volumes: - redis_data:/data volumes: - redis_data: \ No newline at end of file + redis_data: From 3200925e2e313cea10227fa02fcdcdf8aac0bb9a Mon Sep 17 00:00:00 2001 From: Brandon Lopez Date: Tue, 31 Jul 2018 10:54:14 -0700 Subject: [PATCH 11/17] Update Dockerfile Little more Dockerfile cleanup --- Dockerfile | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index 7a05870..95c26a2 100644 --- a/Dockerfile +++ b/Dockerfile @@ -4,11 +4,10 @@ COPY . /app RUN apk add --update --no-cache python2 py2-pip py2-gevent \ py2-flask py2-requests py2-pygments py2-redis \ py2-cffi py2-icu bash vim gawk sed \ - && apk add --update --no-cache --virtual build-deps python2-dev \ + && apk add --no-cache --virtual build-deps python2-dev \ build-base git \ && pip install -r requirements.txt \ && sh share/scripts/get-sheets.sh \ - && apk del build-deps \ - && rm -rf /var/cache/apk/* + && apk del build-deps ENTRYPOINT ["python2"] CMD ["bin/srv.py"] From 19c0aaa437f495aa9dfde3bbf8bd44b88ec7cfe4 Mon Sep 17 00:00:00 2001 From: Brandon Lopez Date: Wed, 1 Aug 2018 19:27:26 -0700 Subject: [PATCH 12/17] Different compose file whether we want to build and run or just pull and run --- README.md | 9 +++++++++ docker-compose.build.yml | 15 +++++++++++++++ docker-compose.yml | 3 +-- 3 files changed, 25 insertions(+), 2 deletions(-) create mode 100644 docker-compose.build.yml diff --git a/README.md b/README.md index e428b90..4962e06 100644 --- a/README.md +++ b/README.md @@ -43,6 +43,8 @@ Such a thing exists. * [Client usage](#client-usage) * [Tab-completion](#tab-completion) * [Stealth mode](#stealth-mode) +* [Self-Hosting](#self-hosting) + * [Docker](#docker) * [Editors integration](#editors-integration) * [Vim](#vim) * [Emacs](#emacs) @@ -405,6 +407,13 @@ because you know what happens when you do. ![when you lie in your interview](http://cheat.sh/files/when-you-lie-katze.png) +## Self-Hosting + +### Docker + +Currently the easiest way to get a self-hosted instance running is by using the docker-compose.yml file provided in the extra/docker folder. +This pulls down the latest image with baked in cheatsheets and starts the app and a Redis instance to back it, making the service available on port 8002 of the local host. This is currently an early implementation and should probably not be used for anything outside of internal/dev/personal use right now. + ## Editors integration You can use *cheat.sh* directly from the editor (*Vim*, *Emacs* and *Visual Studio Code* are currently supported). diff --git a/docker-compose.build.yml b/docker-compose.build.yml new file mode 100644 index 0000000..589033c --- /dev/null +++ b/docker-compose.build.yml @@ -0,0 +1,15 @@ +version: '2' +services: + app: + build: + context: . + depends_on: + - redis + ports: + - "8002:8002" + redis: + image: redis:4-alpine + volumes: + - redis_data:/data +volumes: + redis_data: diff --git a/docker-compose.yml b/docker-compose.yml index 589033c..d679823 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,8 +1,7 @@ version: '2' services: app: - build: - context: . + image: cheat.sh depends_on: - redis ports: From 4846328b88d811efe8e200cc6e3748f2238191b2 Mon Sep 17 00:00:00 2001 From: Brandon Lopez Date: Sun, 5 Aug 2018 13:40:29 -0700 Subject: [PATCH 13/17] Build locally, don't pull remote by default. Include .yml to pull prebuild if wanted. --- docker-compose.build.yml => docker-compose.prebuilt.yml | 3 +-- docker-compose.yml | 3 ++- 2 files changed, 3 insertions(+), 3 deletions(-) rename docker-compose.build.yml => docker-compose.prebuilt.yml (86%) diff --git a/docker-compose.build.yml b/docker-compose.prebuilt.yml similarity index 86% rename from docker-compose.build.yml rename to docker-compose.prebuilt.yml index 589033c..898d9f2 100644 --- a/docker-compose.build.yml +++ b/docker-compose.prebuilt.yml @@ -1,8 +1,7 @@ version: '2' services: app: - build: - context: . + image: bglopez/cheat.sh depends_on: - redis ports: diff --git a/docker-compose.yml b/docker-compose.yml index d679823..589033c 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,7 +1,8 @@ version: '2' services: app: - image: cheat.sh + build: + context: . depends_on: - redis ports: From f1633e02750d90487f3fef42a031f09fd8ec66ad Mon Sep 17 00:00:00 2001 From: Brandon Lopez Date: Tue, 7 Aug 2018 12:25:49 -0700 Subject: [PATCH 14/17] Update README.md Added Travis badge to show status of Docker builds --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 94cea95..42691e4 100644 --- a/README.md +++ b/README.md @@ -17,6 +17,8 @@ What features should it have? Such a thing exists. +[![Build Status](https://travis-ci.org/bglopez/cheat.sh.svg?branch=master)](https://travis-ci.org/bglopez/cheat.sh) + ## Features **cheat.sh** From 9fcd941087bf3876a09bf357890bd7e82f38d9a0 Mon Sep 17 00:00:00 2001 From: Brandon Lopez Date: Tue, 7 Aug 2018 13:17:28 -0700 Subject: [PATCH 15/17] Remove some code smells per Sonarcloud --- .travis.yml | 9 +++++++++ lib/beautifier.py | 8 +------- lib/get_answer.py | 11 +++-------- sonar-project.properties | 16 ++++++++++++++++ 4 files changed, 29 insertions(+), 15 deletions(-) create mode 100644 sonar-project.properties diff --git a/.travis.yml b/.travis.yml index 3a40513..a183310 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,6 +1,15 @@ dist: trusty sudo: required +addons: + sonarcloud: + organization: "bglopez-github" + token: + secure: "ne5w+ViZwv72RRlAiPhFiXpC1fy5KU9e/KaROjFGMPEOIobMLlcpKUJdVlJD1a+n9v6ZloywaCmRBu9eoxk7+2+7S8eE4xd1Ndf5AE4c4VKXhGASmzI4Vfq4ceePLcv+vF9v3S7HAwu4owlKJM2/6q1nUEugO6pSV9UC83tm2yaHuTRnREiT7HVPfvg538jOvnMC6YrSIC8EKA7dhCVEpExxXxg1tyRD19jmd1IaiREH2URI69Oy18kzbvg1qQWYkvVgUHdyt4MpkX34sWFicILEBANZm4k1Q0hxdD2hdWeiaxqrSCX8K2pBaQacssVjIZ/rQoxNQcbJJ1u4/sYiKqiJwGKtnNGj8Eh3XHIvLILb2FeRB/OqsDUUWuUmTw3ByzpqhGlGCxmuosK7ODvyDGHiSJf0XiYn02drOmKMbuai38SkW/QKb7NOJKxGt6HDfxiXvVRZiHsHVbNO8btItonYEU+4otnJ5vCs8K1C0chbISEVekx8zOtPHtwv2I6lvqLTiv+Gpo3z8uTfrURQp7zOsZVVuNiqUFumpsHltFjLHifQcMckN0QjI/AR8R4prqc/j5ZfOO28tgyp4LXSquUQm8Twygd+XeEoOP1vnz6L2vcNhf8exQ/hif/+qS0TBtAWuyAEyoPzon6sY6NxOaCicnspNIWCfwDb9TA5WJ0=" + +script: + - sonar-scanner + language: - generic diff --git a/lib/beautifier.py b/lib/beautifier.py index 1518b33..22eb33f 100644 --- a/lib/beautifier.py +++ b/lib/beautifier.py @@ -150,14 +150,10 @@ def _classify_lines(lines): return line_types def _unindent_code(line, shift=0): - #if line.startswith(' '): - # return line[4:] - if shift == -1 and line != '': return ' ' + line - if shift > 0: - if line.startswith(' '*shift): + if shift > 0 and line.startswith(' '*shift): return line[shift:] return line @@ -245,8 +241,6 @@ def _beautify(text, filetype, add_comments=False, remove_text=False): lines = _cleanup_lines(lines) lines_classes = zip(_classify_lines(lines), lines) lines_classes = _wrap_lines(lines_classes, unindent_code=unindent_code) - #for x,y in lines_classes: - # print "%s: %s" % (x, y) if remove_text: lines = [line[1] for line in lines_classes if line[0] == 1] diff --git a/lib/get_answer.py b/lib/get_answer.py index aac6fb8..21c3d10 100644 --- a/lib/get_answer.py +++ b/lib/get_answer.py @@ -169,13 +169,10 @@ def get_topic_type(topic): # pylint: disable=too-many-locals,too-many-branches,t if '+' in topic_name: result = 'question' else: - #if topic_type in _get_topics_dirs() and topic_name in [':list']: - if topic_name in [':list']: + if (topic_name in [':list']) or (topic_name in [':learn']): result = "internal" elif is_valid_learnxy(topic): result = 'learnxiny' - elif topic_name in [':learn']: - result = "internal" else: # let us activate the 'question' feature for all subsections result = 'question' @@ -197,7 +194,6 @@ def get_topic_type(topic): # pylint: disable=too-many-locals,too-many-branches,t TOPIC_TYPE_CACHE[topic] = result - #print topic, " ", result return result # @@ -240,10 +236,10 @@ def _get_tldr(topic): line = line[2:] if line.startswith('-'): line = '# '+line[2:] - elif line == "": - pass elif not line.startswith(' '): line = "# "+line + else: + pass fixed_answer.append(line) @@ -469,7 +465,6 @@ def get_answer(topic, keyword, options="", request_options=None): # pylint: disa # if answer was not found in the cache # try to find it in one of the repositories if not answer: - #topic_type = get_topic_type(topic) for topic_getter_type, topic_getter in TOPIC_GETTERS: if topic_type == topic_getter_type: diff --git a/sonar-project.properties b/sonar-project.properties new file mode 100644 index 0000000..f474617 --- /dev/null +++ b/sonar-project.properties @@ -0,0 +1,16 @@ +sonar.projectKey=org.bglopez-github:chtsh:master +sonar.projectName=cheat.sh +sonar.projectVersion=latest +sonar.organization=bglopez-github + +sonar.links.homepage=https://github.com/bglopez/cheat.sh +sonar.links.ci=https://travis-ci.org/bglopez/cheat.sh +sonar.links.scm=https://github.com/bglopez/cheat.sh +sonar.links.issue=https://github.com/bglopez/cheat.sh/issues + +sonar.host.url=https://sonarcloud.io + +sonar.sourceEncoding=UTF-8 +sonar.exclusions=.git/**/*,.idea/**/*,screenshots/*,*.html,.env,.env.example +sonar.coverage.exclusions=*.* +sonar.sources=. \ No newline at end of file From 03531b89fc9f0bfce39fbb0d63b4f9c29f1701b3 Mon Sep 17 00:00:00 2001 From: Brandon Lopez Date: Tue, 7 Aug 2018 13:28:26 -0700 Subject: [PATCH 16/17] Attempt travis sonarcloud fix --- .travis.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index a183310..68865e9 100644 --- a/.travis.yml +++ b/.travis.yml @@ -6,6 +6,10 @@ addons: organization: "bglopez-github" token: secure: "ne5w+ViZwv72RRlAiPhFiXpC1fy5KU9e/KaROjFGMPEOIobMLlcpKUJdVlJD1a+n9v6ZloywaCmRBu9eoxk7+2+7S8eE4xd1Ndf5AE4c4VKXhGASmzI4Vfq4ceePLcv+vF9v3S7HAwu4owlKJM2/6q1nUEugO6pSV9UC83tm2yaHuTRnREiT7HVPfvg538jOvnMC6YrSIC8EKA7dhCVEpExxXxg1tyRD19jmd1IaiREH2URI69Oy18kzbvg1qQWYkvVgUHdyt4MpkX34sWFicILEBANZm4k1Q0hxdD2hdWeiaxqrSCX8K2pBaQacssVjIZ/rQoxNQcbJJ1u4/sYiKqiJwGKtnNGj8Eh3XHIvLILb2FeRB/OqsDUUWuUmTw3ByzpqhGlGCxmuosK7ODvyDGHiSJf0XiYn02drOmKMbuai38SkW/QKb7NOJKxGt6HDfxiXvVRZiHsHVbNO8btItonYEU+4otnJ5vCs8K1C0chbISEVekx8zOtPHtwv2I6lvqLTiv+Gpo3z8uTfrURQp7zOsZVVuNiqUFumpsHltFjLHifQcMckN0QjI/AR8R4prqc/j5ZfOO28tgyp4LXSquUQm8Twygd+XeEoOP1vnz6L2vcNhf8exQ/hif/+qS0TBtAWuyAEyoPzon6sY6NxOaCicnspNIWCfwDb9TA5WJ0=" + branches: master + +jdk: + - oraclejdk8 script: - sonar-scanner @@ -30,4 +34,4 @@ before_install: - chmod +x docker-compose - sudo mv docker-compose /usr/local/bin - docker-compose up -d - - docker ps + - docker ps \ No newline at end of file From 7a1e03797487f3d308abb264bf443ac0af3453d0 Mon Sep 17 00:00:00 2001 From: Brandon Lopez Date: Tue, 7 Aug 2018 13:35:50 -0700 Subject: [PATCH 17/17] Remove Sonarcloud -- whatever --- .travis.yml | 13 ------------- sonar-project.properties | 16 ---------------- 2 files changed, 29 deletions(-) delete mode 100644 sonar-project.properties diff --git a/.travis.yml b/.travis.yml index 68865e9..88c15cf 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,19 +1,6 @@ dist: trusty sudo: required -addons: - sonarcloud: - organization: "bglopez-github" - token: - secure: "ne5w+ViZwv72RRlAiPhFiXpC1fy5KU9e/KaROjFGMPEOIobMLlcpKUJdVlJD1a+n9v6ZloywaCmRBu9eoxk7+2+7S8eE4xd1Ndf5AE4c4VKXhGASmzI4Vfq4ceePLcv+vF9v3S7HAwu4owlKJM2/6q1nUEugO6pSV9UC83tm2yaHuTRnREiT7HVPfvg538jOvnMC6YrSIC8EKA7dhCVEpExxXxg1tyRD19jmd1IaiREH2URI69Oy18kzbvg1qQWYkvVgUHdyt4MpkX34sWFicILEBANZm4k1Q0hxdD2hdWeiaxqrSCX8K2pBaQacssVjIZ/rQoxNQcbJJ1u4/sYiKqiJwGKtnNGj8Eh3XHIvLILb2FeRB/OqsDUUWuUmTw3ByzpqhGlGCxmuosK7ODvyDGHiSJf0XiYn02drOmKMbuai38SkW/QKb7NOJKxGt6HDfxiXvVRZiHsHVbNO8btItonYEU+4otnJ5vCs8K1C0chbISEVekx8zOtPHtwv2I6lvqLTiv+Gpo3z8uTfrURQp7zOsZVVuNiqUFumpsHltFjLHifQcMckN0QjI/AR8R4prqc/j5ZfOO28tgyp4LXSquUQm8Twygd+XeEoOP1vnz6L2vcNhf8exQ/hif/+qS0TBtAWuyAEyoPzon6sY6NxOaCicnspNIWCfwDb9TA5WJ0=" - branches: master - -jdk: - - oraclejdk8 - -script: - - sonar-scanner - language: - generic diff --git a/sonar-project.properties b/sonar-project.properties deleted file mode 100644 index f474617..0000000 --- a/sonar-project.properties +++ /dev/null @@ -1,16 +0,0 @@ -sonar.projectKey=org.bglopez-github:chtsh:master -sonar.projectName=cheat.sh -sonar.projectVersion=latest -sonar.organization=bglopez-github - -sonar.links.homepage=https://github.com/bglopez/cheat.sh -sonar.links.ci=https://travis-ci.org/bglopez/cheat.sh -sonar.links.scm=https://github.com/bglopez/cheat.sh -sonar.links.issue=https://github.com/bglopez/cheat.sh/issues - -sonar.host.url=https://sonarcloud.io - -sonar.sourceEncoding=UTF-8 -sonar.exclusions=.git/**/*,.idea/**/*,screenshots/*,*.html,.env,.env.example -sonar.coverage.exclusions=*.* -sonar.sources=. \ No newline at end of file