Skip to content

chore: remove serverless and terraform backends #89

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

Merged
merged 17 commits into from
May 9, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/actions/setup-poetry/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ runs:
- name: Install poetry dependencies
shell: bash
run: poetry install --no-interaction --no-root --with=dev
if: steps.cache-deps.outputs.cache-hit != 'true'
if: steps.cache-poetry-deps.outputs.cache-hit != 'true'

- name: Install scw_serverless
shell: bash
Expand Down
14 changes: 0 additions & 14 deletions .github/actions/setup-serverless-framework/action.yml

This file was deleted.

10 changes: 9 additions & 1 deletion .github/workflows/integration-gateway.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,14 @@ env:
S3_ENDPOINT: "https://s3.fr-par.scw.cloud"
S3_REGION: "fr-par"

defaults:
run:
shell: bash

jobs:
test-deployed-gateway:
runs-on: ubuntu-latest
runs-on: self-hosted
container: python:3.11-bullseye
steps:
- uses: actions/checkout@v3

Expand All @@ -38,6 +43,9 @@ jobs:
default-organization-id: ${{ secrets.SCW_DEFAULT_ORGANIZATION_ID }}
save-config: true

- name: Install jq
run: apt-get update && apt-get install -y jq

- name: Create Gateway namespace
working-directory: ${{ env.GATEWAY_CHECKOUT_DIR }}
run: |
Expand Down
9 changes: 1 addition & 8 deletions .github/workflows/pytest-integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,17 +13,10 @@ permissions:
jobs:
test:
runs-on: self-hosted
container: nikolaik/python-nodejs:python3.10-nodejs18
container: python:3.11-bullseye
steps:
- uses: actions/checkout@v3

- name: Install terraform
uses: hashicorp/setup-terraform@v2
with:
terraform_wrapper: false

- uses: ./.github/actions/setup-serverless-framework

- uses: ./.github/actions/setup-poetry

- name: Test with pytest
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pytest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ permissions:
jobs:
test:
runs-on: self-hosted
container: nikolaik/python-nodejs:python3.10-nodejs18
container: python:3.11-bullseye
steps:
- uses: actions/checkout@v3

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/python-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ permissions:
jobs:
deploy:
runs-on: self-hosted
container: nikolaik/python-nodejs:python3.10-nodejs18
container: python:3.11-slim-bullseye
steps:
- uses: actions/checkout@v3

Expand Down
2 changes: 1 addition & 1 deletion docs/source/configuring.rst
Original file line number Diff line number Diff line change
Expand Up @@ -69,4 +69,4 @@ If do not want your function to be publicly available, set the privacy to `priva
def handler(event, context):
...

.. autofunction:: scw_serverless.app.Serverless.schedule
.. autoclass:: scw_serverless.config.triggers.CronTrigger
23 changes: 2 additions & 21 deletions docs/source/deploying.rst
Original file line number Diff line number Diff line change
Expand Up @@ -14,27 +14,8 @@ The `deploy` command will deploy your functions directly.

The command will wait until all functions are deployed and ready to be called. It will also deploy the corresponding triggers.

Generate
--------

Generators will generate configuration files to use with other deployment tools.
Currently, you can generate either a `serverless` or `terraform` configuration file. This can be useful to integrate with your existing tooling.

Config file generation is done with the `generate` command:

.. code-block:: console

scw-serverless generate -t serverless

Serverless Generator
^^^^^^^^^^^^^^^^^^^^

.. autoclass:: scw_serverless.config.generators.ServerlessFrameworkGenerator

Terraform Generator
^^^^^^^^^^^^^^^^^^^

.. autoclass:: scw_serverless.config.generators.TerraformGenerator
If you have routed functions, the deploy command will also call your Serverless Gateway to update the routes to your function.
For more information on the Gateway integration, see also :doc:`gateway`.

Dependencies
------------
Expand Down
Loading