Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Web apps #3

Merged
merged 49 commits into from
Feb 7, 2018
Merged
Show file tree
Hide file tree
Changes from 9 commits
Commits
Show all changes
49 commits
Select commit Hold shift + click to select a range
7989674
Add dependencies set-up
jburel Jan 21, 2018
9a0f628
Change order
jburel Jan 21, 2018
247642c
Run command as root
jburel Jan 22, 2018
a556a4c
Rename file
jburel Jan 22, 2018
712295f
Add option to exclude files
jburel Jan 22, 2018
a27ce10
Add new parameter
jburel Jan 22, 2018
8dae16c
Simplify exclude check
jburel Jan 22, 2018
70bfa7a
Specify parameter to run test command
jburel Jan 22, 2018
1ed0bbc
Run test as root
jburel Jan 22, 2018
ac139d9
Add dependencies
jburel Jan 23, 2018
0b54888
Specify directory
jburel Jan 24, 2018
aa80f7d
Rename file used to override
jburel Jan 24, 2018
fd20c52
Split setup
jburel Jan 24, 2018
4e76c70
Add steps
jburel Jan 24, 2018
db79034
Minor fix
jburel Jan 24, 2018
bdba0de
Review files
jburel Jan 24, 2018
8f5d216
Remove line added while debugging
jburel Jan 24, 2018
044b49f
Copy before start up
jburel Jan 25, 2018
e143dec
Fix permissions
jburel Jan 25, 2018
6a5b2bd
Fix parameter passing
jburel Jan 25, 2018
1811aa9
Run the test setup before running test
jburel Jan 26, 2018
1a8a534
Configure the app by default using name
jburel Jan 29, 2018
be4b74d
Merge remote-tracking branch 'origin/master' into web-apps
jburel Jan 29, 2018
e24eadd
Introduce app-config file
jburel Jan 29, 2018
c91a334
Add option so both app and scripts can be used at the same time
jburel Jan 31, 2018
61380a6
Use script dependencies
jburel Jan 31, 2018
e3a757a
docker: add wrapper for all stages
joshmoore Feb 2, 2018
ba4329a
docker: fix for "lib" stage and other issues
joshmoore Feb 2, 2018
429bc49
docker: add --user support
joshmoore Feb 2, 2018
2160444
Fix typo and ignore deps
jburel Feb 2, 2018
18fbe90
invoke correct file
jburel Feb 2, 2018
636e4bb
Ignore app-build
jburel Feb 2, 2018
d3ca50d
Look for setup.py
jburel Feb 2, 2018
777ad40
Remove newly introduced variables
jburel Feb 2, 2018
07c5581
No longer use DIR as a parameter
jburel Feb 2, 2018
adb1d9f
include utils file
jburel Feb 2, 2018
8ab5ca5
Fix name
jburel Feb 4, 2018
5657034
Fix path
jburel Feb 4, 2018
be85c38
Add setuptools
jburel Feb 4, 2018
d9b1c4b
Move method to utils and fix configuration
jburel Feb 5, 2018
31433dd
Update readme
jburel Feb 5, 2018
5d05727
Use bash
jburel Feb 5, 2018
a01beeb
Remove printf
jburel Feb 5, 2018
fdbd628
Use new approach
jburel Feb 5, 2018
3c20072
Do not run test as root
jburel Feb 6, 2018
81e8c41
Export variables
jburel Feb 6, 2018
b937610
Add extra step
jburel Feb 6, 2018
82819c1
Remove export
jburel Feb 6, 2018
108ad83
Remove commented out code
jburel Feb 7, 2018
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion app-build
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ set -x
printf "travis_fold:start:app-build\n"

TARGET=${TARGET:-..}
DIR=${DIR:-.}
cd $TARGET

GUESS=${PWD#*omero-*}
Expand All @@ -20,6 +21,6 @@ export PYTHONPATH=${OMERO_DIST}/lib/python:${OMERO_DIST}/lib/python/omeroweb

set +u
source /opt/omero/web/venv/bin/activate
ICE_CONFIG=${OMERO_DIST}/etc/ice.config python setup.py test
ICE_CONFIG=${OMERO_DIST}/etc/ice.config python $DIR/setup.py test

printf "travis_fold:end:app-build\n"
13 changes: 11 additions & 2 deletions app-docker
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
set -e
set -u

EXCLUDE=${EXCLUDE:-}
DIR=${DIR:-.}
PROJECT=${PROJECT:-omero}
CID=${CID:-"$PROJECT"_web_1}
TARGET=/$(basename $PWD)
Expand All @@ -21,13 +23,20 @@ docker exec $CID sed -i "s/^\(omero\.host\s*=\s*\).*\$/\1omero/" /opt/omero/web/
docker exec -e USER_AGENT=Travis -u root $CID /opt/omero/omego/bin/omego download java --sym /opt/omero/java
docker exec $CID ln -s /opt/omero/java/libs /opt/omero/web/OMERO.web/lib/client

# Run custom dependencies setup
if [ -e .omeroci/app-build-deps ];
then
docker exec -u root $CID bash /$TARGET/.omeroci/app-build-deps
fi

docker exec -e OMERO_HOST=omero $CID /infra/wait-on-login
docker exec -u root -e TARGET=$TARGET $CID /infra/py-setup
docker exec -u root -e TARGET=$TARGET -e EXCLUDE=$EXCLUDE -e DIR=$DIR $CID /infra/py-setup


# Run custom server setup
if [ -e .omeroci/app-config ];
then
docker exec $CID bash /$TARGET/.omeroci/app-config
fi

docker exec -e TARGET=$TARGET $CID /infra/app-build
docker exec -u root -e TARGET=$TARGET -e DIR=$DIR $CID /infra/app-build
15 changes: 13 additions & 2 deletions py-setup
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,25 @@ set -x
printf "travis_fold:start:py-setup\n"

TARGET=${TARGET:-..}

EXCLUDE=${EXCLUDE:-}
DIR=${DIR:-.}
dir=$(cd -P -- "$(dirname -- "$0")" && pwd -P)
cd $TARGET
pip install --upgrade pip setuptools
pip install -r $dir/requirements.txt
flake8 -v .
array=( $EXCLUDE )
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This makes me wonder if we don't want linting in a script. And that makes me wonder if we don't want a default file (including release and version-bump) in this repo and it gets used IFF .omeroci doesn't provide one.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

removing from check from py-setup will be necessary since I am now having to combine 2 "dockers" => flake8 is run twice

size="${#array[@]}"
v=""
if (( $size != 0 )); then
v="--exclude "
for i in "${array[@]}"; do
v=$v" "$i
done
fi
flake8 $v -v .
rst-lint README.rst

cd $DIR
python setup.py sdist
pip install dist/*.tar.gz
python setup.py clean
Expand Down