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
0fd20d64
Commit
0fd20d64
authored
8 years ago
by
André Anjos
Browse files
Options
Downloads
Patches
Plain Diff
Remove outdated scripts
parent
8df2a529
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
ci/bootstrap.sh
+0
-108
0 additions, 108 deletions
ci/bootstrap.sh
ci/docs.sh
+0
-35
0 additions, 35 deletions
ci/docs.sh
ci/wheels.sh
+0
-25
0 additions, 25 deletions
ci/wheels.sh
with
0 additions
and
168 deletions
ci/bootstrap.sh
deleted
100755 → 0
+
0
−
108
View file @
8df2a529
#!/usr/bin/env bash
# Mon 8 Aug 17:40:24 2016 CEST
# Creates a build environment for the current package
# $1 == conda folder (e.g. "/opt/conda")
# $2 == python version (e.g. "2.7")
# $3 == local dir for environment (e.g. "env")
if
[
"
${#}
"
-ne
3
]
;
then
echo
"usage:
${
0
}
<conda-root> <python-version> <prefix>"
echo
"example:
${
0
}
/opt/conda 2.7 env"
exit
1
fi
CONDA_FOLDER
=
${
1
}
PYTHON_VERSION
=
${
2
}
PREFIX
=
`
pwd
`
/
${
3
}
WHEELS_SERVER
=
"www.idiap.ch"
WHEELS_REPOSITORY
=
"https://
${
WHEELS_SERVER
}
/software/bob/wheels/gitlab/"
# Determines the architecture we're using
if
[
"
$(
uname
)
"
==
"Darwin"
]
;
then
ARCH
=
"macosx"
else
ARCH
=
"linux"
fi
# Functions for coloring echo commands
red_echo
()
{
echo
-e
"
\0
33[1;31m
${
@
}
\0
33[0m"
}
green_echo
()
{
echo
-e
"
\0
33[1;32m
${
@
}
\0
33[0m"
}
yellow_echo
()
{
echo
-e
"
\0
33[1;33m
${
@
}
\0
33[0m"
}
# Function for running command and echoing results
run_cmd
()
{
green_echo
"[(
`
date
+%c
`
)>>] Running
\"
${
@
}
\"
..."
${
@
}
if
[
"
$?
"
!=
"0"
]
;
then
red_echo
"[(
`
date
+%c
`
)!!] Command Failed
\"
${
@
}
\"
"
exit
1
else
green_echo
"[(
`
date
+%c
`
)<<] Finished comand
\"
${
@
}
\"
"
fi
}
# Clones the conda dev environment to use
if
[
!
-d
${
PREFIX
}
]
;
then
yellow_echo
"[++] Downloading environment list into file
\`
env.txt'..."
pyver
=
$(
echo
${
PYTHON_VERSION
}
|
tr
-d
'.'
)
curl
--silent
https://gitlab.idiap.ch/bob/bob.admin/raw/master/install/
${
ARCH
}
/devel-py
${
pyver
}
.txt
>
env.txt
yellow_echo
"[++] Bootstrapping conda installation at
${
PREFIX
}
..."
run_cmd
${
CONDA_FOLDER
}
/bin/conda clean
--lock
run_cmd
${
CONDA_FOLDER
}
/bin/conda create
--prefix
${
PREFIX
}
--file
env.txt
--yes
run_cmd
${
CONDA_FOLDER
}
/bin/conda clean
--lock
else
yellow_echo
"[!!] Prefix directory
${
PREFIX
}
exists, not re-installing..."
fi
# Source the newly created conda environment
green_echo
"[>>] Running
\"
source
${
CONDA_FOLDER
}
/bin/activate
${
PREFIX
}
\"
..."
source
${
CONDA_FOLDER
}
/bin/activate
${
PREFIX
}
green_echo
"[<<] Environment
${
PREFIX
}
activated"
# Verify where pip is installed
use_pip
=
`
which pip
`
if
[
-z
"
${
use_pip
}
"
]
;
then
red_echo
"[!!] Cannot find pip, aborting..."
exit
1
else
yellow_echo
"[++] Using pip:
${
use_pip
}
"
fi
use_python
=
`
which python
`
if
[
-z
"
${
use_python
}
"
]
;
then
red_echo
"[!!] Cannot find python, aborting..."
exit
1
else
yellow_echo
"[++] Using python:
${
use_python
}
"
fi
# Install this package's build dependencies
if
[
-e
requirements.txt
]
;
then
run_cmd
${
use_pip
}
install
--find-links
${
WHEELS_REPOSITORY
}
--use-wheel
--no-index
--trusted-host
${
WHEELS_SERVER
}
--pre
--requirement
requirements.txt
else
yellow_echo
"[!!] No requirements.txt file found, skipping 'pip install <build-deps>'..."
fi
# Install this package's test dependencies
if
[
-e
test-requirements.txt
]
;
then
run_cmd
${
use_pip
}
install
--find-links
${
WHEELS_REPOSITORY
}
--use-wheel
--no-index
--trusted-host
${
WHEELS_SERVER
}
--pre
--requirement
test-requirements.txt
else
yellow_echo
"[!!] No test-requirements.txt file found, skipping 'pip install <test-deps>'..."
fi
# Finally, bootstrap the installation from the new environment
if
[
-e
bootstrap-buildout.py
]
;
then
run_cmd
${
use_python
}
bootstrap-buildout.py
else
red_echo
"[!!] No bootstrap-buildout.py file found, stopping..."
exit
1
fi
This diff is collapsed.
Click to expand it.
ci/docs.sh
deleted
100755 → 0
+
0
−
35
View file @
8df2a529
#!/usr/bin/env bash
# Wed 21 Sep 2016 13:08:05 CEST
# Functions for coloring echo commands
red_echo
()
{
echo
-e
"
\0
33[1;31m
${
@
}
\0
33[0m"
}
green_echo
()
{
echo
-e
"
\0
33[1;32m
${
@
}
\0
33[0m"
}
if
[
-z
"
${
DOCUSER
}
"
]
||
[
-z
"
${
DOCPASS
}
"
]
||
[
-z
"
${
DOCSERVER
}
"
]
;
then
red_echo
"DOCSERVER, DOCUSER and/or DOCPASS undefined - aborting..."
;
exit
1
fi
info
=
sphinx/.gitlab-ci.info
echo
"repo=
${
CI_PROJECT_PATH
}
"
>
${
info
}
echo
"branch=
${
CI_BUILD_REF_NAME
}
"
>>
${
info
}
echo
"tag=
${
CI_BUILD_TAG
}
"
>>
${
info
}
echo
"build=
${
CI_BUILD_ID
}
"
>>
${
info
}
echo
"commit=
${
CI_BUILD_REF
}
"
>>
${
info
}
echo
"runner=
${
CI_RUNNER_DESCRIPTION
}
"
>>
${
info
}
file
=
${
CI_PROJECT_NAME
}
-
${
CI_BUILD_REF
}
.tar.bz2
tar
cfj
${
file
}
sphinx
green_echo
"[>>] Uploading
${
file
}
..."
curl
--silent
--user
"
${
DOCUSER
}
:
${
DOCPASS
}
"
--upload-file
${
file
}
${
DOCSERVER
}
/software/bob/docs-upload/
if
[
$?
!=
0
]
;
then
red_echo
"[error] curl command finished with an error condition"
exit
1
fi
This diff is collapsed.
Click to expand it.
ci/wheels.sh
deleted
100755 → 0
+
0
−
25
View file @
8df2a529
#!/usr/bin/env bash
# Wed 21 Sep 2016 13:06:56 CEST
# Functions for coloring echo commands
red_echo
()
{
echo
-e
"
\0
33[1;31m
${
@
}
\0
33[0m"
}
green_echo
()
{
echo
-e
"
\0
33[1;32m
${
@
}
\0
33[0m"
}
if
[
-z
"
${
DOCUSER
}
"
]
||
[
-z
"
${
DOCPASS
}
"
]
||
[
-z
"
${
DOCSERVER
}
"
]
;
then
red_echo
"DOCSERVER, DOCUSER and/or DOCPASS undefined - aborting..."
;
exit
1
fi
for
file
in
dist/
*
.whl
;
do
green_echo
"[>>] Uploading
${
file
}
..."
curl
--silent
--user
"
${
DOCUSER
}
:
${
DOCPASS
}
"
--upload-file
${
file
}
${
DOCSERVER
}
/software/bob/wheels-upload/gitlab/
if
[
$?
!=
0
]
;
then
red_echo
"[error] curl command finished with an error condition"
exit
1
fi
done
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