logger.py/.drone.yml
Kim da636d5138
All checks were successful
continuous-integration/drone/push Build is passing
fix string to bool
2021-08-08 14:22:12 +02:00

49 lines
1.3 KiB
YAML

kind: pipeline
type: docker
name: default
workspace:
path: /drone/src
steps:
- name: test with DEBUG_MODE
image: python:alpine
pull: if-not-exists
environment:
DEBUG_MODE: 'True'
TZ: 'Europe/Berlin'
commands:
- apk --no-cache add gcc musl-dev tzdata
- pip3 install --no-cache-dir -r requirements.txt
- echo "$DEBUG_MODE"
- |
python3 -c 'from loghandler import logger;
def main():
logger.debug("This is a Debug Message")
logger.info("This is a Info Message")
logger.warning("This is a Warning Message")
logger.error("This is a Error Message")
logger.critical("This is a Critical Message")
main()'
- name: test without DEBUG_MODE
image: python:alpine
pull: if-not-exists
environment:
DEBUG_MODE: 'False'
TZ: 'Europe/Berlin'
commands:
- apk --no-cache add gcc musl-dev tzdata
- pip3 install --no-cache-dir -r requirements.txt
- echo "$DEBUG_MODE"
- |
python3 -c 'from loghandler import logger;
def main():
logger.debug("This is a Debug Message")
logger.info("This is a Info Message")
logger.warning("This is a Warning Message")
logger.error("This is a Error Message")
logger.critical("This is a Critical Message")
main()'