diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 053830a60..2a8006716 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -116,6 +116,18 @@ build-passbook-static: services: - postgres:latest - redis:latest +build-passbook-gatekeeper: + stage: build + image: + name: gcr.io/kaniko-project/executor:debug + entrypoint: [""] + before_script: + - echo "{\"auths\":{\"docker.beryju.org\":{\"auth\":\"$DOCKER_AUTH\"}}}" > /kaniko/.docker/config.json + script: + - /kaniko/executor --context $CI_PROJECT_DIR/gatekeeper --dockerfile $CI_PROJECT_DIR/gatekeeper/Dockerfile --destination docker.beryju.org/passbook/gatekeeper:latest --destination docker.beryju.org/passbook/gatekeeper:0.7.2-beta + only: + - tags + - /^version/.*$/ package-helm: image: debian:stretch-slim diff --git a/gatekeeper/Dockerfile b/gatekeeper/Dockerfile new file mode 100644 index 000000000..ff9e1c10a --- /dev/null +++ b/gatekeeper/Dockerfile @@ -0,0 +1,8 @@ +FROM quay.io/pusher/oauth2_proxy + +COPY templates /templates + +ENV OAUTH2_PROXY_EMAIL_DOMAINS=* +ENV OAUTH2_PROXY_PROVIDER=oidc +ENV OAUTH2_PROXY_CUSTOM_TEMPLATES_DIR=/templates +ENV OAUTH2_PROXY_HTTP_ADDRESS=:4180 diff --git a/gatekeeper/templates/error.html b/gatekeeper/templates/error.html new file mode 100644 index 000000000..1ad82648e --- /dev/null +++ b/gatekeeper/templates/error.html @@ -0,0 +1,18 @@ +{{define "error.html"}} + + + +
+{{.Message}}
+