Commit b228ae5c authored by gitlab update bot's avatar gitlab update bot
Browse files

Update to version 14.0.0

parent d33f23ab
Pipeline #7735 passed with stage
in 54 seconds
FROM ubuntu:20.04
MAINTAINER GitLab Inc. <support@gitlab.com>
SHELL ["/bin/sh", "-c"],
SHELL ["/bin/sh", "-c"]
# Default to supporting utf-8
ENV LANG=C.UTF-8
......@@ -9,15 +9,23 @@ ENV LANG=C.UTF-8
# Install required packages
RUN apt-get update -q \
&& DEBIAN_FRONTEND=noninteractive apt-get install -yq --no-install-recommends \
busybox \
ca-certificates \
openssh-server \
wget \
vim \
tzdata \
nano \
less \
wget \
&& rm -rf /var/lib/apt/lists/*
# Use BusyBox
ENV EDITOR /bin/vi
RUN busybox --install \
&& { \
echo '#!/bin/sh'; \
echo '/bin/vi "$@"'; \
} > /usr/local/bin/busybox-editor \
&& chmod +x /usr/local/bin/busybox-editor \
&& update-alternatives --install /usr/bin/editor editor /usr/local/bin/busybox-editor 1
# Remove MOTD
RUN rm -rf /etc/update-motd.d /etc/motd /etc/motd.dynamic
RUN ln -fs /dev/null /run/motd.dynamic
......
......@@ -44,6 +44,38 @@ function detect_unclean_start() {
set -e
}
# Make sure that there is no unmigrated data to hashed storage.
function unmigrated_data_check() {
set +e
echo "Checking for unmigrated data on legacy storage"
found=$(MAX_DATABASE_CONNECTION_CHECKS=5 gitlab-rake gitlab:storage:legacy_attachments gitlab:storage:legacy_projects 2>&1);
if [ $? -ne 0 ]; then
echo "Upgrade failed. Could not check for unmigrated data on legacy storage."
echo ""
echo $output
echo ""
echo ""
echo "If you would like to restart the instance without perfming this check"
echo "check, add the following to your docker command:"
echo "-e GITLAB_SKIP_UNMIGRATED_DATA_CHECK=true"
echo ""
exit 1
fi
if ! (echo $found | grep 'Found 0 attachments' && echo $found | grep 'Found 0 projects') > /dev/null 2>&1; then
echo
echo "Legacy storage is no longer supported. Please migrate your data to hashed storage."
echo "Check https://docs.gitlab.com/ee/administration/raketasks/storage.html#migrate-to-hashed-storage for details."
echo ""
echo "Upgrade failed. Retry the upgrade after migrating your data to hashed storage."
exit 1
fi
set -e
}
trap "sigterm_handler; exit" TERM
source /RELEASE
......@@ -58,7 +90,7 @@ echo "Configure GitLab for your system by editing /etc/gitlab/gitlab.rb file"
echo "And restart this container to reload settings."
echo "To do it use docker exec:"
echo
echo " docker exec -it gitlab vim /etc/gitlab/gitlab.rb"
echo " docker exec -it gitlab editor /etc/gitlab/gitlab.rb"
echo " docker restart gitlab"
echo
echo "For a comprehensive list of configuration options please see the Omnibus GitLab readme"
......@@ -78,8 +110,9 @@ detect_unclean_start
# If the VERSION file doesn't exist, then this is not an upgrade
if old_version=$(cat /var/opt/gitlab/gitlab-rails/VERSION)
then
GITLAB_UPGRADE='true'
new_version=$(awk '/^gitlab-(ce|ee|jh)/ {print $NF}' /opt/gitlab/version-manifest.txt)
MIN_VERSION="13.0" gitlab-ctl upgrade-check "${old_version}" "${new_version}"
MIN_VERSION="13.12" gitlab-ctl upgrade-check "${old_version}" "${new_version}"
fi
# Copy gitlab.rb for the first time
......@@ -122,6 +155,21 @@ GITLAB_OMNIBUS_CONFIG= /opt/gitlab/embedded/bin/runsvdir-start &
echo "Configuring GitLab..."
gitlab-ctl reconfigure
# Skip unmigrated data check if Puma and Sidekiq is not running
if [ ! -d /opt/gitlab/service/puma ] && [ ! -d /opt/gitlab/service/sidekiq ]; then
echo
echo "This node does not appear to be running puma and/or sidekiq services"
echo "Skipping unmigrated data check, if you think this is an error exit now"
echo
GITLAB_SKIP_UNMIGRATED_DATA_CHECK='true'
fi
# Check if there are no unmigrated data to hashed storage if it is an upgrade
if [ "${GITLAB_UPGRADE}" == 'true' -a "${GITLAB_SKIP_UNMIGRATED_DATA_CHECK}" != 'true' ]; then
unmigrated_data_check
fi
# This must be false when the opt-in PostgreSQL version is the default for pg-upgrade,
# otherwise it must be true.
ATTEMPT_AUTO_PG_UPGRADE='true'
......
Supports Markdown
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