Skip to content

Deploy everything to dev #4

Deploy everything to dev

Deploy everything to dev #4

Workflow file for this run

name: Deploy everything to dev
on: workflow_dispatch
env:
CONTOUR: testing
DB_PASS_KEY: pg-password-demo_manager_test
DB_PORT_KEY: pg-port
DB_USER_KEY: pg-user
DB_NAME_KEY: pg-name
DB_HOST_KEY: pg-host
K8S_HOST_KEY: k8s-host
K8S_SSL_KEY: k8s-certificate-authority-data
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=$(CONTOUR)
secrets:
DB_PASS=${{ secrets.YC_OS_SECRET_ID }}/${{ secrets.YC_OS_SECRET_VERSION }}/$DB_PASS_KEY
DB_PORT=${{ secrets.YC_OS_SECRET_ID }}/${{ secrets.YC_OS_SECRET_VERSION }}/$DB_PORT_KEY
DB_USER=${{ secrets.YC_OS_SECRET_ID }}/${{ secrets.YC_OS_SECRET_VERSION }}/$DB_USER_KEY
DB_NAME=${{ secrets.YC_OS_SECRET_ID }}/${{ secrets.YC_OS_SECRET_VERSION }}/$DB_NAME_KEY
DB_HOST=${{ secrets.YC_OS_SECRET_ID }}/${{ secrets.YC_OS_SECRET_VERSION }}/$DB_HOST_KEY
K8S_HOST=${{ secrets.YC_OS_SECRET_ID }}/${{ secrets.YC_OS_SECRET_VERSION }}/$K8S_HOST_KEY
K8S_SSL_CERTIFICATE=${{ secrets.YC_OS_SECRET_ID }}/${{ secrets.YC_OS_SECRET_VERSION }}/$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=$(CONTOUR)
secrets:
DB_PASS=${{ secrets.YC_OS_SECRET_ID }}/${{ secrets.YC_OS_SECRET_VERSION }}/$DB_PASS_KEY
DB_PORT=${{ secrets.YC_OS_SECRET_ID }}/${{ secrets.YC_OS_SECRET_VERSION }}/$DB_PORT_KEY
DB_USER=${{ secrets.YC_OS_SECRET_ID }}/${{ secrets.YC_OS_SECRET_VERSION }}/$DB_USER_KEY
DB_NAME=${{ secrets.YC_OS_SECRET_ID }}/${{ secrets.YC_OS_SECRET_VERSION }}/$DB_NAME_KEY
DB_HOST=${{ secrets.YC_OS_SECRET_ID }}/${{ secrets.YC_OS_SECRET_VERSION }}/$DB_HOST_KEY
K8S_HOST=${{ secrets.YC_OS_SECRET_ID }}/${{ secrets.YC_OS_SECRET_VERSION }}/$K8S_HOST_KEY
K8S_SSL_CERTIFICATE=${{ secrets.YC_OS_SECRET_ID }}/${{ secrets.YC_OS_SECRET_VERSION }}/$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=$(CONTOUR)
secrets:
DB_PASS=${{ secrets.YC_OS_SECRET_ID }}/${{ secrets.YC_OS_SECRET_VERSION }}/$DB_PASS_KEY
DB_PORT=${{ secrets.YC_OS_SECRET_ID }}/${{ secrets.YC_OS_SECRET_VERSION }}/$DB_PORT_KEY
DB_USER=${{ secrets.YC_OS_SECRET_ID }}/${{ secrets.YC_OS_SECRET_VERSION }}/$DB_USER_KEY
DB_NAME=${{ secrets.YC_OS_SECRET_ID }}/${{ secrets.YC_OS_SECRET_VERSION }}/$DB_NAME_KEY
DB_HOST=${{ secrets.YC_OS_SECRET_ID }}/${{ secrets.YC_OS_SECRET_VERSION }}/$DB_HOST_KEY
K8S_HOST=${{ secrets.YC_OS_SECRET_ID }}/${{ secrets.YC_OS_SECRET_VERSION }}/$K8S_HOST_KEY
K8S_SSL_CERTIFICATE=${{ secrets.YC_OS_SECRET_ID }}/${{ secrets.YC_OS_SECRET_VERSION }}/$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=$(CONTOUR)
secrets:
DB_PASS=${{ secrets.YC_OS_SECRET_ID }}/${{ secrets.YC_OS_SECRET_VERSION }}/$DB_PASS_KEY
DB_PORT=${{ secrets.YC_OS_SECRET_ID }}/${{ secrets.YC_OS_SECRET_VERSION }}/$DB_PORT_KEY
DB_USER=${{ secrets.YC_OS_SECRET_ID }}/${{ secrets.YC_OS_SECRET_VERSION }}/$DB_USER_KEY
DB_NAME=${{ secrets.YC_OS_SECRET_ID }}/${{ secrets.YC_OS_SECRET_VERSION }}/$DB_NAME_KEY
DB_HOST=${{ secrets.YC_OS_SECRET_ID }}/${{ secrets.YC_OS_SECRET_VERSION }}/$DB_HOST_KEY
K8S_HOST=${{ secrets.YC_OS_SECRET_ID }}/${{ secrets.YC_OS_SECRET_VERSION }}/$K8S_HOST_KEY
K8S_SSL_CERTIFICATE=${{ secrets.YC_OS_SECRET_ID }}/${{ secrets.YC_OS_SECRET_VERSION }}/$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=$(CONTOUR)
secrets:
DB_PASS=${{ secrets.YC_OS_SECRET_ID }}/${{ secrets.YC_OS_SECRET_VERSION }}/$DB_PASS_KEY
DB_PORT=${{ secrets.YC_OS_SECRET_ID }}/${{ secrets.YC_OS_SECRET_VERSION }}/$DB_PORT_KEY
DB_USER=${{ secrets.YC_OS_SECRET_ID }}/${{ secrets.YC_OS_SECRET_VERSION }}/$DB_USER_KEY
DB_NAME=${{ secrets.YC_OS_SECRET_ID }}/${{ secrets.YC_OS_SECRET_VERSION }}/$DB_NAME_KEY
DB_HOST=${{ secrets.YC_OS_SECRET_ID }}/${{ secrets.YC_OS_SECRET_VERSION }}/$DB_HOST_KEY
K8S_HOST=${{ secrets.YC_OS_SECRET_ID }}/${{ secrets.YC_OS_SECRET_VERSION }}/$K8S_HOST_KEY
K8S_SSL_CERTIFICATE=${{ secrets.YC_OS_SECRET_ID }}/${{ secrets.YC_OS_SECRET_VERSION }}/$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=$(CONTOUR)
secrets:
DB_PASS=${{ secrets.YC_OS_SECRET_ID }}/${{ secrets.YC_OS_SECRET_VERSION }}/$DB_PASS_KEY
DB_PORT=${{ secrets.YC_OS_SECRET_ID }}/${{ secrets.YC_OS_SECRET_VERSION }}/$DB_PORT_KEY
DB_USER=${{ secrets.YC_OS_SECRET_ID }}/${{ secrets.YC_OS_SECRET_VERSION }}/$DB_USER_KEY
DB_NAME=${{ secrets.YC_OS_SECRET_ID }}/${{ secrets.YC_OS_SECRET_VERSION }}/$DB_NAME_KEY
DB_HOST=${{ secrets.YC_OS_SECRET_ID }}/${{ secrets.YC_OS_SECRET_VERSION }}/$DB_HOST_KEY
K8S_HOST=${{ secrets.YC_OS_SECRET_ID }}/${{ secrets.YC_OS_SECRET_VERSION }}/$K8S_HOST_KEY
K8S_SSL_CERTIFICATE=${{ secrets.YC_OS_SECRET_ID }}/${{ secrets.YC_OS_SECRET_VERSION }}/$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