Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support CI/CD Pipelines using Artifacts #123

Open
TravisCalder opened this issue Sep 29, 2023 · 0 comments · May be fixed by #124
Open

Support CI/CD Pipelines using Artifacts #123

TravisCalder opened this issue Sep 29, 2023 · 0 comments · May be fixed by #124

Comments

@TravisCalder
Copy link

💡 Feature description

When an artifact is provided in serverless.yaml for a Rust function, skip building that function and use the provided artifact instead.

This should not cause the error for no Rust functions found to trigger, even if all Rust functions are skipped this way.

This is required to support CI/CD pipeline patterns where artifacts are built in one step, then verified, and then the verified artifact is deployed without recompiling which could introduce variance.

Nice To Have:

It would also be nice if the "no Rust functions" error could be suppressed, and if Rust functions could be discovered in a way that doesn't cause schema warnings.

💻 Basic example

For the following serverless.yaml:

service: barebones-service
provider:
  name: aws
  runtime: rust
  memorySize: 128
  stage: dev

package:
  individually: true

custom:
  rust:
    dockerless: true

plugins:
  - serverless-rust

functions:
  restApi:
    handler: "rest"
    events:
      - httpApi: '*'
    package:
      artifact: ${param:artifact,""}

This allows a build-and-deploy workflow:

serverless deploy --stage stage

Or an artifact workflow:

serverless package --stage stage
cp target/lambda/release/rest.zip artifacts/
# VERIFY PACKAGE
serverless deploy --stage stage --param="artifact=artifacts/rest.zip"
@TravisCalder TravisCalder linked a pull request Sep 29, 2023 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant