Commit e90c2adc authored by Grzegorz Bizon's avatar Grzegorz Bizon

Build and deploy serverless functions with gitlabktl

parent 7700e029
...@@ -31,11 +31,14 @@ stages: ...@@ -31,11 +31,14 @@ stages:
- echo "$CI_REGISTRY_IMAGE" - echo "$CI_REGISTRY_IMAGE"
- tm -n "$KUBE_NAMESPACE" --config "$KUBECONFIG" deploy service "$CI_PROJECT_NAME" --from-image "$CI_REGISTRY_IMAGE" --wait - tm -n "$KUBE_NAMESPACE" --config "$KUBECONFIG" deploy service "$CI_PROJECT_NAME" --from-image "$CI_REGISTRY_IMAGE" --wait
.serverless:build:functions:
stage: build
environment: development
image: registry.gitlab.com/gitlab-org/gitlabktl:latest
script: /usr/bin/gitlabktl serverless build
.serverless:deploy:functions: .serverless:deploy:functions:
stage: deploy stage: deploy
environment: development environment: development
image: gcr.io/triggermesh/tm:v0.0.9 image: registry.gitlab.com/gitlab-org/gitlabktl:latest
script: script: /usr/bin/gitlabktl serverless deploy
- tm -n "$KUBE_NAMESPACE" set registry-auth gitlab-registry --registry "$CI_REGISTRY" --username "$CI_REGISTRY_USER" --password "$CI_JOB_TOKEN" --push
- tm -n "$KUBE_NAMESPACE" set registry-auth gitlab-registry --registry "$CI_REGISTRY" --username "$CI_DEPLOY_USER" --password "$CI_DEPLOY_PASSWORD" --pull
- tm -n "$KUBE_NAMESPACE" deploy --wait
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment