From 1bfc08f3975f1a3cf66d6c59465b524b98173fa3 Mon Sep 17 00:00:00 2001 From: wh1te909 Date: Mon, 30 Dec 2019 21:32:07 +0000 Subject: [PATCH] testing azure pipelines --- api/tacticalrmm/tacticalrmm/settings.py | 44 ++++++++++++++++++++++++- azure-pipelines.yml | 22 +++++++++++++ 2 files changed, 65 insertions(+), 1 deletion(-) create mode 100644 azure-pipelines.yml diff --git a/api/tacticalrmm/tacticalrmm/settings.py b/api/tacticalrmm/tacticalrmm/settings.py index 7292b61e..6c301f53 100644 --- a/api/tacticalrmm/tacticalrmm/settings.py +++ b/api/tacticalrmm/tacticalrmm/settings.py @@ -150,4 +150,46 @@ if 'TRAVIS' in os.environ: SALT_PASSWORD = "travis" MESH_USERNAME = "travis" MESH_SITE = "https://example.com" - TWO_FACTOR_OTP = "TRAVIS" \ No newline at end of file + TWO_FACTOR_OTP = "TRAVIS" + +if 'AZPIPELINE' in os.environ: + DATABASES = { + 'default': { + 'ENGINE': 'django.db.backends.postgresql', + 'NAME': 'pipeline', + 'USER': 'pipeline', + 'PASSWORD': 'pipeline123456', + 'HOST': '127.0.0.1', + 'PORT': '' + } + } + + REST_FRAMEWORK = { + 'DATETIME_FORMAT': "%b-%d-%Y - %H:%M", + + 'DEFAULT_PERMISSION_CLASSES': ( + 'rest_framework.permissions.IsAuthenticated', + ), + 'DEFAULT_AUTHENTICATION_CLASSES': ( + 'knox.auth.TokenAuthentication', + ), + 'DEFAULT_RENDERER_CLASSES': ( + 'rest_framework.renderers.JSONRenderer', + ) + } + + DEBUG = True + SECRET_KEY = 'abcdefghijklmnoptravis123456789' + + EMAIL_USE_TLS = True + EMAIL_HOST = 'smtp.gmail.com' + EMAIL_HOST_USER = 'pipeline@example.com' + EMAIL_HOST_PASSWORD = 'pipeline' + EMAIL_PORT = 587 + EMAIL_ALERT_RECIPIENTS = ["pipeline@example.com",] + + SALT_USERNAME = "pipeline" + SALT_PASSWORD = "pipeline" + MESH_USERNAME = "pipeline" + MESH_SITE = "https://example.com" + TWO_FACTOR_OTP = "ABC12345" \ No newline at end of file diff --git a/azure-pipelines.yml b/azure-pipelines.yml new file mode 100644 index 00000000..73995bee --- /dev/null +++ b/azure-pipelines.yml @@ -0,0 +1,22 @@ +trigger: +- develop + + +jobs: +- job: setup_env + displayName: 'Setup Environment' + strategy: + matrix: + Ubuntu18: + AGENT_NAME: 'rmm-ubuntu18' + + pool: + name: linux-vms + demands: + - agent.name -equals $(AGENT_NAME) + + steps: + + - script: | + echo test123 + displayName: 'Run Tests' \ No newline at end of file