Fork of atlassian bitbucket serverless-deploy pipe to add git support
236
Deploy a Serverless application to AWS and Google Cloud. The pipe should also work with Azure, however support is currently limited and not guaranteed.
Add the following snippet to the script section of your bitbucket-pipelines.yml file:
script:
- pipe: atlassian/serverless-deploy:1.0.0
variables:
# CONFIG: "<string>" # Optional
# EXTRA_ARGS: "<string>" # Optional
# DEBUG: "<boolean>" # Optional
| Variable | Usage |
|---|---|
| CONFIG | Path to the Serverless framework configuration file. Default: serverless.yml. |
| EXTRA_ARGS | Extra options to pass to the serverless deploy command as a string. These options depend on the deployment provider. Default: '' |
| DEBUG | Turn on extra debug information. Default: false. |
Deployment credentials are cloud provider specific.
| Variable | Usage |
|---|---|
| AWS_ACCESS_KEY_ID | AWS key id. Default: None. |
| AWS_SECRET_ACCESS_KEY | AWS secret key. Default: None. |
| GCP_KEY_FILE | base64 encoded contents of the GCP key file. Default: None. |
| AZURE_SUB_ID | Azure subscription ID. Default: None. |
| SERVERLESS_ACCESS_KEY | Serverless access key for optional integration with the Serverless dashboard. Default: None |
| AZURE_SERVICE_PRINCIPAL_TENANT_ID | Azure service principal tenant ID. Default: None. |
| AZURE_SERVICE_PRINCIPAL_CLIENT_ID | Azure service principal client ID. Default: None. |
| AZURE_SERVICE_PRINCIPAL_PASSWORD | Azure service principal password. Default: None. |
(*) = required variable.
Google Cloud Platform:
serverless.yml.For base64 encoded contents required by GCP_KEY_FILE variable use command:
Linux
$ base64 -w 0 < GCP_key
MAC OS X
$ base64 < GCP_key
Basic example deploying to AWS:
script:
- pipe: atlassian/serverless-deploy:1.0.0
variables:
AWS_ACCESS_KEY_ID: $AWS_ACCESS_KEY_ID
AWS_SECRET_ACCESS_KEY: $AWS_SECRET_ACCESS_KEY
Exmaple deploying to Google Cloud:
script:
- pipe: atlassian/serverless-deploy:1.0.0
variables:
GCP_KEY_FILE: $GCP_KEY_FILE
Example passing extra args:
script:
- pipe: atlassian/serverless-deploy:1.0.0
variables:
AWS_ACCESS_KEY_ID: $AWS_ACCESS_KEY_ID
AWS_SECRET_ACCESS_KEY: $AWS_SECRET_ACCESS_KEY
EXTRA_ARGS: '--verbose'
If you’d like help with this pipe, or you have an issue or feature request, let us know on Community.
If you’re reporting an issue, please include:
Content type
Image
Digest
Size
175.7 MB
Last updated
over 5 years ago
docker pull switchsystems/serverless-deploy