🚀 DAY 2 OF LAUNCH WEEK: Announcing Socket Certified Patches: One-Click Fixes for Vulnerable Dependencies.Learn more →
Socket
Book a DemoInstallSign in
Socket

@salto-io/da-playa

Package Overview
Dependencies
Maintainers
9
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@salto-io/da-playa

Deploy locks management (CLI and Slackbot)

latest
Source
npmnpm
Version
0.0.25
Version published
Maintainers
9
Created
Source

Da-Playa - Dynamo Deploy Locker and Running Jobs coordinator

Da-Playa stores the locks and running jobs in DynamoDB

DB Schema:

DaPlayaLocks

id         |       user        |   env        | createdAt | updatedAt | active | uberlock | meta
                                                           
<UUID>     |  <COMMITER_EMAIL> | PRODUCTION   | 123123123 | 123123123 | true   | false    | CI URL
<UUID>     |  <COMMITER_EMAIL> | STAGING      | 123123123 | 123123123 | false  | true     | Slack
<UUID>     |  <COMMITER_EMAIL> | WHATEVZ      | 123123123 | 123123123 | false  | true     | CLI

DaPlayaRunningJobs

id         |       user        |   jobname    | version   | started   | ended     | skipped
                                                                                                         
<UUID>     |  <COMMITER_EMAIL> | deploy-prod  | GIT_SHA1  | 123123123 | 123123123 |  true  
<UUID>     |  <COMMITER_EMAIL> | deploy-stage | GIT_SHA1  | 123123123 |           |  false 
<UUID>     |  <COMMITER_EMAIL> | WHATEVZ      | GIT_SHA1  | 123123123 | 123123123 |  false 

CLI

Loads AWS credentials from environment variables (either AWS_PROFILE or the explicit AWS_SECRET_ACCESS_KEY and AWS_ACCESS_KEY_ID).

init                                                                          # creates table
locks list --env <ENV>                                                        # list locks
locks release --env <ENV> --user <USER> [--uberlock]                          # release locked env for user at env
locks lock --env <ENV> --user <USER> [--meta <META>] [--uberlock]             # locks an env for the user
jobs start --jobname <JOBNAME> --user <USER> --gitversion <VERSION>           # creates a running job
jobs get --jobname <JOBNAME> --gitversion <VERSION>                           # get the details of a specific job
jobs end --jobname <JOBNAME> --gitversion <VERSION> [--skipped]               # ends a running job, optionally set it as skipped
jobs active --jobname <JOBNAME> [--ttl <TIMEFRAME>]                           # list all running jobs within time frame
jobs skipped --jobname <JOBNAME> [--ttl <TIMEFRAME>]                          # list all skipped jobs within time frame

Note:

lock keeps writing attempts for locking in case it's waiting (every 5 seconds).

E.g. : Still locked at env <ENV> by <USER>

Additional Env Vars

DAPLAYA_AWS_REGION # Optionally explicitly set region to save DynamoDB table
:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::....................................................
:::::::::::::::::::::::::::::::::::::::::::::::::.:::::::................................::.---:.....:.........
:::::::::::::::::::::::::::::::::::::::::::::::::------:::::.:::.......................:::--:..........::::::..
:::::::::-:::::--:::::::::::::::::::---:--:::::::::::::::::::::::.............::::::::..............:::::::::::
::::::-::--:-::---:::::::::::::::::::::--:-::::::::::::::::::::::..........:::-----:--:::...........=+-:::-+*+-
::::----::-----:--:::::::::::::::::::::::::::::::::::----=--::::::..:....::--------:::::-::::::.....:##-:+*#+-.
:::::-:::::----:::--:::::::::::::::::::::::::::::::::::--:::::::::.:....:----:-------====*=-:::.::..:+#++##=:::
:::::--:::::----:-----::::::::::::::::::::::::::::::::::::::::::::::...:------------------::.::::::::+#*#*+==-:
::::::::::::-----------::::::::::::::::::::::::::::::::::::::::::::::.::---------------:---:.::::-=**##%%%%##*-
--:::::::--:::----------:::-::::======-::::::::::::::::::::::::::::::::--------------------:::::+#*=+*#%%#+*++-
----:::::::::::--:--------:::::-#%#+=-:::::::::::::::::::::::::::::::::--------------------:::-**=--*####%*=:::
------::::-::::---::::----::::-*=*=++=====-::::::::::::::::::::::::::::::-------=*===------:=+=-::-**+#=+#*+:::
-------:::---------:-------::-*+=%%%#*+=-:::::::::::::::::::::::::::::::::-------+###+---=*#*-::::=+--*:-#+-:::
--------::-------------------*#-+#*=-::::::::::::::::::::::::::::::::::::::::-----+%##*--*%%=::::-+-:=+::+=-:::
---------------------:------+%*-+=------:--:::::::::::::::::::::::::::::::::::-+**##%%%#*%#+---::::::+=::-:::::
---------------------------+%%+-++--------:::::::::::::::::::::::::::::::::::+******%%%#%%%%%%#*=-:::*=::::::::
=-------------------------=%@@=-+*------------::::::::::::::::::::::::::::::--:-:=+*#%%%%%%#**+##*=::#-::::::::
=------------------------=%@@@--+*------------------::::::::::::::::::::::::::::-*#***#%#@%%*-::---::#-::::::::
====---------------------%@@@@--*%------------------::::::::::::::::::::::::::::+#*-=#%##%#%%+-:::::-%=::::::::
========----------------#@@%%@=*#%+-----------=------------::::::::::::::::::::-+--:+##*=%+*#%=:::::-%=::::::::
=======-===------------*%@@@%%%+*@#-----------+------------:----:-::::::::::::::-:::-**+-**-+#+::::::%+-:::::::
==============--------+@@%#+*@*-*@%=----------*----==-------------------::::::::::::-**-:=%=:==::::::%*-:::::::
=================---=+@@#=-#@@*-*@@#----------#---------------------------:::::::-:---=-:-#*:--------##-::::--:
=====================%%+-=%@@#*-#@@@+---------%+-----------------------------::-----------+%+--------#%-------:
===================+%#+=+@@@@#++#@@@%=--------%#----=-==---===----------------------------=%%=----===#%==------
++++++++++++++*++++%#**#@@@@@%*#%@@@@%++++++++%@*++++++++++================================+@%=======#@*======-
******************##+*#@@@@@@@#%@@@@@@*++==+++%@#++==+============--------------------------*@#=-----*@#======:
=+++++++**+++****##++#@%#**#%@@#%@@@@@@+======@@@*===============----------------------------#@#-----+@%------:
=+++++++++++++++*#+*%%*+++#@@@@+%@@@@@@%+=====@@@@+==============-----------------------------#@#==--+@@===---:
+++++++++++++++**+*%*++*%@@@@@%=%@@@@@@@%+====@@@@@*=============-----------------------------=#@%+===@@*=====-
+++++++++++++++*+*#++#%@@@@@@@@+%@@@@@@@@%*===@@@@@@#==============----------------------------=#@@*-=%@#=====:
++++++++++++++*+##*#@@@@@@@@@@@*%@@@@@@@@@@#++@@@@@@@%*============--------=---------------------*@@#=#@@+==+++
+++++++++++++*+#%%@%%%####%%%@@%#############**++++++*++++++======----=-=-=--------------===-=-===+%@@%@@%***%*
++++++++++++##%%%##*##*******##%#**********+**#++++++======================------+******#%@%%**%##%%@@@@@@@@%%*
+++++++++++++*#%@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@%*============--======--------=+#%%#@@@@@@@@@@@@@@@@@@@@@@@*
=+++++++++++++++*%@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@%#++++=====================--======++=*%%%%@@@@@@@@@@@@@@@@@@#
++++++++++++++++++*#%%%%%%%%%%%%%%%%%%%%%%%%%%%%*+++++=+===============================+*===+@@@@@@@@@@@@@@@@@#
++++++++++++++++++++++++++++++++++++++++++++++++=============================+===============**%@@@@@@@@@@@@@@%
+++++++++++++=+++==+=======++++++++++====+=====================================================**%@@@@@@@@@@@@%
+++++++++++++++++++++==++==++++++++++++===================================================+++*+=+*@@@@@@@@@@@@%
+++++++=++++++++++++++++++++++++++++++++++++++++==++++++==++++=====++=+=+++**+++++++++++++++##+*%%@@@@@@@@@@@@%
=+++++++++++++++++++++++++++++++++=+=+++++++++++=+++++++++++++++++*%@%###%%@@@%%#*++%*++#%++%@#@@@@@@@@@@@@@@@%
===============+=+++++++++++++++++++++++++++++=+++++++++++++++%%%%@%%%%@@@@@@@@@@@@%@%+*%@@@@@@@@@@@@@@@@@@@@@%

Testing locally

npm run -s cli -- <PARAMS> # -s to supress npm verbose output

Keywords

deploy

FAQs

Package last updated on 21 May 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts