Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
bob.devtools
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
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
Show more breadcrumbs
bob
bob.devtools
Commits
d0ce4426
Commit
d0ce4426
authored
6 years ago
by
André Anjos
Browse files
Options
Downloads
Patches
Plain Diff
[ci] Improved deployment
parent
db7b2930
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Pipeline
#25799
failed
6 years ago
Stage: build
Stage: deploy
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
.gitlab-ci.yml
+6
-3
6 additions, 3 deletions
.gitlab-ci.yml
ci/bootstrap.sh
+27
-7
27 additions, 7 deletions
ci/bootstrap.sh
ci/deploy.sh
+0
-7
0 additions, 7 deletions
ci/deploy.sh
with
33 additions
and
17 deletions
.gitlab-ci.yml
+
6
−
3
View file @
d0ce4426
...
@@ -13,7 +13,7 @@ stages:
...
@@ -13,7 +13,7 @@ stages:
.build_template
:
&build_job
.build_template
:
&build_job
stage
:
build
stage
:
build
before_script
:
before_script
:
-
./ci/bootstrap.sh
-
./ci/bootstrap.sh
build
script
:
script
:
-
./ci/build.sh
-
./ci/build.sh
cache
:
&build_caches
cache
:
&build_caches
...
@@ -73,9 +73,12 @@ build_macosx_36:
...
@@ -73,9 +73,12 @@ build_macosx_36:
.deploy_template
:
&deploy_job
.deploy_template
:
&deploy_job
stage
:
deploy
stage
:
deploy
before_script
:
before_script
:
-
./ci/bootstrap.sh
self
-
./ci/bootstrap.sh
local myenv
script
:
script
:
-
./ci/deploy.sh
-
source ${CONDA_ROOT}/etc/profile.d/conda.sh
-
conda activate myenv
-
bdt --help
-
bdt ci deploy
dependencies
:
dependencies
:
-
build_linux_36
-
build_linux_36
-
build_macosx_36
-
build_macosx_36
...
...
This diff is collapsed.
Click to expand it.
ci/bootstrap.sh
+
27
−
7
View file @
d0ce4426
#!/usr/bin/env bash
#!/usr/bin/env bash
# Bootstraps a new conda installation and prepares base environment
# Bootstraps a new conda installation and prepares base environment
# if "self" is passed as parameter, then self installs an already built
# if "local" is passed as parameter, then self installs an already built
# version of bob.devtools available on your conda-bld directory.
# 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
# datetime prefix for logging
log_datetime
()
{
log_datetime
()
{
...
@@ -113,21 +120,34 @@ run_cmd mkdir -p ${CONDA_ROOT}/pkgs
...
@@ -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
run_cmd
touch
${
CONDA_ROOT
}
/pkgs/urls.txt
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
}
run_cmd
cp
-fv
${
CI_PROJECT_DIR
}
/bob/devtools/data/base-condarc
${
CONDARC
}
echo
"channels:"
>>
${
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
}
echo
" - defaults"
>>
${
CONDARC
}
# displays contents of our configuration
# displays contents of our configuration
echo
"Contents of
\`
${
CONDARC
}
':"
echo
"Contents of
\`
${
CONDARC
}
':"
cat
${
CONDARC
}
cat
${
CONDARC
}
# updates conda installation, installs just built bob.devtools
# creates a base installation depending on the purpose
if
[
"
${
1
}
"
==
"self"
]
;
then
if
[
"
${
1
}
"
==
"build"
]
;
then
run_cmd
${
CONDA_ROOT
}
/bin/conda create
-n
bdt
${
CONDA_ROOT
}
/conda-bld/
${
OS_SLUG
}
/bob.devtools-
*
.tar.bz2
else
run_cmd
${
CONDA_ROOT
}
/bin/conda
install
-n
base python
conda
=
4 conda-build
=
3
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
fi
run_cmd
# cleans up
# cleans up
run_cmd
${
CONDA_ROOT
}
/bin/conda clean
--lock
run_cmd
${
CONDA_ROOT
}
/bin/conda clean
--lock
...
...
This diff is collapsed.
Click to expand it.
ci/deploy.sh
+
0
−
7
View file @
d0ce4426
#!/usr/bin/env bash
#!/usr/bin/env bash
# Wed Jan 9 16:48:57 CET 2019
# 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
}
deploy_conda_packages
${
CONDA_CHANNELS
[0]
}
${
CI_PROJECT_NAME
}
# upload the docs from the sphinx folder (usually an artifact of Linux Python
# upload the docs from the sphinx folder (usually an artifact of Linux Python
...
...
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