From 7c7715aa7248fbf12a6cddd3be9ccce1143d1097 Mon Sep 17 00:00:00 2001 From: DJ Mountney Date: Thu, 22 Apr 2021 09:44:41 -0700 Subject: [PATCH 1/2] Update GitLab to the 13.11.0 Minor Feature Release --- Dockerfile | 13 +++++++++++-- build-scripts/build.sh | 2 +- hardening_manifest.yaml | 10 +++++----- scripts/custom-instance-setup | 9 +++++++-- scripts/db-migrate | 6 ++++++ 5 files changed, 30 insertions(+), 10 deletions(-) diff --git a/Dockerfile b/Dockerfile index bf5da23..4ba1d1c 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,8 +1,8 @@ -ARG GITLAB_VERSION=v13.10.3-ubi8 +ARG GITLAB_VERSION=v13.11.0-ubi8 ARG BASE_REGISTRY=nexus-docker-secure.levelup-nexus.svc.cluster.local:18082 ARG BASE_IMAGE=gitlab/gitlab/gitlab-ruby -ARG BASE_TAG=13.10.3 +ARG BASE_TAG=13.11.0 ARG RUBY_IMAGE=${BASE_REGISTRY}/${BASE_IMAGE}:${BASE_TAG} @@ -12,6 +12,15 @@ ARG GITLAB_USER=git ARG GITLAB_DATA=/var/opt/gitlab ARG DNF_OPTS +LABEL source="https://gitlab.com/gitlab-org/build/CNG/-/tree/master/gitlab-rails" \ + name="GitLab Rails" \ + maintainer="GitLab Distribution Team" \ + vendor="GitLab" \ + version=${GITLAB_VERSION} \ + release=${GITLAB_VERSION} \ + summary="Rails container for GitLab." \ + description="Rails container for GitLab." + RUN dnf clean all \ && rm -r /var/cache/dnf \ && dnf ${DNF_OPTS} install -by --nodocs \ diff --git a/build-scripts/build.sh b/build-scripts/build.sh index f441d1e..6828528 100755 --- a/build-scripts/build.sh +++ b/build-scripts/build.sh @@ -4,7 +4,7 @@ set -euxo pipefail -TAG=${1:-13.10.3} +TAG=${1:-13.11.0} REPOSITORY=${2:-} DOCKER_OPTS=${DOCKER_OPTS:-""} diff --git a/hardening_manifest.yaml b/hardening_manifest.yaml index e1c940d..485f4b8 100644 --- a/hardening_manifest.yaml +++ b/hardening_manifest.yaml @@ -5,12 +5,12 @@ name: "gitlab/gitlab/gitlab-rails" # The most specific version should be the first tag and will be shown # on ironbank.dsop.io tags: - - "13.10.3" + - "13.11.0" - "latest" # Build args passed to Dockerfile ARGs args: BASE_IMAGE: "gitlab/gitlab/gitlab-ruby" - BASE_TAG: "13.10.3" + BASE_TAG: "13.11.0" # Docker image labels labels: org.opencontainers.image.title: "Gitlab Rails" @@ -22,7 +22,7 @@ labels: org.opencontainers.image.url: "https://about.gitlab.com/" ## Name of the distributing entity, organization or individual org.opencontainers.image.vendor: "Gitlab" - org.opencontainers.image.version: "13.10.3" + org.opencontainers.image.version: "13.11.0" ## Keywords to help with search (ex. "cicd,gitops,golang") mil.dso.ironbank.image.keywords: "gitlab, git, gitops" ## This value can be "opensource" or "commercial" @@ -43,8 +43,8 @@ maintainers: username: "alfontaine" email: "alan.fontaine@centauricorp.com" resources: - - url: "https://gitlab-ubi.s3.amazonaws.com/ubi8-build-dependencies-v13.10.3-ubi8/gitlab-rails-ee.tar.gz" + - url: "https://gitlab-ubi.s3.amazonaws.com/ubi8-build-dependencies-v13.11.0-ubi8/gitlab-rails-ee.tar.gz" filename: "gitlab-rails-ee.tar.gz" validation: type: "sha256" - value: "61b0183fc485701e214c55b4ae9c454b5ae74bae06281a82c489c318622d4b53" + value: "b5ebb0356688a15429112cd8fb70cadb37174c29024457814523dbfa46be68e0" diff --git a/scripts/custom-instance-setup b/scripts/custom-instance-setup index f1b707e..b4659ec 100755 --- a/scripts/custom-instance-setup +++ b/scripts/custom-instance-setup @@ -10,8 +10,13 @@ setting.update_attribute(:authorized_keys_enabled, false) puts 'Enabling incremental logging of CI jobs.' Feature.enable('ci_enable_live_trace') -puts 'Disabling access to disk storage for GitLab Pages' -Feature.disable('pages_update_legacy_storage') +if ENV['PAGES_UPDATE_LEGACY_STORAGE'] == 'true' + puts 'Enabling access to disk storage for GitLab Pages' + Feature.enable('pages_update_legacy_storage') +else + puts 'Disabling access to disk storage for GitLab Pages' + Feature.disable('pages_update_legacy_storage') +end puts 'Registering OAuth applications.' secrets_dir = ENV['OAUTH_SECRET_DIR'] || '/etc/gitlab/oauth-secrets' diff --git a/scripts/db-migrate b/scripts/db-migrate index b35c7f9..b52d8fa 100755 --- a/scripts/db-migrate +++ b/scripts/db-migrate @@ -8,6 +8,12 @@ if [ -f "${ROOT_PASSWORD_FILE}" ]; then export GITLAB_ROOT_PASSWORD=$(cat "${ROOT_PASSWORD_FILE}") fi +SHARED_RUNNERS_REGISTRATION_TOKEN_FILE="${SHARED_RUNNERS_REGISTRATION_TOKEN_FILE:-/srv/gitlab/config/gitlab_shared_runners_registration_token}" + +if [ -f "${SHARED_RUNNERS_REGISTRATION_TOKEN_FILE}" ] && [ -r "${SHARED_RUNNERS_REGISTRATION_TOKEN_FILE}" ]; then + export GITLAB_SHARED_RUNNERS_REGISTRATION_TOKEN=$(cat "${SHARED_RUNNERS_REGISTRATION_TOKEN_FILE}") +fi + echo "Checking database migrations are up-to-date" # Seed or migrate the database via gitlab:db:configure -- GitLab From 26880cb4124156f63156d077bd6cf8676ccdc157 Mon Sep 17 00:00:00 2001 From: DJ Mountney Date: Thu, 22 Apr 2021 10:26:23 -0700 Subject: [PATCH 2/2] Drop labels from the dockerfile --- Dockerfile | 9 --------- 1 file changed, 9 deletions(-) diff --git a/Dockerfile b/Dockerfile index 4ba1d1c..11b80eb 100644 --- a/Dockerfile +++ b/Dockerfile @@ -12,15 +12,6 @@ ARG GITLAB_USER=git ARG GITLAB_DATA=/var/opt/gitlab ARG DNF_OPTS -LABEL source="https://gitlab.com/gitlab-org/build/CNG/-/tree/master/gitlab-rails" \ - name="GitLab Rails" \ - maintainer="GitLab Distribution Team" \ - vendor="GitLab" \ - version=${GITLAB_VERSION} \ - release=${GITLAB_VERSION} \ - summary="Rails container for GitLab." \ - description="Rails container for GitLab." - RUN dnf clean all \ && rm -r /var/cache/dnf \ && dnf ${DNF_OPTS} install -by --nodocs \ -- GitLab