Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
bob
bob.devtools
Commits
d0ce4426
Commit
d0ce4426
authored
Jan 10, 2019
by
André Anjos
💬
Browse files
[ci] Improved deployment
parent
db7b2930
Pipeline
#25799
failed with stages
in 3 minutes and 38 seconds
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
.gitlab-ci.yml
View file @
d0ce4426
...
...
@@ -13,7 +13,7 @@ stages:
.build_template
:
&build_job
stage
:
build
before_script
:
-
./ci/bootstrap.sh
-
./ci/bootstrap.sh
build
script
:
-
./ci/build.sh
cache
:
&build_caches
...
...
@@ -73,9 +73,12 @@ build_macosx_36:
.deploy_template
:
&deploy_job
stage
:
deploy
before_script
:
-
./ci/bootstrap.sh
self
-
./ci/bootstrap.sh
local myenv
script
:
-
./ci/deploy.sh
-
source ${CONDA_ROOT}/etc/profile.d/conda.sh
-
conda activate myenv
-
bdt --help
-
bdt ci deploy
dependencies
:
-
build_linux_36
-
build_macosx_36
...
...
ci/bootstrap.sh
View file @
d0ce4426
#!/usr/bin/env bash
# Bootstraps a new conda installation and prepares base environment
# if "self" is passed as parameter, then self installs an already built
# version of bob.devtools available on your conda-bld directory.
# if "local" is passed as parameter, then self installs an already built
# version of bob.devtools available on your conda-bld directory. If you pass
# "beta", then it bootstraps from the package installed on our conda beta
# channel. If you pass "stable", then it bootstraps installing the package
# available on the stable channel.
#
# If bootstrapping anything else than "build", then provide a second argument
# with the name of the environment that one wants to create with an
# installation of bob.devtools.
# datetime prefix for logging
log_datetime
()
{
...
...
@@ -113,21 +120,34 @@ run_cmd mkdir -p ${CONDA_ROOT}/pkgs
run_cmd
touch
${
CONDA_ROOT
}
/pkgs/urls
run_cmd
touch
${
CONDA_ROOT
}
/pkgs/urls.txt
CONDA_CHANNEL_ROOT
=
http://www.idiap.ch/public/conda
check_defined CONDA_CHANNEL_ROOT
run_cmd
cp
-fv
${
CI_PROJECT_DIR
}
/bob/devtools/data/base-condarc
${
CONDARC
}
echo
"channels:"
>>
${
CONDARC
}
echo
" - http://www.idiap.ch/public/conda"
>>
${
CONDARC
}
if
[
"
${
1
}
"
==
"beta"
]
;
then
echo
" -
${
CONDA_CHANNEL_ROOT
}
/label/beta"
>>
${
CONDARC
}
fi
echo
" -
${
CONDA_CHANNEL_ROOT
}
"
>>
${
CONDARC
}
echo
" - defaults"
>>
${
CONDARC
}
# displays contents of our configuration
echo
"Contents of
\`
${
CONDARC
}
':"
cat
${
CONDARC
}
# updates conda installation, installs just built bob.devtools
if
[
"
${
1
}
"
==
"self"
]
;
then
run_cmd
${
CONDA_ROOT
}
/bin/conda create
-n
bdt
${
CONDA_ROOT
}
/conda-bld/
${
OS_SLUG
}
/bob.devtools-
*
.tar.bz2
else
# creates a base installation depending on the purpose
if
[
"
${
1
}
"
==
"build"
]
;
then
run_cmd
${
CONDA_ROOT
}
/bin/conda
install
-n
base python
conda
=
4 conda-build
=
3
elif
[
"
${
1
}
"
==
"local"
]
;
then
run_cmd
${
CONDA_ROOT
}
/bin/conda create
-n
"
${
2
}
"
${
CONDA_ROOT
}
/conda-bld/
${
OS_SLUG
}
/bob.devtools-
*
.tar.bz2
elif
[
"
${
1
}
"
==
"beta"
]
||
[
"
${
1
}
"
==
"stable"
]
;
then
run_cmd
${
CONDA_ROOT
}
/bin/conda create
-n
"
${
2
}
"
bob.devtools
else
log_error
"Bootstrap with 'build', or 'local|beta|stable <name>'"
log_error
"The value '
${
1
}
' is not currently supported"
exit
1
fi
run_cmd
# cleans up
run_cmd
${
CONDA_ROOT
}
/bin/conda clean
--lock
...
...
ci/deploy.sh
View file @
d0ce4426
#!/usr/bin/env bash
# Wed Jan 9 16:48:57 CET 2019
source
$(
dirname
${
0
}
)
/functions.sh
run_cmd
cp
-fv
${
CI_PROJECT_DIR
}
/bob/devtools/data/base-condarc
${
CONDARC
}
echo
"channels:"
>>
${
CONDARC
}
echo
" -
${
DOCSERVER
}
/public/conda"
>>
${
CONDARC
}
echo
" - defaults"
>>
${
CONDARC
}
deploy_conda_packages
${
CONDA_CHANNELS
[0]
}
${
CI_PROJECT_NAME
}
# upload the docs from the sphinx folder (usually an artifact of Linux Python
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment