Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
TDT4240 Tank Wars
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
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
Snorre Skjellestad Kristiansen
TDT4240 Tank Wars
Commits
8b5232a9
Verified
Commit
8b5232a9
authored
1 year ago
by
Fredrik Fonn Hansen
Browse files
Options
Downloads
Patches
Plain Diff
ci enable periodic heartbeat
parent
6035c1ef
No related branches found
Branches containing commit
No related tags found
1 merge request
!67
ci enable periodic heartbeat
Pipeline
#215697
passed with stages
in 2 minutes and 24 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
.gitlab-ci.yml
+8
-7
8 additions, 7 deletions
.gitlab-ci.yml
with
8 additions
and
7 deletions
.gitlab-ci.yml
+
8
−
7
View file @
8b5232a9
...
...
@@ -121,15 +121,16 @@ VM Heartbeat:
-
|
for i in {1..18}; do
sleep 10
response=$(curl --silent --write-out "%{http_code}\n" --output /dev/null --connect-timeout 5 --max-time 10 http://10.212.26.72/server/heartbeat)
echo "Response: $response"
if [ "$response" -eq 200 ]; then
echo "Server is alive"
response_code=$(curl --silent --write-out "%{http_code}\n" --output response.txt --connect-timeout 5 --max-time 10 http://10.212.26.72/server/heartbeat)
response_body=$(cat response.txt)
echo "Response code: $response_code"
echo "Response body: $response_body"
if [ "$response_code" -eq 200 ]; then
exit 0
fi
done
echo "Server did not respond with 200 OK after 3 minutes"
exit 1
only
:
refs
:
-
main
\ No newline at end of file
rules
:
-
if
:
'
$CI_COMMIT_BRANCH
==
"main"'
-
if
:
'
$CI_PIPELINE_SOURCE
==
"schedule"
&&
$RUN_VM_HEARTBEAT
==
"true"'
\ No newline at end of file
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