diff --git a/Dockerfile b/Dockerfile index edafb46239492ed8744bf657f355a9e6eb0a3513..185d364f8bb7a5b72148b4ac6a0ec7aecd4b8a96 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -ARG GITLAB_VERSION=v14.1.2-ubi8 +ARG GITLAB_VERSION=v14.2.0-ubi8 ARG BASE_REGISTRY=nexus-docker-secure.levelup-nexus.svc.cluster.local:18082 ARG BASE_IMAGE=redhat/ubi/ubi8 diff --git a/README.md b/README.md index 0bf1e9c00d1521e0f92c2bb7fd4bbe520f0c8c9a..d7ed0be5f2c76d89c9a97769df335c71fac425f5 100644 --- a/README.md +++ b/README.md @@ -28,5 +28,5 @@ Some of the GitLab containers are build on top of previous containers, building * gitaly - Phase 4 * gitlab-sidekiq - * gitlab-task-runner + * gitlab-toolbox * gitlab-webservice diff --git a/build-scripts/build.sh b/build-scripts/build.sh index 7af2eafc41ed2e255e70f3e2bff0680b9b1c46c7..5e50aec8ca7f3bd7d30f1675647413e8cf6a4354 100755 --- a/build-scripts/build.sh +++ b/build-scripts/build.sh @@ -4,7 +4,7 @@ set -euxo pipefail -TAG=${1:-14.1.2} +TAG=${1:-14.2.0} REPOSITORY=${2:-} DOCKER_OPTS=${DOCKER_OPTS:-""} diff --git a/hardening_manifest.yaml b/hardening_manifest.yaml index f4d454fbee503a958be9eacb203e99de5dd6c032..102f24102aff9e645b637f10a563e00a9daf4317 100644 --- a/hardening_manifest.yaml +++ b/hardening_manifest.yaml @@ -5,7 +5,7 @@ name: "gitlab/gitlab/gitlab-ruby" # The most specific version should be the first tag and will be shown # on ironbank.dsop.io tags: - - "14.1.2" + - "14.2.0" - "latest" # Build args passed to Dockerfile ARGs args: @@ -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: "14.1.2" + org.opencontainers.image.version: "14.2.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-v14.1.2-ubi8/gitlab-ruby.tar.gz" + - url: "https://gitlab-ubi.s3.amazonaws.com/ubi8-build-dependencies-v14.2.0-ubi8/gitlab-ruby.tar.gz" filename: "gitlab-ruby.tar.gz" validation: type: "sha256" - value: "029746fba5789266d84bccce7cccc60e689d8106034e0b209599df7e73426340" + value: "20058687f2e64f4fab53806017b2677e11c24713453aa55e0303e58bb3abf4a0" diff --git a/scripts/set-config b/scripts/set-config index f53bcc52da5d1ba64af280c1700ad4ab6043a6db..7326429b5b53e686d4819c7285ae83d46b156c6b 100755 --- a/scripts/set-config +++ b/scripts/set-config @@ -1,32 +1,41 @@ -#!/usr/bin/env ruby +#!/bin/bash -require 'erb' -require 'fileutils' -require 'yaml' -require 'json' +set -eo pipefail -template_directory = ARGV.shift -config_directory = ARGV.shift || template_directory +TEMPLATE_DIRECTORY="$1" +CONFIG_DIRECTORY="${2:-$1}" -unless template_directory - puts 'usage: set-config []' +if [ -z "$TEMPLATE_DIRECTORY" ]; then + echo 'usage: set-config []' exit 1 -end +fi -puts "Begin parsing .erb files from #{template_directory}" +shopt -s nullglob # Don't enter empty for loops -Dir.glob(File.join(template_directory, '*.erb')).each do |file| - output_file = File.join(config_directory, File.basename(file, '.erb')) - puts "Writing #{output_file}" - template = ERB.new(File.read(file)) - File.write(output_file, template.result) -end +if command -v erb &> /dev/null; then + echo "Begin parsing .erb templates from $TEMPLATE_DIRECTORY" + for template in ${TEMPLATE_DIRECTORY}/*.erb; do + output_file="${CONFIG_DIRECTORY}/$(basename $template '.erb')" + echo "Writing $output_file" + erb -U -r yaml -r json -r fileutils "$template" > "$output_file" + done +fi -if config_directory != template_directory - puts "Copying other config files found in #{template_directory}" +if command -v gomplate &> /dev/null; then + echo "Begin parsing .tpl templates from $TEMPLATE_DIRECTORY" + for template in ${TEMPLATE_DIRECTORY}/*.tpl; do + output_file="${CONFIG_DIRECTORY}/$(basename $template '.tpl')" + echo "Writing $output_file" + gomplate --file "$template" --out "$output_file" + done +fi - Dir.glob(File.join(template_directory, '*.{yml,yaml,toml,rb,json}')).each do |file| - puts "Copying #{File.basename(file)} into #{config_directory}" - FileUtils.cp(file, config_directory) - end -end +if [ "$CONFIG_DIRECTORY" != "$TEMPLATE_DIRECTORY" ]; then + echo "Copying other config files found in $TEMPLATE_DIRECTORY to $CONFIG_DIRECTORY" + for configfile in ${TEMPLATE_DIRECTORY}/*.{yml,yaml,toml,rb,json}; do + echo "Copying $(basename $configfile) into ${CONFIG_DIRECTORY}" + cp "$configfile" "$CONFIG_DIRECTORY/" + done +fi + +shopt -u nullglob