Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Select an option

  • Save codepreneur/d3b6afa05b6bfe8a1d9922ab374bbaab to your computer and use it in GitHub Desktop.

Select an option

Save codepreneur/d3b6afa05b6bfe8a1d9922ab374bbaab to your computer and use it in GitHub Desktop.

Revisions

  1. @HyperBrain HyperBrain revised this gist Jul 3, 2017. 1 changed file with 1 addition and 0 deletions.
    1 change: 1 addition & 0 deletions lifecycle-cheat-sheet.md
    Original file line number Diff line number Diff line change
    @@ -52,6 +52,7 @@ and invoke a sub lifecycle.
    #### deploy:deploy

    -> aws:deploy:deploy:createStack
    -> aws:deploy:deploy:checkForChanges (1.17->)
    -> aws:deploy:deploy:uploadArtifacts
    -> aws:deploy:deploy:validateTemplate
    -> aws:deploy:deploy:updateStack
  2. @HyperBrain HyperBrain revised this gist May 31, 2017. 1 changed file with 1 addition and 0 deletions.
    1 change: 1 addition & 0 deletions lifecycle-cheat-sheet.md
    Original file line number Diff line number Diff line change
    @@ -53,6 +53,7 @@ and invoke a sub lifecycle.

    -> aws:deploy:deploy:createStack
    -> aws:deploy:deploy:uploadArtifacts
    -> aws:deploy:deploy:validateTemplate
    -> aws:deploy:deploy:updateStack

    #### deploy:finalize
  3. @HyperBrain HyperBrain created this gist May 30, 2017.
    128 changes: 128 additions & 0 deletions lifecycle-cheat-sheet.md
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,128 @@
    # Serverless plugin author's cheat sheet

    This cheat sheet provides a detailed overview of the exposed lifecycle events
    and available commands (and entrypoints) of the Serverless framework, that can
    be hooked by plugins (internal and external ones). The document is structured by
    the commands invoked by the user.

    Lifecycle events are shown as the globally available outer events (all providers)
    and sub lifecycle events that are provider specific in the called order. Currently
    only the AWS provider is shown. If you have information about the other provider,
    please let me know and I will add the sub lifecycles accordingly.

    The current event system can be improved in the future. Only _package_, _deploy_
    and _info_ provide detailed event lifecycles for now, that make the plugin integration
    much more fine-grained.

    Plugins can spawn any command or entrypoint with `this.serverless.pluginManager.spawn()`
    and invoke a sub lifecycle.

    # Lifecycle events / commands

    ## package

    #### package:cleanup

    -> aws:common:validate:validate
    -> aws:common:cleanupTempDir:cleanup

    #### package:initialize

    #### package:setupProviderConfiguration

    #### package:createDeploymentArtifacts

    #### package:compileFunctions

    #### package:compileEvents

    #### package:finalize

    -> aws:package:finalize:mergeCustomProviderResources
    -> aws:package:finalize:saveServiceState
    -> aws:common:moveArtifactsToPackage:move

    ## deploy

    #### before:deploy:deploy

    -> aws:common:validate:validate
    -> aws:common:moveArtifactsToTemp:move

    #### deploy:deploy

    -> aws:deploy:deploy:createStack
    -> aws:deploy:deploy:uploadArtifacts
    -> aws:deploy:deploy:updateStack

    #### deploy:finalize

    -> aws:deploy:finalize:cleanup

    ## info

    #### info:info

    -> aws:info:validate
    -> aws:info:gatherData
    -> aws:info:displayServiceInfo
    -> aws:info:displayApiKeys
    -> aws:info:displayEndpoints
    -> aws:info:displayFunctions
    -> aws:info:displayStackOutputs

    ## remove

    #### remove:remove

    ## rollback

    #### rollback:initialize

    #### rollback:rollback

    ## rollback function

    #### rollback:function:rollback

    ## logs

    #### logs:logs

    ## invoke

    #### invoke:invoke

    ## invoke local

    #### invoke:local:loadEnvVars

    #### invoke:local:invoke

    ## create

    #### create:create

    ## config

    #### config:credentials:config

    ## install

    #### install:install

    ## login

    #### login:login

    ## logout

    #### logout:logout

    ## metrics

    #### metrics:metrics

    ## slstats

    #### slstats:slstats