From 11a980feb09012db3e75d8817f908436eb13db68 Mon Sep 17 00:00:00 2001 From: Gareth Coles Date: Wed, 10 Oct 2018 15:11:56 +0200 Subject: Dockerfile and build script --- docker/Dockerfile | 15 +++++++++++++++ docker/build.sh | 19 +++++++++++++++++++ 2 files changed, 34 insertions(+) create mode 100644 docker/Dockerfile create mode 100755 docker/build.sh diff --git a/docker/Dockerfile b/docker/Dockerfile new file mode 100644 index 00000000..9c4406bf --- /dev/null +++ b/docker/Dockerfile @@ -0,0 +1,15 @@ +FROM python:3.6-alpine3.7 +RUN apk add --update tini git + +RUN mkdir /bot +COPY . /bot +WORKDIR /bot + +ENV LIBRARY_PATH=/lib:/usr/lib + +RUN pip install pipenv +RUN pipenv install --deploy --system + +ENTRYPOINT ["/sbin/tini", "--"] +CMD ["python", "-m", "bot"] + diff --git a/docker/build.sh b/docker/build.sh new file mode 100755 index 00000000..337f47c6 --- /dev/null +++ b/docker/build.sh @@ -0,0 +1,19 @@ +#!/bin/bash + +# Build and deploy on master branch +#if [[ $TRAVIS_BRANCH == 'master' && $TRAVIS_PULL_REQUEST == 'false' ]]; then + echo "Connecting to docker hub" + echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin + + echo "Building image" + docker build -t pythondiscord/hacktober-bot:latest -f docker/Dockerfile . + + echo "Pushing image" + docker push pythondiscord/hacktober-bot:latest + +# echo "Deploying container" +# curl -H "token: $AUTODEPLOY_TOKEN" $AUTODEPLOY_WEBHOOK +#else +# echo "Skipping deploy" +#fi + -- cgit v1.2.3 From 5426136e2aa6c492a36aa622f2c2eb2653e5fc24 Mon Sep 17 00:00:00 2001 From: Gareth Coles Date: Wed, 10 Oct 2018 15:18:23 +0200 Subject: Move bot.py to __main__.py (Fixes #39) --- bot/__main__.py | 39 +++++++++++++++++++++++++++++++++++++++ bot/bot.py | 39 --------------------------------------- 2 files changed, 39 insertions(+), 39 deletions(-) create mode 100644 bot/__main__.py delete mode 100644 bot/bot.py diff --git a/bot/__main__.py b/bot/__main__.py new file mode 100644 index 00000000..a40ed0d4 --- /dev/null +++ b/bot/__main__.py @@ -0,0 +1,39 @@ +from os import environ +from pathlib import Path +from sys import stderr +from traceback import print_exc, format_exc + +from discord.ext import commands +import logging + +HACKTOBERBOT_TOKEN = environ.get('HACKTOBERBOT_TOKEN') + +if HACKTOBERBOT_TOKEN: + token_dl = len(HACKTOBERBOT_TOKEN) // 8 + logging.info(f'Bot token loaded: {HACKTOBERBOT_TOKEN[:token_dl]}...{HACKTOBERBOT_TOKEN[-token_dl:]}') +else: + logging.error(f'Bot token not found: {HACKTOBERBOT_TOKEN}') + +ghost_unicode = "\N{GHOST}" +bot = commands.Bot(command_prefix=commands.when_mentioned_or(".", f"{ghost_unicode} ", ghost_unicode)) + +logging.info('Start loading extensions from ./cogs/') + + +if __name__ == '__main__': + # Scan for files in the /cogs/ directory and make a list of the file names. + cogs = [file.stem for file in Path('cogs').glob('*.py')] + for extension in cogs: + try: + bot.load_extension(f'cogs.{extension}') + logging.info(f'Successfully loaded extension: {extension}') + except Exception as e: + logging.error(f'Failed to load extension {extension}: {repr(e)} {format_exc()}') + # print(f'Failed to load extension {extension}.', file=stderr) + # print_exc() + +logging.info(f'Spooky Launch Sequence Initiated...') + +bot.run(HACKTOBERBOT_TOKEN) + +logging.info(f'HackBot has been slain!') \ No newline at end of file diff --git a/bot/bot.py b/bot/bot.py deleted file mode 100644 index a40ed0d4..00000000 --- a/bot/bot.py +++ /dev/null @@ -1,39 +0,0 @@ -from os import environ -from pathlib import Path -from sys import stderr -from traceback import print_exc, format_exc - -from discord.ext import commands -import logging - -HACKTOBERBOT_TOKEN = environ.get('HACKTOBERBOT_TOKEN') - -if HACKTOBERBOT_TOKEN: - token_dl = len(HACKTOBERBOT_TOKEN) // 8 - logging.info(f'Bot token loaded: {HACKTOBERBOT_TOKEN[:token_dl]}...{HACKTOBERBOT_TOKEN[-token_dl:]}') -else: - logging.error(f'Bot token not found: {HACKTOBERBOT_TOKEN}') - -ghost_unicode = "\N{GHOST}" -bot = commands.Bot(command_prefix=commands.when_mentioned_or(".", f"{ghost_unicode} ", ghost_unicode)) - -logging.info('Start loading extensions from ./cogs/') - - -if __name__ == '__main__': - # Scan for files in the /cogs/ directory and make a list of the file names. - cogs = [file.stem for file in Path('cogs').glob('*.py')] - for extension in cogs: - try: - bot.load_extension(f'cogs.{extension}') - logging.info(f'Successfully loaded extension: {extension}') - except Exception as e: - logging.error(f'Failed to load extension {extension}: {repr(e)} {format_exc()}') - # print(f'Failed to load extension {extension}.', file=stderr) - # print_exc() - -logging.info(f'Spooky Launch Sequence Initiated...') - -bot.run(HACKTOBERBOT_TOKEN) - -logging.info(f'HackBot has been slain!') \ No newline at end of file -- cgit v1.2.3 From eb6a964786f8b42e24c71d5f19bb258fad77e3a2 Mon Sep 17 00:00:00 2001 From: Gareth Coles Date: Wed, 10 Oct 2018 15:49:26 +0200 Subject: Add travis CI YML --- .travis.yml | 15 +++++++++++++++ Pipfile | 3 ++- tox.ini | 2 +- 3 files changed, 18 insertions(+), 2 deletions(-) create mode 100644 .travis.yml diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 00000000..33ea1fa6 --- /dev/null +++ b/.travis.yml @@ -0,0 +1,15 @@ +language: python + +python: + - "3.7" + +sudo: required + +services: + - docker + +install: + - pip install flake8 pipenv + - pipenv install --deploy + - pipenv run lint + - sh docker/build.sh diff --git a/Pipfile b/Pipfile index 90f6f45e..a702616f 100644 --- a/Pipfile +++ b/Pipfile @@ -18,4 +18,5 @@ name = "pypi" python_version = "3.7" [scripts] -start = "python -m bot" \ No newline at end of file +start = "python -m bot" +lint = "flake8 bot" diff --git a/tox.ini b/tox.ini index 780c31d7..bff048cb 100644 --- a/tox.ini +++ b/tox.ini @@ -1,6 +1,6 @@ [flake8] max-line-length=120 -application_import_names=proj +application_import_names=bot ignore=P102,B311,W503,E226,S311 exclude=__pycache__, venv, .venv, tests import-order-style=pycharm -- cgit v1.2.3 From fee5701143af0312db438253b06a470bdeadbe08 Mon Sep 17 00:00:00 2001 From: Gareth Coles Date: Wed, 10 Oct 2018 15:52:49 +0200 Subject: Travis only has dev builds of 3.7 --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 33ea1fa6..384c548c 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,7 +1,7 @@ language: python python: - - "3.7" + - "3.7-dev" sudo: required -- cgit v1.2.3 From 2e85819a1f155c0e098e8928a879b39d07e65048 Mon Sep 17 00:00:00 2001 From: Daniel Brown Date: Wed, 10 Oct 2018 09:13:57 -0500 Subject: Corrected linting errors. --- bot/__init__.py | 5 +++-- bot/__main__.py | 9 ++++----- bot/cogs/hacktoberstats.py | 4 +++- bot/cogs/halloweenify.py | 2 +- bot/cogs/movie.py | 8 +++++--- 5 files changed, 16 insertions(+), 12 deletions(-) diff --git a/bot/__init__.py b/bot/__init__.py index 8cbcd121..1d320245 100644 --- a/bot/__init__.py +++ b/bot/__init__.py @@ -1,5 +1,6 @@ -import os import logging.handlers +import os + # set up logging @@ -27,4 +28,4 @@ logging.basicConfig(format='%(asctime)s - %(name)s %(levelname)s: %(message)s', level=logging.DEBUG, handlers=[console_handler, file_handler]) -logging.info('Logging Process Started') \ No newline at end of file +logging.info('Logging Process Started') diff --git a/bot/__main__.py b/bot/__main__.py index a40ed0d4..c40836c5 100644 --- a/bot/__main__.py +++ b/bot/__main__.py @@ -1,10 +1,10 @@ +import logging from os import environ from pathlib import Path -from sys import stderr -from traceback import print_exc, format_exc +from traceback import format_exc from discord.ext import commands -import logging + HACKTOBERBOT_TOKEN = environ.get('HACKTOBERBOT_TOKEN') @@ -19,7 +19,6 @@ bot = commands.Bot(command_prefix=commands.when_mentioned_or(".", f"{ghost_unico logging.info('Start loading extensions from ./cogs/') - if __name__ == '__main__': # Scan for files in the /cogs/ directory and make a list of the file names. cogs = [file.stem for file in Path('cogs').glob('*.py')] @@ -36,4 +35,4 @@ logging.info(f'Spooky Launch Sequence Initiated...') bot.run(HACKTOBERBOT_TOKEN) -logging.info(f'HackBot has been slain!') \ No newline at end of file +logging.info(f'HackBot has been slain!') diff --git a/bot/cogs/hacktoberstats.py b/bot/cogs/hacktoberstats.py index 4e896ae9..0a280443 100644 --- a/bot/cogs/hacktoberstats.py +++ b/bot/cogs/hacktoberstats.py @@ -95,7 +95,9 @@ class Stats: is_query = f"public+author:{username}" date_range = "2018-10-01..2018-10-31" per_page = "300" - query_url = f"{base_url}-label:{not_label}+type:{action_type}+is:{is_query}+created:{date_range}&per_page={per_page}" + query_url = ( + f"{base_url}-label:{not_label}+type:{action_type}+is:{is_query}+created:{date_range}&per_page={per_page}" + ) headers = {"user-agent": "Discord Python Hactoberbot"} async with aiohttp.ClientSession() as session: diff --git a/bot/cogs/halloweenify.py b/bot/cogs/halloweenify.py index 8a9db3df..201f6b95 100644 --- a/bot/cogs/halloweenify.py +++ b/bot/cogs/halloweenify.py @@ -1,5 +1,5 @@ -from pathlib import Path from json import load +from pathlib import Path from random import choice diff --git a/bot/cogs/movie.py b/bot/cogs/movie.py index bb6f8df8..647ee22a 100644 --- a/bot/cogs/movie.py +++ b/bot/cogs/movie.py @@ -1,8 +1,10 @@ -import requests import random from os import environ -from discord.ext import commands + +import requests from discord import Embed +from discord.ext import commands + TMDB_API_KEY = environ.get('TMDB_API_KEY') TMDB_TOKEN = environ.get('TMDB_TOKEN') @@ -72,7 +74,7 @@ class Movie: rating_count = movie.get('vote_average') / 2 rating = '' - for i in range(int(rating_count)): + for _ in range(int(rating_count)): rating += ':skull:' if (rating_count % 1) >= .5: -- cgit v1.2.3 From 99b2dbf0fa4a350ae559f779edae34d654d1ac8b Mon Sep 17 00:00:00 2001 From: Gareth Coles Date: Wed, 10 Oct 2018 16:22:05 +0200 Subject: Move some build steps to the script stage --- .travis.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.travis.yml b/.travis.yml index 384c548c..4c9a73f0 100644 --- a/.travis.yml +++ b/.travis.yml @@ -11,5 +11,7 @@ services: install: - pip install flake8 pipenv - pipenv install --deploy + +script: - pipenv run lint - sh docker/build.sh -- cgit v1.2.3 From 29411f024301ae492c3d3796489d1340754c5336 Mon Sep 17 00:00:00 2001 From: Gareth Coles Date: Wed, 10 Oct 2018 16:27:28 +0200 Subject: Add compose file --- docker/docker-compose.yml | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 docker/docker-compose.yml diff --git a/docker/docker-compose.yml b/docker/docker-compose.yml new file mode 100644 index 00000000..0a802ddc --- /dev/null +++ b/docker/docker-compose.yml @@ -0,0 +1,11 @@ +version: "3" +services: + dumbo: + image: pythondiscord/hacktober-bot:latest + container_name: hacktoberbot + + restart: always + + environment: + - HACKTOBERBOT_TOKEN + -- cgit v1.2.3 From 64263af7674f6c50ca01e21779cf4a9d9ef49330 Mon Sep 17 00:00:00 2001 From: Gareth Coles Date: Wed, 10 Oct 2018 16:39:37 +0200 Subject: Automatic deployment --- .travis.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 4c9a73f0..2a5a71e3 100644 --- a/.travis.yml +++ b/.travis.yml @@ -9,9 +9,10 @@ services: - docker install: - - pip install flake8 pipenv + - pip install flake8 pipenv salt-pepper - pipenv install --deploy script: - pipenv run lint - sh docker/build.sh + - pepper "glimglam.gserv.me" state.apply docker/hacktoberbot -- cgit v1.2.3 From 05d16a518671842d2ae5ee8905cb86921e86cd1e Mon Sep 17 00:00:00 2001 From: Gareth Coles Date: Wed, 10 Oct 2018 16:49:20 +0200 Subject: Silence Pepper --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 2a5a71e3..8971aa6a 100644 --- a/.travis.yml +++ b/.travis.yml @@ -15,4 +15,4 @@ install: script: - pipenv run lint - sh docker/build.sh - - pepper "glimglam.gserv.me" state.apply docker/hacktoberbot + - pepper "glimglam.gserv.me" state.apply docker/hacktoberbot &> /dev/null -- cgit v1.2.3 From 83228ce903ab1e6b62d53e3353b074ffb0f12d6a Mon Sep 17 00:00:00 2001 From: Gareth Coles Date: Wed, 10 Oct 2018 16:55:21 +0200 Subject: Apparently Pepper prompts for the password these days --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 8971aa6a..cbd18edd 100644 --- a/.travis.yml +++ b/.travis.yml @@ -15,4 +15,4 @@ install: script: - pipenv run lint - sh docker/build.sh - - pepper "glimglam.gserv.me" state.apply docker/hacktoberbot &> /dev/null + - echo $SALTAPI_PASS | pepper "glimglam.gserv.me" state.apply docker/hacktoberbot &> /dev/null -- cgit v1.2.3 From 86073bf95f8def1f8489c5dbceec73b4ad0f4c5f Mon Sep 17 00:00:00 2001 From: Gareth Coles Date: Wed, 10 Oct 2018 17:00:47 +0200 Subject: Attempt to fix Pepper --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index cbd18edd..5e05aac0 100644 --- a/.travis.yml +++ b/.travis.yml @@ -15,4 +15,4 @@ install: script: - pipenv run lint - sh docker/build.sh - - echo $SALTAPI_PASS | pepper "glimglam.gserv.me" state.apply docker/hacktoberbot &> /dev/null + - pepper "glimglam.gserv.me" state.apply socker/hacktoberbot -u $SALTAPI_URL -a $SALTAPI_EAUTH --username SALTAPI_USER --password SALTAPI_PASS &> /dev/null -- cgit v1.2.3 From 3d2b799408a4d6243f16dbf99208418292f37cf1 Mon Sep 17 00:00:00 2001 From: Gareth Coles Date: Wed, 10 Oct 2018 17:04:20 +0200 Subject: Let's try that again wthout a broken config --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 5e05aac0..f4586702 100644 --- a/.travis.yml +++ b/.travis.yml @@ -15,4 +15,4 @@ install: script: - pipenv run lint - sh docker/build.sh - - pepper "glimglam.gserv.me" state.apply socker/hacktoberbot -u $SALTAPI_URL -a $SALTAPI_EAUTH --username SALTAPI_USER --password SALTAPI_PASS &> /dev/null + - pepper "glimglam.gserv.me" state.apply docker/hacktoberbot -u $SALTAPI_URL -a $SALTAPI_EAUTH --username $SALTAPI_USER --password $SALTAPI_PASS &> /dev/null -- cgit v1.2.3 From 7698f93144ffa38896fd4ad82cda5a4a44b0dbd7 Mon Sep 17 00:00:00 2001 From: Gareth Coles Date: Wed, 10 Oct 2018 17:16:02 +0200 Subject: Move pepper command to build.sh --- .travis.yml | 1 - docker/build.sh | 3 +++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index f4586702..6f204bdb 100644 --- a/.travis.yml +++ b/.travis.yml @@ -15,4 +15,3 @@ install: script: - pipenv run lint - sh docker/build.sh - - pepper "glimglam.gserv.me" state.apply docker/hacktoberbot -u $SALTAPI_URL -a $SALTAPI_EAUTH --username $SALTAPI_USER --password $SALTAPI_PASS &> /dev/null diff --git a/docker/build.sh b/docker/build.sh index 337f47c6..f0a98e49 100755 --- a/docker/build.sh +++ b/docker/build.sh @@ -10,6 +10,9 @@ echo "Pushing image" docker push pythondiscord/hacktober-bot:latest + + echo "Deploying on server" + pepper "glimglam.gserv.me" state.apply docker/hacktoberbot -u $SALTAPI_URL -a $SALTAPI_EAUTH --username $SALTAPI_USER --password $SALTAPI_PASS &> /dev/null # echo "Deploying container" # curl -H "token: $AUTODEPLOY_TOKEN" $AUTODEPLOY_WEBHOOK -- cgit v1.2.3 From c7d92f8086e951b170f5290ca91edb07adce1851 Mon Sep 17 00:00:00 2001 From: Gareth Coles Date: Wed, 10 Oct 2018 17:32:14 +0100 Subject: Update vars in build.sh --- docker/build.sh | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/docker/build.sh b/docker/build.sh index f0a98e49..7e275a9c 100755 --- a/docker/build.sh +++ b/docker/build.sh @@ -12,11 +12,10 @@ docker push pythondiscord/hacktober-bot:latest echo "Deploying on server" - pepper "glimglam.gserv.me" state.apply docker/hacktoberbot -u $SALTAPI_URL -a $SALTAPI_EAUTH --username $SALTAPI_USER --password $SALTAPI_PASS &> /dev/null + pepper "glimglam.gserv.me" state.apply docker/hacktoberbot -u ${SALTAPI_URL} -a ${SALTAPI_EAUTH} --username ${SALTAPI_USER} --password ${SALTAPI_PASS} &> /dev/null # echo "Deploying container" # curl -H "token: $AUTODEPLOY_TOKEN" $AUTODEPLOY_WEBHOOK #else # echo "Skipping deploy" #fi - -- cgit v1.2.3 From d9e4d95613b69d9bf420c83f7f7655711fac1a79 Mon Sep 17 00:00:00 2001 From: Gareth Coles Date: Wed, 10 Oct 2018 17:36:21 +0100 Subject: Pepper params are key=value --- docker/build.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/docker/build.sh b/docker/build.sh index 7e275a9c..f4b54d4d 100755 --- a/docker/build.sh +++ b/docker/build.sh @@ -12,7 +12,10 @@ docker push pythondiscord/hacktober-bot:latest echo "Deploying on server" - pepper "glimglam.gserv.me" state.apply docker/hacktoberbot -u ${SALTAPI_URL} -a ${SALTAPI_EAUTH} --username ${SALTAPI_USER} --password ${SALTAPI_PASS} &> /dev/null + pepper "glimglam.gserv.me" state.apply docker/hacktoberbot \ + --saltapi-url=${SALTAPI_URL} --auth=${SALTAPI_EAUTH} \ + --username=${SALTAPI_USER} --password=${SALTAPI_PASS} \ + &> /dev/null # echo "Deploying container" # curl -H "token: $AUTODEPLOY_TOKEN" $AUTODEPLOY_WEBHOOK -- cgit v1.2.3 From 53b6ad68e2444cd15f2a30ecb5dc223a68b30dd1 Mon Sep 17 00:00:00 2001 From: Gareth Coles Date: Wed, 10 Oct 2018 17:40:29 +0100 Subject: Pepper: See no evil.. --- docker/build.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docker/build.sh b/docker/build.sh index f4b54d4d..dd703986 100755 --- a/docker/build.sh +++ b/docker/build.sh @@ -12,9 +12,9 @@ docker push pythondiscord/hacktober-bot:latest echo "Deploying on server" - pepper "glimglam.gserv.me" state.apply docker/hacktoberbot \ - --saltapi-url=${SALTAPI_URL} --auth=${SALTAPI_EAUTH} \ - --username=${SALTAPI_USER} --password=${SALTAPI_PASS} \ + pepper "$SALTAPI_TARGET" state.apply docker/hacktoberbot \ + --saltapi-url="$SALTAPI_URL" --auth="$SALTAPI_EAUTH" \ + --username="$SALTAPI_USER" --password="$SALTAPI_PASS" \ &> /dev/null # echo "Deploying container" -- cgit v1.2.3 From 4f6706ef1dc0abfefdf75d384b2cd0f28cf9216b Mon Sep 17 00:00:00 2001 From: Gareth Coles Date: Wed, 10 Oct 2018 17:49:09 +0100 Subject: Pepper: Fixed syntax again --- docker/build.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docker/build.sh b/docker/build.sh index dd703986..7b97afcc 100755 --- a/docker/build.sh +++ b/docker/build.sh @@ -12,9 +12,9 @@ docker push pythondiscord/hacktober-bot:latest echo "Deploying on server" - pepper "$SALTAPI_TARGET" state.apply docker/hacktoberbot \ - --saltapi-url="$SALTAPI_URL" --auth="$SALTAPI_EAUTH" \ - --username="$SALTAPI_USER" --password="$SALTAPI_PASS" \ + pepper ${SALTAPI_TARGET} state.apply docker/hacktoberbot \ + --saltapi-url=${SALTAPI_URL} --auth=${SALTAPI_EAUTH} \ + --username=${SALTAPI_USER} --password=${SALTAPI_PASS} \ &> /dev/null # echo "Deploying container" -- cgit v1.2.3 From c758208b85ada40c13b4e0a02cbef0992b4fdd2a Mon Sep 17 00:00:00 2001 From: Gareth Coles Date: Wed, 10 Oct 2018 17:54:33 +0100 Subject: Make pepper behave more suitably for deployment --- docker/build.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker/build.sh b/docker/build.sh index 7b97afcc..4cf22c6d 100755 --- a/docker/build.sh +++ b/docker/build.sh @@ -15,7 +15,7 @@ pepper ${SALTAPI_TARGET} state.apply docker/hacktoberbot \ --saltapi-url=${SALTAPI_URL} --auth=${SALTAPI_EAUTH} \ --username=${SALTAPI_USER} --password=${SALTAPI_PASS} \ - &> /dev/null + --out=no_out --non-interactive # echo "Deploying container" # curl -H "token: $AUTODEPLOY_TOKEN" $AUTODEPLOY_WEBHOOK -- cgit v1.2.3 From 7ca433000e7ad5f1b5e5ba779faf98959c508db2 Mon Sep 17 00:00:00 2001 From: Gareth Coles Date: Wed, 10 Oct 2018 20:29:24 +0100 Subject: Remove extra params to pepper --- docker/build.sh | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/docker/build.sh b/docker/build.sh index 4cf22c6d..289f54e2 100755 --- a/docker/build.sh +++ b/docker/build.sh @@ -12,10 +12,7 @@ docker push pythondiscord/hacktober-bot:latest echo "Deploying on server" - pepper ${SALTAPI_TARGET} state.apply docker/hacktoberbot \ - --saltapi-url=${SALTAPI_URL} --auth=${SALTAPI_EAUTH} \ - --username=${SALTAPI_USER} --password=${SALTAPI_PASS} \ - --out=no_out --non-interactive + pepper ${SALTAPI_TARGET} state.apply docker/hacktoberbot --out=no_out --non-interactive # echo "Deploying container" # curl -H "token: $AUTODEPLOY_TOKEN" $AUTODEPLOY_WEBHOOK -- cgit v1.2.3