Compare commits

..

No commits in common. "adc2525fabd561610421b75725347c255e9e24da" and "5967bc75d9229ddebdbf166cb1b24645e3973241" have entirely different histories.

4 changed files with 15 additions and 16 deletions

View File

@ -10,7 +10,7 @@ services:
TELEGRAM_TOKEN: $TELEGRAM_TOKEN_DEV
STAGE: "development"
networks:
- queues-development
- queues
deploy:
mode: replicated
restart_policy:
@ -26,9 +26,9 @@ services:
MONGO_HOST: "mongo.develop.sprinthub.ru"
MONGO_PASSWORD: $MONGO_PASSWORD_DEV
STAGE: "development"
PLATFORM_SECURITY_TOKEN: $PLATFORM_SECURITY_TOKEN
networks:
- queues-development
- configurator
- queues
deploy:
mode: replicated
restart_policy:
@ -44,7 +44,7 @@ services:
TELEGRAM_TOKEN: $TELEGRAM_TOKEN_DEV
STAGE: "development"
networks:
- queues-development
- queues
deploy:
mode: replicated
restart_policy:
@ -63,7 +63,7 @@ services:
PLATFORM_SECURITY_TOKEN: $PLATFORM_SECURITY_TOKEN
STAGE: "development"
networks:
- common-infra-nginx-development
- common-infra-nginx
deploy:
mode: replicated
restart_policy:
@ -73,9 +73,7 @@ services:
order: start-first
networks:
common-infra-nginx-development:
common-infra-nginx:
external: true
queues-development:
external: true
configurator:
queues:
external: true

View File

@ -29,7 +29,6 @@ services:
PLATFORM_SECURITY_TOKEN: $PLATFORM_SECURITY_TOKEN
networks:
- queues
- configurator
deploy:
mode: replicated
restart_policy:
@ -78,5 +77,3 @@ networks:
external: true
queues:
external: true
configurator:
external: true

View File

@ -28,7 +28,7 @@ jobs:
run: docker push mathwave/sprint-repo:pizda-bot
deploy-dev:
name: Deploy dev
runs-on: [prod]
runs-on: [dev]
needs: push
steps:
- name: login
@ -42,4 +42,4 @@ jobs:
TELEGRAM_TOKEN_DEV: ${{ secrets.TELEGRAM_TOKEN_DEV }}
MONGO_PASSWORD_DEV: ${{ secrets.MONGO_PASSWORD_DEV }}
PLATFORM_SECURITY_TOKEN: ${{ secrets.PLATFORM_SECURITY_TOKEN }}
run: docker stack deploy --with-registry-auth -c ./.deploy/deploy-dev.yaml pizda-bot-development
run: docker stack deploy --with-registry-auth -c ./.deploy/deploy-dev.yaml pizda-bot

View File

@ -14,8 +14,11 @@ class PlatformClient:
self.stage = stage
self.configs = configs
self.experiments = experiments
self.endpoint = 'http://configurator/'
self.fetch_url = urllib.parse.urljoin(self.endpoint, '/api/v1/fetch')
self.endpoint = 'https://platform.sprinthub.ru/'
self.configs_url = urllib.parse.urljoin(self.endpoint, 'configs/get')
self.experiments_url = urllib.parse.urljoin(self.endpoint, 'experiments/get')
self.staff_url = urllib.parse.urljoin(self.endpoint, 'is_staff')
self.fetch_url = urllib.parse.urljoin(self.endpoint, 'fetch')
self.config_storage = {}
self.experiment_storage = {}
self.staff_storage = {}
@ -40,6 +43,7 @@ class PlatformClient:
try:
response = get(
url,
headers={'X-Security-Token': self.platform_security_token},
params=params
)
if response.status_code == 200: