Skip to content

Deploy everything to dev #5

Deploy everything to dev

Deploy everything to dev #5

Workflow file for this run

name: Deploy everything to dev
on: workflow_dispatch
jobs:
deploy:
name: Deploy
environment: dev
runs-on: trampoline
steps:
- name: Deploy DB wathcer
uses: yc-actions/yc-sls-function@v2
with:
yc-sa-json-credentials: ${{ secrets.YC_SA_JSON_CREDENTIALS }}
folder-id: ${{ secrets.YC_OS_FOLDER_ID }}
function-name: 'k8s-db-watcher4testing'
runtime: 'python311'
memory: '128Mb'
execution-timeout: '600s'
entrypoint: 'cloud_functions.db_watcher_function'
environment: |
CONTOUR=${{ vars.CONTOUR }}
secrets:
DB_PASS=${{ secrets.YC_OS_SECRET_ID }}/${{ secrets.YC_OS_SECRET_VERSION }}/${{ vars.DB_PASS_KEY }}
DB_PORT=${{ secrets.YC_OS_SECRET_ID }}/${{ secrets.YC_OS_SECRET_VERSION }}/${{ vars.DB_PORT_KEY }}
DB_USER=${{ secrets.YC_OS_SECRET_ID }}/${{ secrets.YC_OS_SECRET_VERSION }}/${{ vars.DB_USER_KEY }}
DB_NAME=${{ secrets.YC_OS_SECRET_ID }}/${{ secrets.YC_OS_SECRET_VERSION }}/${{ vars.DB_NAME_KEY }}
DB_HOST=${{ secrets.YC_OS_SECRET_ID }}/${{ secrets.YC_OS_SECRET_VERSION }}/${{ vars.DB_HOST_KEY }}
K8S_HOST=${{ secrets.YC_OS_SECRET_ID }}/${{ secrets.YC_OS_SECRET_VERSION }}/${{ vars.K8S_HOST_KEY }}
K8S_SSL_CERTIFICATE=${{ secrets.YC_OS_SECRET_ID }}/${{ secrets.YC_OS_SECRET_VERSION }}/${{ vars.K8S_SSL_KEY }}
service-account: ${{ secrets.YC_OS_K8S_DEPLOYER_SA_ID }}
network-id: ${{ secrets.YC_OS_NETWORK_ID }}
include: |
requirements.txt
./k8s_deployer
./lib
cloud_functions.py
exclude: |
**/*.pyc
- name: Deploy Create Function
uses: yc-actions/yc-sls-function@v2
with:
yc-sa-json-credentials: ${{ secrets.YC_SA_JSON_CREDENTIALS }}
folder-id: ${{ secrets.YC_OS_FOLDER_ID }}
function-name: 'k8s-create4testing'
runtime: 'python311'
memory: '128Mb'
execution-timeout: '600s'
entrypoint: 'cloud_functions.create_function'
environment: |
CONTOUR=${{ vars.CONTOUR }}
secrets:
DB_PASS=${{ secrets.YC_OS_SECRET_ID }}/${{ secrets.YC_OS_SECRET_VERSION }}/${{ vars.DB_PASS_KEY }}
DB_PORT=${{ secrets.YC_OS_SECRET_ID }}/${{ secrets.YC_OS_SECRET_VERSION }}/${{ vars.DB_PORT_KEY }}
DB_USER=${{ secrets.YC_OS_SECRET_ID }}/${{ secrets.YC_OS_SECRET_VERSION }}/${{ vars.DB_USER_KEY }}
DB_NAME=${{ secrets.YC_OS_SECRET_ID }}/${{ secrets.YC_OS_SECRET_VERSION }}/${{ vars.DB_NAME_KEY }}
DB_HOST=${{ secrets.YC_OS_SECRET_ID }}/${{ secrets.YC_OS_SECRET_VERSION }}/${{ vars.DB_HOST_KEY }}
K8S_HOST=${{ secrets.YC_OS_SECRET_ID }}/${{ secrets.YC_OS_SECRET_VERSION }}/${{ vars.K8S_HOST_KEY }}
K8S_SSL_CERTIFICATE=${{ secrets.YC_OS_SECRET_ID }}/${{ secrets.YC_OS_SECRET_VERSION }}/${{ vars.K8S_SSL_KEY }}
service-account: ${{ secrets.YC_OS_K8S_DEPLOYER_SA_ID }}
network-id: ${{ secrets.YC_OS_NETWORK_ID }}
include: |
requirements.txt
./k8s_deployer
./lib
cloud_functions.py
exclude: |
**/*.pyc
- name: Deploy Remove Function
uses: yc-actions/yc-sls-function@v2
with:
yc-sa-json-credentials: ${{ secrets.YC_SA_JSON_CREDENTIALS }}
folder-id: ${{ secrets.YC_OS_FOLDER_ID }}
function-name: 'k8s-remove4testing'
runtime: 'python311'
memory: '128Mb'
execution-timeout: '600s'
entrypoint: 'cloud_functions.remove_function'
environment: |
CONTOUR=${{ vars.CONTOUR }}
secrets:
DB_PASS=${{ secrets.YC_OS_SECRET_ID }}/${{ secrets.YC_OS_SECRET_VERSION }}/${{ vars.DB_PASS_KEY }}
DB_PORT=${{ secrets.YC_OS_SECRET_ID }}/${{ secrets.YC_OS_SECRET_VERSION }}/${{ vars.DB_PORT_KEY }}
DB_USER=${{ secrets.YC_OS_SECRET_ID }}/${{ secrets.YC_OS_SECRET_VERSION }}/${{ vars.DB_USER_KEY }}
DB_NAME=${{ secrets.YC_OS_SECRET_ID }}/${{ secrets.YC_OS_SECRET_VERSION }}/${{ vars.DB_NAME_KEY }}
DB_HOST=${{ secrets.YC_OS_SECRET_ID }}/${{ secrets.YC_OS_SECRET_VERSION }}/${{ vars.DB_HOST_KEY }}
K8S_HOST=${{ secrets.YC_OS_SECRET_ID }}/${{ secrets.YC_OS_SECRET_VERSION }}/${{ vars.K8S_HOST_KEY }}
K8S_SSL_CERTIFICATE=${{ secrets.YC_OS_SECRET_ID }}/${{ secrets.YC_OS_SECRET_VERSION }}/${{ vars.K8S_SSL_KEY }}
service-account: ${{ secrets.YC_OS_K8S_DEPLOYER_SA_ID }}
network-id: ${{ secrets.YC_OS_NETWORK_ID }}
include: |
requirements.txt
./k8s_deployer
./lib
cloud_functions.py
exclude: |
**/*.pyc
- name: Deploy Monitoring Function
uses: yc-actions/yc-sls-function@v2
with:
yc-sa-json-credentials: ${{ secrets.YC_SA_JSON_CREDENTIALS }}
folder-id: ${{ secrets.YC_OS_FOLDER_ID }}$
function-name: 'monitoring4testing'
runtime: 'python311'
memory: '128Mb'
execution-timeout: '600s'
entrypoint: 'cloud_functions.send_monitoring_metrics'
environment: |
CONTOUR=${{ vars.CONTOUR }}
secrets:
DB_PASS=${{ secrets.YC_OS_SECRET_ID }}/${{ secrets.YC_OS_SECRET_VERSION }}/${{ vars.DB_PASS_KEY }}
DB_PORT=${{ secrets.YC_OS_SECRET_ID }}/${{ secrets.YC_OS_SECRET_VERSION }}/${{ vars.DB_PORT_KEY }}
DB_USER=${{ secrets.YC_OS_SECRET_ID }}/${{ secrets.YC_OS_SECRET_VERSION }}/${{ vars.DB_USER_KEY }}
DB_NAME=${{ secrets.YC_OS_SECRET_ID }}/${{ secrets.YC_OS_SECRET_VERSION }}/${{ vars.DB_NAME_KEY }}
DB_HOST=${{ secrets.YC_OS_SECRET_ID }}/${{ secrets.YC_OS_SECRET_VERSION }}/${{ vars.DB_HOST_KEY }}
K8S_HOST=${{ secrets.YC_OS_SECRET_ID }}/${{ secrets.YC_OS_SECRET_VERSION }}/${{ vars.K8S_HOST_KEY }}
K8S_SSL_CERTIFICATE=${{ secrets.YC_OS_SECRET_ID }}/${{ secrets.YC_OS_SECRET_VERSION }}/${{ vars.K8S_SSL_KEY }}
service-account: ${{ secrets.YC_OS_MONITORING_SA_ID }}
network-id: ${{ secrets.YC_OS_NETWORK_ID }}
include: |
requirements.txt
./k8s_deployer
./lib
cloud_functions.py
exclude: |
**/*.pyc
- name: Deploy Registration Function
uses: yc-actions/yc-sls-function@v2
with:
yc-sa-json-credentials: ${{ secrets.YC_SA_JSON_CREDENTIALS }}
folder-id: ${{ secrets.YC_OS_FOLDER_ID }}
function-name: 'register4testing'
runtime: 'python311'
memory: '128Mb'
execution-timeout: '600s'
entrypoint: 'cloud_functions.register'
environment: |
CONTOUR=${{ vars.CONTOUR }}
secrets:
DB_PASS=${{ secrets.YC_OS_SECRET_ID }}/${{ secrets.YC_OS_SECRET_VERSION }}/${{ vars.DB_PASS_KEY }}
DB_PORT=${{ secrets.YC_OS_SECRET_ID }}/${{ secrets.YC_OS_SECRET_VERSION }}/${{ vars.DB_PORT_KEY }}
DB_USER=${{ secrets.YC_OS_SECRET_ID }}/${{ secrets.YC_OS_SECRET_VERSION }}/${{ vars.DB_USER_KEY }}
DB_NAME=${{ secrets.YC_OS_SECRET_ID }}/${{ secrets.YC_OS_SECRET_VERSION }}/${{ vars.DB_NAME_KEY }}
DB_HOST=${{ secrets.YC_OS_SECRET_ID }}/${{ secrets.YC_OS_SECRET_VERSION }}/${{ vars.DB_HOST_KEY }}
K8S_HOST=${{ secrets.YC_OS_SECRET_ID }}/${{ secrets.YC_OS_SECRET_VERSION }}/${{ vars.K8S_HOST_KEY }}
K8S_SSL_CERTIFICATE=${{ secrets.YC_OS_SECRET_ID }}/${{ secrets.YC_OS_SECRET_VERSION }}/${{ vars.K8S_SSL_KEY }}
service-account: ${{ secrets.YC_OS_REGISTRATION_SA_ID }}
network-id: ${{ secrets.YC_OS_NETWORK_ID }}
include: |
requirements.txt
./registration_backend
./lib
cloud_functions.py
exclude: |
**/*.pyc
- name: Deploy Timeslots Function
uses: yc-actions/yc-sls-function@v2
with:
yc-sa-json-credentials: ${{ secrets.YC_SA_JSON_CREDENTIALS }}
folder-id: ${{ secrets.YC_OS_FOLDER_ID }}
function-name: 'timeslots4testing'
runtime: 'python311'
memory: '128Mb'
execution-timeout: '600s'
entrypoint: 'cloud_functions.timeslots'
environment: |
CONTOUR=${{ vars.CONTOUR }}
secrets:
DB_PASS=${{ secrets.YC_OS_SECRET_ID }}/${{ secrets.YC_OS_SECRET_VERSION }}/${{ vars.DB_PASS_KEY }}
DB_PORT=${{ secrets.YC_OS_SECRET_ID }}/${{ secrets.YC_OS_SECRET_VERSION }}/${{ vars.DB_PORT_KEY }}
DB_USER=${{ secrets.YC_OS_SECRET_ID }}/${{ secrets.YC_OS_SECRET_VERSION }}/${{ vars.DB_USER_KEY }}
DB_NAME=${{ secrets.YC_OS_SECRET_ID }}/${{ secrets.YC_OS_SECRET_VERSION }}/${{ vars.DB_NAME_KEY }}
DB_HOST=${{ secrets.YC_OS_SECRET_ID }}/${{ secrets.YC_OS_SECRET_VERSION }}/${{ vars.DB_HOST_KEY }}
K8S_HOST=${{ secrets.YC_OS_SECRET_ID }}/${{ secrets.YC_OS_SECRET_VERSION }}/${{ vars.K8S_HOST_KEY }}
K8S_SSL_CERTIFICATE=${{ secrets.YC_OS_SECRET_ID }}/${{ secrets.YC_OS_SECRET_VERSION }}/${{ vars.K8S_SSL_KEY }}
service-account: ${{ secrets.YC_OS_REGISTRATION_SA_ID }}
network-id: ${{ secrets.YC_OS_NETWORK_ID }}
include: |
requirements.txt
./registration_backend
./lib
cloud_functions.py
exclude: |
**/*.pyc