@@ -114,28 +114,29 @@ Follow these steps to deploy a function using the Node.js runtime to your Knativ
...
@@ -114,28 +114,29 @@ Follow these steps to deploy a function using the Node.js runtime to your Knativ
- Public, continue to the next step.
- Public, continue to the next step.
- Private, you will need to [create a GitLab deploy token](../../deploy_tokens/index.md#creating-a-deploy-token) with `gitlab-deploy-token` as the name and the `read_registry` scope.
- Private, you will need to [create a GitLab deploy token](../../deploy_tokens/index.md#creating-a-deploy-token) with `gitlab-deploy-token` as the name and the `read_registry` scope.
1.`.gitlab-ci.yml`: This template allows to define the stage, environment, and
1.`.gitlab-ci.yml`: this configuration allows to define the environment to be
image to be used for your functions. It must be included at the root of your repository:
used to deploy your functions. It must be included at the root of your repository:
The `gitlab-ci.yml` template creates a `Deploy` stage with a `functions` job that invokes the `tm` CLI with the required parameters.
This `.gitlab-ci.yml` creates a `Deploy` stage with the `functions` job
that invokes some predefined commands to deploy your functions to Knative.
2.`serverless.yml`: this file contains the metadata for your functions,
such as name, runtime, and environment.
2.`serverless.yml`: This file contains the metadata for your functions,
It must be included at the root of your repository.
such as name, runtime, and environment. It must be included at the root of your repository. The following is a sample `echo` function which shows the required structure for the file. You can find the relevant files for this project in the [functions example project](https://gitlab.com/knative-examples/functions).
The following is a sample `echo` function which shows the required structure
for the file.
You can find the relevant files for this project in the [functions example project](https://gitlab.com/knative-examples/functions).
```yaml
```yaml
service:my-functions
service:my-functions
...
@@ -234,32 +235,21 @@ Add the following `.gitlab-ci.yml` to the root of your repository
...
@@ -234,32 +235,21 @@ Add the following `.gitlab-ci.yml` to the root of your repository
(you may skip this step if you've previously cloned the sample [Knative Ruby App](https://gitlab.com/knative-examples/knative-ruby-app) mentioned above):
(you may skip this step if you've previously cloned the sample [Knative Ruby App](https://gitlab.com/knative-examples/knative-ruby-app) mentioned above):