Docker image with faas-cli and Docker in Docker! Useful for CI/CD of OpenFaaS functions.
# .gitlab-ci.yml
stages:
- build
build-and-deploy-function:
stage: build
image: "$DOCKER_REGISTRY_URL/thomas-anderson-bsl/faas-cli-dind:latest"
script:
- faas-cli build --tag=sha
- echo -n "$DOCKER_REGISTRY_PASSWORD" | docker login --username "$DOCKER_REGISTRY_USERNAME" --password-stdin "$DOCKER_REGISTRY_URL"
- faas-cli push --tag=sha
- echo -n "$OPENFAAS_PASSWORD" | faas-cli login --gateway "$OPENFAAS_URL" --username "$OPENFAAS_USERNAME" --password-stdin
- faas-cli deploy --gateway "$OPENFAAS_URL" --tag=sha --send-registry-auth