Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@sofarocean/code-loft

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@sofarocean/code-loft

Standard build script combining Terraform and custom pre- and post- deploy options

  • 0.3.0
  • latest
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

Usage

deploy

npx @sofarocean/code-loft deploy [--pre-apply <script>] [--post-apply <script>]

Running this command from your local machine or on a CI/CD server (such as with Github Actions) will:

  • Infer the environment (dev, staging, or prod) frome the current git branch
  • Load environment variables from the corresponding .env file for your chosen deploy environment
  • Initialize Terraform and select a workspace corresponding to the chosen deploy environment.
  • Run your pre-apply script if specified
  • Run terraform apply with the .tfvars corresponding to the chosen deploy environment
  • Run your post-apply script if specified

The deployment environment can be overridden with the -d or --deploy-env option.

For a full list of options, run:

npx @sofarocean/code-loft deploy -h

On a CI/CD server

When running on a CI/CD server, you can set the -a or --auto-approve option to auto-approve the Terraform changes.

Alias

If you find yourself using code-loft frequently from the command line, you can create an alias by adding an entry to your ~/.profile, ~/.bashrc, or similar:

alias code-loft='npx @sofarocean/code-loft'

And then running commands from any directory with:

code-loft

TODO

promote

Promote code on dev->staging or staging->prod

init

Initialize a project with the standard deployment setup:

  • /terraform directory with [dev,staging,prod].tfvars files
  • [dev,staging,prod].env files for environment variables in each environment
  • Run git init if needed
  • Create a dev and staging git branch and checkout dev
  • Configure git remote repository with default branch dev, branch protection, linear history, etc?

test

  • Like deploy, but set up environment variables before running test command
  • Ability to set up temporary terraform stack?

Other things

  • Slack notifications?

FAQs

Package last updated on 02 Apr 2020

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc