diff --git a/Dockerfile b/Dockerfile index 6b1896cbaba37dcf3376176bfa35ba3bb9fb5587..280899da2d48478724809d2b3c0e982f7651f5c1 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,8 +1,8 @@ -ARG GITLAB_VERSION=v13.11.2-ubi8 +ARG GITLAB_VERSION=v14.0.0-ubi8 ARG BASE_REGISTRY=nexus-docker-secure.levelup-nexus.svc.cluster.local:18082 ARG BASE_IMAGE=gitlab/gitlab/gitlab-rails -ARG BASE_TAG=13.11.2 +ARG BASE_TAG=14.0.0 ARG RAILS_IMAGE=${BASE_REGISTRY}/${BASE_IMAGE}:${BASE_TAG} diff --git a/build-scripts/build.sh b/build-scripts/build.sh index 0340b99e1dedc7ad1a15101029ba2127e68d40e2..4f06d6a0095760350c69246eef9b557ef1f8c1ad 100755 --- a/build-scripts/build.sh +++ b/build-scripts/build.sh @@ -4,7 +4,7 @@ set -euxo pipefail -TAG=${1:-13.11.2} +TAG=${1:-14.0.0} REPOSITORY=${2:-} DOCKER_OPTS=${DOCKER_OPTS:-""} diff --git a/hardening_manifest.yaml b/hardening_manifest.yaml index e69037cce84d905219d54a994fbf312c01c8dd94..1a1f4c6240e35d1c5d52e058d0e428880af07840 100644 --- a/hardening_manifest.yaml +++ b/hardening_manifest.yaml @@ -5,12 +5,12 @@ name: "gitlab/gitlab/gitlab-sidekiq" # The most specific version should be the first tag and will be shown # on ironbank.dsop.io tags: - - "13.11.2" + - "14.0.0" - "latest" # Build args passed to Dockerfile ARGs args: BASE_IMAGE: "gitlab/gitlab/gitlab-rails" - BASE_TAG: "13.11.2" + BASE_TAG: "14.0.0" # Docker image labels labels: org.opencontainers.image.title: "Gitlab Sidekiq" @@ -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.11.2" + org.opencontainers.image.version: "14.0.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,18 +43,18 @@ maintainers: username: "alfontaine" email: "alan.fontaine@centauricorp.com" resources: - - url: "https://gitlab-ubi.s3.amazonaws.com/ubi8-build-dependencies-v13.11.2-ubi8/gitlab-sidekiq-ee.tar.gz" + - url: "https://gitlab-ubi.s3.amazonaws.com/ubi8-build-dependencies-v14.0.0-ubi8/gitlab-sidekiq-ee.tar.gz" filename: "gitlab-sidekiq-ee.tar.gz" validation: type: "sha256" - value: "504e1c847db6915816b2d8d1c455b71113213932334464d4424ba93e60ea411d" - - url: "https://gitlab-ubi.s3.amazonaws.com/ubi8-build-dependencies-v13.11.2-ubi8/gitlab-python.tar.gz" + value: "dcc5f541e57a4de67d67e2193e4eeab702ddca147d9d998f758b6793a3d88e23" + - url: "https://gitlab-ubi.s3.amazonaws.com/ubi8-build-dependencies-v14.0.0-ubi8/gitlab-python.tar.gz" filename: "gitlab-python.tar.gz" validation: type: "sha256" - value: "1199b25cd6f32816c584e2dd275556e0e98f0612bdd51a55b18091328ea3f66b" - - url: "https://gitlab-ubi.s3.amazonaws.com/ubi8-build-dependencies-v13.11.2-ubi8/gitlab-logger.tar.gz" + value: "48068e0e17bb7f3083861f050cad709115360c072e89cce31566def73760c723" + - url: "https://gitlab-ubi.s3.amazonaws.com/ubi8-build-dependencies-v14.0.0-ubi8/gitlab-logger.tar.gz" filename: "gitlab-logger.tar.gz" validation: type: "sha256" - value: "f24ec8e10c112ef3e7b1de6f55f642c3e63171d1f3f9fd24cb0b7f1bad0a7a1b" + value: "6b25556f20a8639a7fae19d3737089f9b9f9c74fbc35562f8a9ca85dde307c69" diff --git a/scripts/process-wrapper b/scripts/process-wrapper index ae1941afcf8466621c3f3653246c861ecce77ce5..eb6aab682fac7e332d20537afa1f502af6c2a83a 100755 --- a/scripts/process-wrapper +++ b/scripts/process-wrapper @@ -14,54 +14,44 @@ else fi fi -if [[ "${SIDEKIQ_CLUSTER^^}" = 'TRUE' ]]; then - if [ -n "${SIDEKIQ_NEGATE_QUEUES}" ]; then - queues="${SIDEKIQ_NEGATE_QUEUES}" - negate_flag='--negate' - else - queues="${SIDEKIQ_QUEUES:-*}" - negate_flag='' - fi - - # Remove experimental part in https://gitlab.com/gitlab-com/gl-infra/scalability/-/issues/646 - if [[ "${SIDEKIQ_QUEUE_SELECTOR}" = 'true' || "${SIDEKIQ_EXPERIMENTAL_QUEUE_SELECTOR}" = 'true' ]]; then - queue_selector_flag='--queue-selector' - else - queue_selector_flag='' - fi +if [ -n "${SIDEKIQ_NEGATE_QUEUES}" ]; then + queues="${SIDEKIQ_NEGATE_QUEUES}" + negate_flag='--negate' +else + queues="${SIDEKIQ_QUEUES:-*}" + negate_flag='' +fi - # sidekiq-cluster offers two things: - # - # 1. The ability to run and supervise multiple Sidekiq processes, - # potentially listening to different queues. - # 2. Enhanced queue pre-processing, including the ability to negate - # a set of queues and the experimental query selector. - # - # In this case, we do not want to start multiple Sidekiq processes - # inside a single pod - for that, we'd run additional pods. As we - # only need the second item, we use the `--dryrun` option to - # sidekiq-cluster to get the command line it would execute, and then - # execute that command directly. - # - # See https://gitlab.com/gitlab-org/build/CNG/-/merge_requests/418#note_320550297 - # - /srv/gitlab/bin/$( - /srv/gitlab/bin/sidekiq-cluster \ - --dryrun \ - -r /srv/gitlab \ - -e production \ - --min-concurrency ${SIDEKIQ_CONCURRENCY_MIN:-$SIDEKIQ_CONCURRENCY} \ - --max-concurrency ${SIDEKIQ_CONCURRENCY_MAX:-$SIDEKIQ_CONCURRENCY} \ - -t $SIDEKIQ_TIMEOUT \ - $queue_selector_flag \ - $negate_flag \ - "${queues}" - ) +if [[ "${SIDEKIQ_QUEUE_SELECTOR}" = 'true' ]]; then + queue_selector_flag='--queue-selector' else - /srv/gitlab/bin/bundle exec sidekiq \ - -r /srv/gitlab \ - -e production \ - -c $SIDEKIQ_CONCURRENCY \ - -t $SIDEKIQ_TIMEOUT \ - -C /srv/gitlab/config/sidekiq_queues.yml + queue_selector_flag='' fi + +# sidekiq-cluster offers two things: +# +# 1. The ability to run and supervise multiple Sidekiq processes, +# potentially listening to different queues. +# 2. Enhanced queue pre-processing, including the ability to negate +# a set of queues and the experimental query selector. +# +# In this case, we do not want to start multiple Sidekiq processes +# inside a single pod - for that, we'd run additional pods. As we +# only need the second item, we use the `--dryrun` option to +# sidekiq-cluster to get the command line it would execute, and then +# execute that command directly. +# +# See https://gitlab.com/gitlab-org/build/CNG/-/merge_requests/418#note_320550297 +# +/srv/gitlab/bin/$( + /srv/gitlab/bin/sidekiq-cluster \ + --dryrun \ + -r /srv/gitlab \ + -e production \ + --min-concurrency ${SIDEKIQ_CONCURRENCY_MIN:-$SIDEKIQ_CONCURRENCY} \ + --max-concurrency ${SIDEKIQ_CONCURRENCY_MAX:-$SIDEKIQ_CONCURRENCY} \ + -t $SIDEKIQ_TIMEOUT \ + $queue_selector_flag \ + $negate_flag \ + "${queues}" + )