Deploys updates and removes Serverless Stacks on AWS Cloudformation.
-
access_key_id
: Required. The AWS access key to use when accessing the bucket. -
secret_access_key
: Required. The AWS secret key to use when accessing the bucket. -
region_name
: Optional. The region to deploy to. Defaults to eu-west-1
Checks for correct source configuration and AWS credentials.
- Saves a file with the name
stage
in the directory containing the name of the deployed stage. Callingin
before callingout
in the same pipeline can cause unexpected behavior.
None.
stage is available as environment variable STAGE. Use it as ($env:STAGE)
inside serverless.yml
Uses serverless_file
and artifacts in artifact_folder
to deploy stack.
Warning: Removing the stack will remove all resources and all contents of every bucket defined in the stack
-
serverless_file
: Folder path that contains serverless.yml. -
artifact_folder
: Path to artifacts that are used in the serverless.yml. Make sure the artifact references in the serverless.yml is in this folder. -
stage_file
: Path to a file that contains the stage name of the stack -
stage
: Stage name for the stack -
deploy
: If set totrue
deploys the stack. -
remove
: If set totrue
removes the stack.
Either stagefile
or stage
has to be set.
Also either deploy
or remove
has to be set to true.
- name: serverless
type: docker-image
source:
repository: quay.io/cosee-concourse/serverless-resource
- name: deploy
type: serverless
source:
access_key_id: ACCESS-KEY
secret_access_key: SECRET
region_name: eu-west-1
- get: deploy
- put: deploy
params:
deploy: true
stage: release
artifact_folder: artifacts/
serverless_file: source/ci
- put: deploy
params:
deploy: true
stage_file: naming/name
artifact_folder: artifacts/
serverless_file: source/ci
- put: deploy
params:
remove: true
stage: release
serverless_file: source/ci
- put: deploy
params:
remove: true
stage_file: naming/name
serverless_file: source/ci