From 58bc6746bd8a9fda65435747a4f7face0e24e813 Mon Sep 17 00:00:00 2001 From: Achilleas Pipinellis Date: Mon, 30 Sep 2019 02:08:40 +0000 Subject: Do not build gitlab-foss anymore With the single codebase and the symlink hack, there's no reason to pull and build gitlab-foss anymore. This will save us time and money :smile: --- .gitlab-ci.yml | 3 +-- Dockerfile.master | 4 ++-- Rakefile | 2 +- dockerfiles/Dockerfile.builder.onbuild | 1 - dockerfiles/Dockerfile.single | 1 - lib/task_helpers.rb | 4 ++-- nanoc.yaml | 15 +-------------- 7 files changed, 7 insertions(+), 23 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 053fb62a..31fb2098 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -12,7 +12,6 @@ stages: # Pick the remote branch, by default master (see the Rakefile for more info) # variables: - BRANCH_CE: 'master' BRANCH_EE: 'master' BRANCH_OMNIBUS: 'master' BRANCH_RUNNER: 'master' @@ -60,7 +59,7 @@ before_script: # Symlink all README.html to index.html so that we can have clean URLs - for i in `find public -name README.html`; do ln -sf README.html $(dirname $i)/index.html; done # Remove CE dir and symlink EE to CE - - if [ $CI_PIPELINE_SOURCE != 'pipeline' ] && [ -d "public/ce/" ]; then cd public && rm -r ce && ln -s ee ce; fi + - if [ $CI_PIPELINE_SOURCE != 'pipeline' ]; then cd public && rm -rf ce && ln -s ee ce; fi artifacts: paths: - public diff --git a/Dockerfile.master b/Dockerfile.master index 39e72f43..480cd2be 100644 --- a/Dockerfile.master +++ b/Dockerfile.master @@ -21,9 +21,9 @@ RUN bundle exec nanoc compile -VV # Symlink all README.html to index.html RUN for i in `find /source/public/ -name README.html`; do ln -sf README.html $(dirname $i)/index.html; done -# Remove CE dir and symlink EE to CE +# Symlink EE to CE # https://gitlab.com/gitlab-org/gitlab-docs/issues/418 -RUN if [ -d "/source/public/ce/" ]; then cd /source/public/ && rm -r ce && ln -s ee ce; fi +RUN cd /source/public/ && rm -rf ce && ln -s ee ce # Remove tmp dir to save some space RUN rm -rf /source/tmp diff --git a/Rakefile b/Rakefile index e04d992d..af8832f9 100644 --- a/Rakefile +++ b/Rakefile @@ -10,7 +10,7 @@ task :setup_git do `git config --global user.email johndoe@example.com` end -desc 'Setup repositories for CE, EE, Omnibus and Runner in special way exposing only their doc directories' +desc 'Setup repositories for EE, Omnibus, and Runner in special way exposing only their doc directories' task :setup_repos do products.each_value do |product| branch = retrieve_branch(product['slug']) diff --git a/dockerfiles/Dockerfile.builder.onbuild b/dockerfiles/Dockerfile.builder.onbuild index 418d4c29..2c5c4fd1 100644 --- a/dockerfiles/Dockerfile.builder.onbuild +++ b/dockerfiles/Dockerfile.builder.onbuild @@ -6,7 +6,6 @@ ONBUILD ARG VER ONBUILD ARG NANOC_ENV ONBUILD ARG CI_COMMIT_REF_NAME ONBUILD ARG BRANCH_EE -ONBUILD ARG BRANCH_CE ONBUILD ARG BRANCH_OMNIBUS ONBUILD ARG BRANCH_RUNNER diff --git a/dockerfiles/Dockerfile.single b/dockerfiles/Dockerfile.single index a30cb445..d55ea11d 100644 --- a/dockerfiles/Dockerfile.single +++ b/dockerfiles/Dockerfile.single @@ -7,7 +7,6 @@ ARG VER=X.Y # Replace the versions to march the stable branches of the upstream projects ARG BRANCH_EE=X-Y-stable-ee -ARG BRANCH_CE=X-Y-stable ARG BRANCH_OMNIBUS=X-Y-stable ARG BRANCH_RUNNER=X-Y-stable ARG BRANCH_CHARTS=W-Z-stable diff --git a/lib/task_helpers.rb b/lib/task_helpers.rb index 243d39a9..0cd13591 100644 --- a/lib/task_helpers.rb +++ b/lib/task_helpers.rb @@ -1,6 +1,6 @@ require 'yaml' -PRODUCTS = %W[ce ee omnibus runner charts].freeze +PRODUCTS = %W[ee omnibus runner charts].freeze VERSION_FORMAT = /^(?\d{1,2})\.(?\d{1,2})$/ def config @@ -28,7 +28,7 @@ def retrieve_branch(slug) # EE has different branch name scheme when 'ee' "#{version[:major]}-#{version[:minor]}-stable-ee" - when 'ce', 'omnibus', 'runner' + when 'omnibus', 'runner' "#{version[:major]}-#{version[:minor]}-stable" # Charts don't use the same version scheme as GitLab, we need to # deduct their version from the GitLab equivalent one. diff --git a/nanoc.yaml b/nanoc.yaml index c8ec5dcd..136eb385 100644 --- a/nanoc.yaml +++ b/nanoc.yaml @@ -127,26 +127,13 @@ breadcrumbs: true debug: false products: - ce: - full_name: 'GitLab FOSS' - short_name: 'GitLab FOSS' - slug: 'ce' - index_file: 'README.*' - img: '/assets/images/docs-gitlab.svg' - description: 'Browse user and administration documentation and guides for GitLab Community Edition.' - repo: 'https://gitlab.com/gitlab-org/gitlab-foss.git' - dirs: - temp_dir: 'tmp/ce/' - dest_dir: 'content/ce' - doc_dir: 'doc' - expose: false ee: full_name: 'GitLab' short_name: 'GitLab' slug: 'ee' index_file: 'README.*' img: '/assets/images/docs-gitlab.svg' - description: 'Usage and administration of GitLab Community Edition (CE), Enterprise Edition (EE), and GitLab.com.' + description: 'Usage and administration of GitLab self-managed and GitLab.com.' repo: 'https://gitlab.com/gitlab-org/gitlab.git' dirs: temp_dir: 'tmp/ee/' -- cgit v1.2.3