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
969b34f6
Commit
969b34f6
authored
7 years ago
by
Amir MOHAMMADI
Browse files
Options
Downloads
Patches
Plain Diff
merge cache with new installation
parent
f4317f05
No related branches found
Branches containing commit
No related tags found
1 merge request
!63
Conda package based CI
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
gitlab/functions.sh
+18
-9
18 additions, 9 deletions
gitlab/functions.sh
with
18 additions
and
9 deletions
gitlab/functions.sh
+
18
−
9
View file @
969b34f6
...
...
@@ -265,7 +265,7 @@ fi
# installs a miniconda installation.
# $1: Path to where to install miniconda.
The path should not exist.
# $1: Path to where to install miniconda.
install_miniconda
()
{
log_info
"Installing miniconda in
${
1
}
..."
...
...
@@ -285,20 +285,29 @@ install_miniconda() {
ls
-l
miniconda.sh
fi
# Check if cache exists and save urls.txt to create a valid cache after conda
# installation override
_urls
=
"
${
1
}
/pkgs/urls.txt"
if
[
-e
${
_urls
}
]
;
then
run_cmd
cp
${
_urls
}
${
_urls
}
.cached
# move cache to a different folder if it exists
if
[
-e
${
1
}
]
;
then
run_cmd
mv
${
1
}
${
1
}
.cached
fi
# # Save urls.txt to create a valid cache after conda
# # installation override
# if [ -e ${_urls} ]; then
# run_cmd cp ${_urls} ${_urls}.cached
# fi
# install miniconda
bash miniconda.sh
-b
-p
${
1
}
# Reset urls.txt
if
[
-e
${
_urls
}
.cached
]
;
then
# Put back cache and merge urls.txt
if
[
-e
${
1
}
.cached
]
;
then
run_cmd
mv
-n
${
1
}
.cached/pkgs/
*
.tar.bz2
${
1
}
/pkgs/
fi
_cached_urls
=
"
${
1
}
.cached/pkgs/urls.txt"
_urls
=
"
${
1
}
/pkgs/urls.txt"
if
[
-e
${
_cached_urls
}
]
;
then
log_info
"Merging urls.txt files with cached values..."
cat
${
_urls
}
${
_
urls
}
.
cached |
sort
|
uniq
>
${
_urls
}
cat
${
_urls
}
${
_cached
_urls
}
|
sort
|
uniq
>
${
_urls
}
fi
# List currently available packages on cache
...
...
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