Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
G
GitLab Drupal CI
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Monitor
Service Desk
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Docker
GitLab Drupal CI
Commits
6c79bca9
Commit
6c79bca9
authored
2 years ago
by
jurgenhaas
Browse files
Options
Downloads
Patches
Plain Diff
gitlab-ci-cd/drupal#28
Bug fixes
parent
69a50936
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!6
Merging develop into main
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
bin/merge
+7
-3
7 additions, 3 deletions
bin/merge
with
7 additions
and
3 deletions
bin/merge
+
7
−
3
View file @
6c79bca9
#!/bin/bash
function
gitlab
()
{
EXPECTED
=
$1
METHOD
=
$2
REQUEST
=
$3
shift
3
echo
" sending request ..."
output
=
"
$(
curl
--write-out
"
\n
HTTP-Code:%{http_code}"
-X
"
$
2
"
-s
-H
"Private-Token:
${
GITLAB_PRIVATE_TOKEN
}
"
"
${
GITLAB_URL
}
"
/api/v4/
"
$
3
"
"
$@
"
)
"
output
=
"
$(
curl
--write-out
"
\n
HTTP-Code:%{http_code}"
-X
"
$
METHOD
"
-s
-H
"Private-Token:
${
GITLAB_PRIVATE_TOKEN
}
"
"
${
GITLAB_URL
}
"
/api/v4/
"
$
REQUEST
"
"
$@
"
)
"
echo
" done"
result
=
"
$(
echo
"
$output
"
|
grep
"{"
)
"
code
=
"
$(
echo
"
$output
"
|
grep
-m
1
"HTTP-Code:"
|
cut
-d
:
-f2
)
"
if
[[
$code
-eq
$
1
]]
;
then
if
[[
$code
-eq
$
EXPECTED
]]
;
then
return
fi
echo
"
$
2
request to
$
3
did not succeed! Responds with code
$code
instead of
$
1
"
echo
"
$
METHOD
request to
$
REQUEST
did not succeed! Responds with code
$code
instead of
$
EXPECTED
"
exit
99
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment