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
6f7695b4
Commit
6f7695b4
authored
6 years ago
by
André Anjos
Browse files
Options
Downloads
Patches
Plain Diff
Fixes to last commit (closes
#100
)
parent
74dbf09d
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
gitlab/build.sh
+8
-6
8 additions, 6 deletions
gitlab/build.sh
gitlab/functions.sh
+17
-0
17 additions, 0 deletions
gitlab/functions.sh
with
25 additions
and
6 deletions
gitlab/build.sh
+
8
−
6
View file @
6f7695b4
...
...
@@ -21,20 +21,22 @@ BLDOPT="${BLDOPT} --python=${PYTHON_VERSION}"
if
[
-n
"
${
BOB_TEST_ONLY
}
"
]
;
then
tarball
=
$(
${
CONDA_ROOT
}
/bin/conda build
${
BLDOPT
}
--output
conda
)
log_info
=
"Only testing package
${
tarball
}
..."
log_info
"Only testing package
${
tarball
}
..."
set_conda_channels
${
VISIBILITY
}
${
CI_COMMIT_TAG
}
if
[
!
-r
"
${
tarball
}
"
]
;
then
log_info
"Package does not exist locally - checking
remote
channel..."
remote_name
=
${
CONDA_CHANNELS
[0]
}
/
${
OSNAME
}
-64
/
$(
basename
${
tarball
}
)
if
dav
_exists
${
remote_name
}
;
then
log_info
"Package
${
tarball
}
does not exist locally - checking channel
${
CONDA_CHANNELS
[0]
}
..."
remote_name
=
"
${
CONDA_CHANNELS
[0]
}
/
${
OSNAME
}
-64/
$(
basename
${
tarball
}
)
"
if
url
_exists
${
remote_name
}
;
then
log_info
"Conda tarball exists in remote location, downloading..."
run_cmd curl
--silent
--outpu
t
${
tarball
}
${
remote_name
}
url_ge
t
${
tarball
}
${
remote_name
}
else
log_error
"Package
$(
basename
${
tarball
}
)
does not exist at
${
remote_name
}
- aborting..."
exit
1
fi
fi
BLDOPT
=
"
${
BLDOPT
}
--test"
run_cmd
${
CONDA_ROOT
}
/bin/conda build
${
BLDOPT
}
${
tarball
}
else
log_info
=
"Building and testing package..."
log_info
"Building and testing package..."
run_cmd
${
CONDA_ROOT
}
/bin/conda build
${
BLDOPT
}
conda
fi
This diff is collapsed.
Click to expand it.
gitlab/functions.sh
+
17
−
0
View file @
6f7695b4
...
...
@@ -136,6 +136,23 @@ run_cmd() {
}
# Checks if a file exists on the remote location (not protected by password)
# $1: Path to the file to check on the server
url_exists
()
{
run_cmd curl
--output
/dev/null
--silent
--head
--fail
--location
${
DOCSERVER
}
/
${
1
}
return
$?
}
# Gets a file that exists on the remote location (not protected by password)
# $1: Local destination file path (leading directory must exist)
# $2: URL to the file to get on the server (Use url_exists() above to check)
url_get
()
{
run_cmd curl
--silent
--output
"
${
1
}
"
"
${
DOCSERVER
}
/
${
2
}
"
return
$?
}
# Checks if a file exists on the remote location
# $1: Path to the file to check on the server
dav_exists
()
{
...
...
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