Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
bob.admin
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
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
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
bob
bob.admin
Commits
4e93aaa0
Commit
4e93aaa0
authored
8 years ago
by
André Anjos
Browse files
Options
Downloads
Patches
Plain Diff
Allow automatic update of build scripts if necessary
parent
97d9fbb5
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
gitlab/before_deploy.sh
+3
-0
3 additions, 0 deletions
gitlab/before_deploy.sh
gitlab/before_test.sh
+3
-0
3 additions, 0 deletions
gitlab/before_test.sh
gitlab/functions.sh
+1
-3
1 addition, 3 deletions
gitlab/functions.sh
gitlab/install.sh
+16
-3
16 additions, 3 deletions
gitlab/install.sh
with
23 additions
and
6 deletions
gitlab/before_deploy.sh
+
3
−
0
View file @
4e93aaa0
#!/usr/bin/env bash
# Wed 21 Sep 2016 13:08:05 CEST
# Refreshes build scripts if necessary
$(
dirname
${
0
}
)
/install.sh
$(
dirname
${
0
}
)
source
$(
dirname
${
0
}
)
/functions.sh
run_cmd
$(
dirname
${
0
}
)
/before_test.sh
This diff is collapsed.
Click to expand it.
gitlab/before_test.sh
+
3
−
0
View file @
4e93aaa0
#!/usr/bin/env bash
# Wed 21 Sep 2016 13:08:05 CEST
# Refreshes build scripts if necessary
$(
dirname
${
0
}
)
/install.sh
$(
dirname
${
0
}
)
source
$(
dirname
${
0
}
)
/functions.sh
run_cmd
$(
dirname
${
0
}
)
/before_build.sh
...
...
This diff is collapsed.
Click to expand it.
gitlab/functions.sh
+
1
−
3
View file @
4e93aaa0
...
...
@@ -55,8 +55,6 @@ run_cmd() {
if
[
${
status
}
!=
0
]
;
then
log_error
"Command Failed
\"
${
@
}
\"
"
exit
${
status
}
else
log_info
"Finished comand
\"
${
@
}
\"
"
fi
}
...
...
@@ -97,7 +95,7 @@ doc_upload() {
check_pass DOCUSER
check_pass DOCPASS
log_info
"
${
1
}
->
${
DOCSERVER
}
/
${
2
}
, via curl..."
curl
--silent
--user
"
${
DOCUSER
}
:
${
DOCPASS
}
"
--upload-file
${
1
}
${
DOCSERVER
}
/
${
2
}
curl
--location
--silent
--user
"
${
DOCUSER
}
:
${
DOCPASS
}
"
--upload-file
${
1
}
${
DOCSERVER
}
/
${
2
}
local
status
=
$?
if
[
${
status
}
!=
0
]
;
then
log_error
"Curl command finished with an error condition (status=
${
status
}
)"
...
...
This diff is collapsed.
Click to expand it.
gitlab/install.sh
+
16
−
3
View file @
4e93aaa0
...
...
@@ -29,14 +29,26 @@ run_cmd() {
if
[
${
status
}
!=
0
]
;
then
log_error
"Command Failed
\"
${
@
}
\"
"
exit
${
status
}
else
log_info
"Finished comand
\"
${
@
}
\"
"
fi
}
get_script
()
{
run_cmd curl
--silent
--output
${
1
}
/
${
2
}
"https://gitlab.idiap.ch/bob/bob.admin/raw/master/gitlab/
${
2
}
"
local
curlopt
=
"--location --output
${
1
}
/
${
2
}
"
if
[
-e
${
1
}
/
${
2
}
]
;
then
#check for updates
local
checkopt
=
"
${
curlopt
}
--time-cond
${
1
}
/
${
2
}
--silent"
checkopt
=
"
${
checkopt
}
--write-out %{http_code}"
if
[
"
$(
curl
${
checkopt
}
)
"
==
"200"
]
;
then
log_info
"CI script
${
1
}
/
${
2
}
needs updating..."
rm
-f
${
1
}
/
${
2
}
else
log_info
"CI script
${
1
}
/
${
2
}
is up-to-date"
return
0
fi
fi
# check file needs updating
local
url
=
"https://gitlab.idiap.ch/bob/bob.admin/raw/master/gitlab/
${
2
}
"
run_cmd curl
${
curlopt
}
${
url
}
}
...
...
@@ -48,6 +60,7 @@ get_exec() {
run_cmd
mkdir
-pv
${
1
}
get_script
${
1
}
functions.sh
get_script
${
1
}
install.sh
for
stage
in
"build"
"test"
"wheels"
"deploy"
;
do
get_exec
${
1
}
before_
${
stage
}
.sh
get_exec
${
1
}
${
stage
}
.sh
...
...
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