Loading templates/gitlab-ci-cnb.yml +31 −4 Original line number Diff line number Diff line Loading @@ -217,6 +217,29 @@ stages: fi } function maybe_install_awk() { if ! command -v awk > /dev/null then if command -v apt-get > /dev/null then # Debian apt-get update apt-get install --no-install-recommends --yes --quiet awk elif command -v apk > /dev/null then # Alpine apk add --no-cache gawk elif command -v dnf > /dev/null then # Fedora dnf install -y -q awk else log_error "... didn't find any supported package manager to install awk" exit 1 fi fi } function unscope_variables() { _scoped_vars=$(env | awk -F '=' "/^scoped__[a-zA-Z0-9_]+=/ {print \$1}" | sort) if [[ -z "$_scoped_vars" ]]; then return; fi Loading Loading @@ -409,9 +432,13 @@ stages: fi } function init_workspace() { install_ca_certs "${CUSTOM_CA_CERTS:-$DEFAULT_CA_CERTS}" maybe_install_awk unscope_variables eval_all_secrets configure_registries_auth } # ENDSCRIPT Loading @@ -424,7 +451,7 @@ stages: command: ["--service", "cnb", "4.0.0"] before_script: - !reference [.cnb-scripts] - install_ca_certs "${CUSTOM_CA_CERTS:-$DEFAULT_CA_CERTS}" - init_workspace cnb-build: extends: .cnb-base Loading Loading
templates/gitlab-ci-cnb.yml +31 −4 Original line number Diff line number Diff line Loading @@ -217,6 +217,29 @@ stages: fi } function maybe_install_awk() { if ! command -v awk > /dev/null then if command -v apt-get > /dev/null then # Debian apt-get update apt-get install --no-install-recommends --yes --quiet awk elif command -v apk > /dev/null then # Alpine apk add --no-cache gawk elif command -v dnf > /dev/null then # Fedora dnf install -y -q awk else log_error "... didn't find any supported package manager to install awk" exit 1 fi fi } function unscope_variables() { _scoped_vars=$(env | awk -F '=' "/^scoped__[a-zA-Z0-9_]+=/ {print \$1}" | sort) if [[ -z "$_scoped_vars" ]]; then return; fi Loading Loading @@ -409,9 +432,13 @@ stages: fi } function init_workspace() { install_ca_certs "${CUSTOM_CA_CERTS:-$DEFAULT_CA_CERTS}" maybe_install_awk unscope_variables eval_all_secrets configure_registries_auth } # ENDSCRIPT Loading @@ -424,7 +451,7 @@ stages: command: ["--service", "cnb", "4.0.0"] before_script: - !reference [.cnb-scripts] - install_ca_certs "${CUSTOM_CA_CERTS:-$DEFAULT_CA_CERTS}" - init_workspace cnb-build: extends: .cnb-base Loading