summaryrefslogtreecommitdiff
path: root/scripts/utils.sh
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2022-11-16 03:11:39 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2022-11-16 03:11:39 +0000
commit37d1a6b416a10e64ba9194aacf7da97a5e30140f (patch)
tree54494e4ddcc6e128e2a0e11dc874cced46308918 /scripts/utils.sh
parent21fc10ad5a7c829e64112fac37727f31f072ef33 (diff)
downloadgitlab-ce-37d1a6b416a10e64ba9194aacf7da97a5e30140f.tar.gz
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'scripts/utils.sh')
-rw-r--r--scripts/utils.sh17
1 files changed, 1 insertions, 16 deletions
diff --git a/scripts/utils.sh b/scripts/utils.sh
index 378f492a8bf..50ca7f558f6 100644
--- a/scripts/utils.sh
+++ b/scripts/utils.sh
@@ -15,11 +15,9 @@ function retry() {
function test_url() {
local url="${1}"
- local curl_args="${2}"
local status
- local cmd="curl ${curl_args} --output /dev/null -L -s -w ''%{http_code}'' \"${url}\""
- status=$(eval "${cmd}")
+ status=$(curl --output /dev/null -L -s -w ''%{http_code}'' "${url}")
if [[ $status == "200" ]]; then
return 0
@@ -205,16 +203,3 @@ function danger_as_local() {
# We need to base SHA to help danger determine the base commit for this shallow clone.
bundle exec danger dry_run --fail-on-errors=true --verbose --base="${CI_MERGE_REQUEST_DIFF_BASE_SHA}" --head="${CI_MERGE_REQUEST_SOURCE_BRANCH_SHA:-$CI_COMMIT_SHA}" --dangerfile="${DANGER_DANGERFILE:-Dangerfile}"
}
-
-# We're inlining this function in `.gitlab/ci/package-and-test/main.gitlab-ci.yml` since this file can be included in other projects.
-function assets_image_tag() {
- local cache_assets_hash_file="cached-assets-hash.txt"
-
- if [[ -n "${CI_COMMIT_TAG}" ]]; then
- echo -n "${CI_COMMIT_REF_NAME}"
- elif [[ -f "${cache_assets_hash_file}" ]]; then
- echo -n "assets-hash-$(cat ${cache_assets_hash_file} | cut -c1-10)"
- else
- echo -n "${CI_COMMIT_SHA}"
- fi
-}