Skip to content
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

Pages update #3024

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
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
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -1594,6 +1594,14 @@ Client Secret from earlier generated OAuth application

Redirect URI, non existing pages domain to redirect to pages daemon, `https://projects.example.io/auth`

##### `GITLAB_PAGES_NAMESPACE_IN_PATH`

Enable namespace-in-path option for gitlab pages, defaults to `false`.

##### `GITLAB_PAGES_LOG_VERBOSE`

Enable verbose logging for gitlab pages, defaults to `falsee`.

##### `GITLAB_HTTPS`

Set to `true` to enable https support, disabled by default.
Expand Down
4 changes: 3 additions & 1 deletion assets/runtime/config/gitlab-pages/config
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,7 @@ auth-redirect-uri={{GITLAB_PAGES_ACCESS_REDIRECT_URI}}
auth-secret={{GITLAB_PAGES_ACCESS_SECRET}}
gitlab-server={{GITLAB_PAGES_ACCESS_CONTROL_SERVER}}
artifacts-server={{GITLAB_PAGES_ARTIFACTS_SERVER_URL}}
internal-gitlab-server=http://localhost:8181
internal-gitlab-server=http://127.0.0.1:8080{{GITLAB_RELATIVE_URL_ROOT}}
api-secret-key={{GITLAB_INSTALL_DIR}}/.gitlab_pages_secret
log-verbose={{GITLAB_PAGES_LOG_VERBOSE}}
namespace-in-path={{GITLAB_PAGES_NAMESPACE_IN_PATH}}
1 change: 1 addition & 0 deletions assets/runtime/config/gitlabhq/gitlab.yml
Original file line number Diff line number Diff line change
Expand Up @@ -410,6 +410,7 @@ production: &base
artifacts_server: {{GITLAB_PAGES_ARTIFACTS_SERVER}} # Set to false if you want to disable online view of HTML artifacts
external_http: {{GITLAB_PAGES_EXTERNAL_HTTP}} # If defined, enables custom domain support in GitLab Pages
external_https: {{GITLAB_PAGES_EXTERNAL_HTTPS}} # If defined, enables custom domain and certificate support in GitLab Pages
namespace_in_path: {{GITLAB_PAGES_NAMESPACE_IN_PATH}}

# File that contains the shared secret key for verifying access for gitlab-pages.
# Default is '.gitlab_pages_secret' relative to Rails.root (i.e. root of the GitLab app).
Expand Down
2 changes: 2 additions & 0 deletions assets/runtime/env-defaults
Original file line number Diff line number Diff line change
Expand Up @@ -617,6 +617,8 @@ GITLAB_PAGES_ACCESS_CLIENT_ID=${GITLAB_PAGES_ACCESS_CLIENT_ID:-}
GITLAB_PAGES_ACCESS_CLIENT_SECRET=${GITLAB_PAGES_ACCESS_CLIENT_SECRET:-}
GITLAB_PAGES_ACCESS_REDIRECT_URI=${GITLAB_PAGES_ACCESS_REDIRECT_URI:-}
GITLAB_PAGES_NGINX_PROXY=${GITLAB_PAGES_NGINX_PROXY:-true}
GITLAB_PAGES_NAMESPACE_IN_PATH=${GITLAB_PAGES_NAMESPACE_IN_PATH:-false}
GITLAB_PAGES_LOG_VERBOSE=${GITLAB_PAGES_LOG_VERBOSE:-false}

## Gitaly
GITALY_CLIENT_PATH=${GITALY_CLIENT_PATH:-$GITLAB_GITALY_INSTALL_DIR}
Expand Down
5 changes: 5 additions & 0 deletions assets/runtime/functions
Original file line number Diff line number Diff line change
Expand Up @@ -2153,6 +2153,8 @@ if [[ ${GITLAB_PAGES_ACCESS_CONTROL} == true ]]; then
GITLAB_PAGES_ACCESS_REDIRECT_URI \
GITLAB_PAGES_ACCESS_SECRET \
GITLAB_PAGES_ACCESS_CONTROL_SERVER \
GITLAB_PAGES_NAMESPACE_IN_PATH \
GITLAB_PAGES_LOG_VERBOSE \
GITLAB_INSTALL_DIR

if [[ -n ${GITLAB_PAGES_ARTIFACTS_SERVER_URL} ]]; then
Expand All @@ -2162,6 +2164,9 @@ if [[ ${GITLAB_PAGES_ACCESS_CONTROL} == true ]]; then
fi
else
update_template ${GITLAB_PAGES_CONFIG} \
GITLAB_RELATIVE_URL_ROOT \
GITLAB_PAGES_NAMESPACE_IN_PATH \
GITLAB_PAGES_LOG_VERBOSE \
GITLAB_INSTALL_DIR

exec_as_git sed -i "/{{GITLAB_PAGES_ACCESS_CLIENT_ID}}/d" ${GITLAB_PAGES_CONFIG}
Expand Down