/
config.xml
256 lines (214 loc) · 12.2 KB
/
config.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
<?xml version='1.1' encoding='UTF-8'?>
<project>
<actions/>
<description></description>
<keepDependencies>false</keepDependencies>
<properties>
<hudson.model.ParametersDefinitionProperty>
<parameterDefinitions>
<hudson.model.StringParameterDefinition>
<name>OMERO_PY_ZIP_URL</name>
<description></description>
<defaultValue></defaultValue>
<trim>false</trim>
</hudson.model.StringParameterDefinition>
</parameterDefinitions>
</hudson.model.ParametersDefinitionProperty>
</properties>
<scm class="hudson.scm.NullSCM"/>
<assignedNode>web</assignedNode>
<canRoam>false</canRoam>
<disabled>false</disabled>
<blockBuildWhenDownstreamBuilding>false</blockBuildWhenDownstreamBuilding>
<blockBuildWhenUpstreamBuilding>false</blockBuildWhenUpstreamBuilding>
<triggers/>
<concurrentBuild>false</concurrentBuild>
<builders>
<hudson.tasks.Shell>
<command>rm -rf $WORKSPACE/.venv3
python3 -m venv $WORKSPACE/.venv3
source $WORKSPACE/.venv3/bin/activate
pip install https://github.com/glencoesoftware/zeroc-ice-py-rhel9-x86_64/releases/download/20230830/zeroc_ice-3.6.5-cp39-cp39-linux_x86_64.whl
pip install -U pip future
pip install markdown
pip install omero-py omero-web # Latest in order to stop server. NB: Re-installed from python-superbuild below</command>
</hudson.tasks.Shell>
<hudson.tasks.Shell>
<command>OMERO_DIST=$WORKSPACE/OMERO.web
export OMERODIR=$OMERO_DIST
if [ -e $OMERO_DIST ]; then
source $WORKSPACE/.venv3/bin/activate
omero web stop || echo 'not running'
sleep 5
echo "Using kill to be extra careful"
for x in $(ps aux -H | grep python3 | grep -v grep | cut -b 10-16); do
kill $x
done
omero web status || echo 'no status'
deactivate
fi
rm -rf $HOME/static/web/
rm -rf $WORKSPACE/*</command>
</hudson.tasks.Shell>
<hudson.plugins.copyartifact.CopyArtifact plugin="copyartifact@722.v0662a_9b_e22a_c">
<project>OMERO-build</project>
<filter>src/target/OMERO.server*zip</filter>
<target/>
<includeBuildNumberInTargetPath>false</includeBuildNumberInTargetPath>
<excludes/>
<selector class="hudson.plugins.copyartifact.StatusBuildSelector"/>
<flatten>true</flatten>
<doNotFingerprintArtifacts>false</doNotFingerprintArtifacts>
</hudson.plugins.copyartifact.CopyArtifact>
<hudson.plugins.copyartifact.CopyArtifact plugin="copyartifact@722.v0662a_9b_e22a_c">
<project>OMERO-python-superbuild-build</project>
<filter>**/*.tar.gz</filter>
<target/>
<includeBuildNumberInTargetPath>false</includeBuildNumberInTargetPath>
<excludes/>
<selector class="hudson.plugins.copyartifact.StatusBuildSelector"/>
<flatten>true</flatten>
<doNotFingerprintArtifacts>false</doNotFingerprintArtifacts>
</hudson.plugins.copyartifact.CopyArtifact>
<hudson.plugins.copyartifact.CopyArtifact plugin="copyartifact@722.v0662a_9b_e22a_c">
<project>OMERO-build-build</project>
<filter/>
<target/>
<includeBuildNumberInTargetPath>false</includeBuildNumberInTargetPath>
<excludes/>
<selector class="hudson.plugins.copyartifact.StatusBuildSelector"/>
<flatten>true</flatten>
<doNotFingerprintArtifacts>false</doNotFingerprintArtifacts>
</hudson.plugins.copyartifact.CopyArtifact>
<hudson.tasks.Shell>
<command>
OMERO_DIST=$WORKSPACE/OMERO.web
export OMERODIR=$OMERO_DIST
export ZIP_FILE=$WORKSPACE/omero-blitz-VERSION-python.zip
export VERSION_PROPERTIES=$WORKSPACE/version.properties
ZIP=$(ls OMERO.server*.zip)
if [ ! -z "$OMERO_PY_ZIP_URL" ]
then
rm -f $ZIP
wget -q $OMERO_PY_ZIP_URL
ZIP=$(basename $OMERO_PY_ZIP_URL)
fi
DIST=${ZIP%.zip}
unzip -n $ZIP ## TODO: unclear why this has dupes
rm -f $ZIP
mv $WORKSPACE/$DIST $OMERO_DIST
source $WORKSPACE/.venv3/bin/activate
source /home/settings.env
# Install omero-py, omero-web etc from OMERO-python-superbuild-build job
for x in *.tar.gz; do
pip install $x
done
pip install packaging # to be removed if/when included in omero-web
pip install build # require to build omero-iviewer to be removed when possible to install directly from github
#start-config
omero config set omero.web.application_server 'wsgi-tcp'
omero config set omero.web.application_server.max_requests 0
omero config set omero.web.prefix $WEB_PREFIX
omero config set omero.web.static_url $WEB_PREFIX'/static/'
omero config set omero.web.static_root $HOME'/static/web/'
omero config set omero.web.session_engine 'django.contrib.sessions.backends.cache'
omero config set omero.web.caches '{"default": {"BACKEND": "django_redis.cache.RedisCache","LOCATION": "redis://redis:6379/0"}}'
omero config set omero.web.server_list '[["omero", 4064, "omero"], ["testintegration", 14064, "testintegration"]]'
omero config set omero.web.application_server.host $NODE_NAME
omero config set omero.web.application_server.port 4080
omero web config nginx --http "$OMERO_WEB_PORT" >$OMERO_DIST/nginx.conf.tmp
sudo cp $OMERO_DIST/nginx.conf.tmp $HOME/nginx/$NODE_NAME.conf
omero config set omero.web.wsgi_args -- '--log-level=DEBUG --error-logfile='$OMERO_DIST'/var/log/gunicorn.err'
omero config set omero.web.application_server.host 0.0.0.0
# OMERO.iviewer installation
#pip install "git+https://github.com/$SPACE_USER/omero-iviewer.git@$MERGE_PUSH_BRANCH#egg=omero-iviewer&subdirectory=plugin"
git clone -b $MERGE_PUSH_BRANCH https://github.com/$SPACE_USER/omero-iviewer.git
cd omero-iviewer/plugin
python -m build
cd dist
for x in *.tar.gz; do
pip install -U $x # install iviewer
done
omero config append omero.web.apps '"omero_iviewer"'
omero config set omero.web.viewer.view omero_iviewer.views.index
omero config append omero.web.open_with '["omero_iviewer", "omero_iviewer_index", {"supported_objects":["images", "dataset", "well"], "script_url": "omero_iviewer/openwith.js", "label": "OMERO.iviewer"}]'
# OMERO.figure installation
pip install git+https://github.com/$SPACE_USER/omero-figure.git@$MERGE_PUSH_BRANCH#egg=omero-figure
omero config append omero.web.apps '"omero_figure"'
omero config append omero.web.ui.top_links '["Figure", "figure_index", {"title": "Open Figure in new tab", "target": "_blank"}]'
omero config append omero.web.open_with '["omero_figure", "new_figure", {"supported_objects":["images"], "target": "_blank", "label": "OMERO.figure"}]'
# OMERO.parade installation
pip install https://github.com/$SPACE_USER/omero-parade/archive/$MERGE_PUSH_BRANCH.tar.gz
omero config append omero.web.apps '"omero_parade"'
omero config append omero.web.ui.center_plugins '["Parade", "omero_parade/init.js.html", "omero_parade"]'
omero config set omero.web.use_x_forwarded_host true
omero config set omero.web.secure_proxy_ssl_header '["HTTP_X_FORWARDED_PROTO", "https"]'
# OMERO.fpbioimage installation
pip install git+https://github.com/$SPACE_USER/omero-fpbioimage.git@$MERGE_PUSH_BRANCH#egg=omero-fpbioimage
omero config append omero.web.apps '"omero_fpbioimage"'
omero config append omero.web.open_with '["omero_fpbioimage", "fpbioimage_index", {"script_url": "fpbioimage/openwith.js", "supported_objects": ["image"], "label": "FPBioimage"}]'
# OMERO.gallery installation
pip install git+https://github.com/$SPACE_USER/omero-gallery.git@$MERGE_PUSH_BRANCH#egg=omero-gallery
omero config append omero.web.apps '"omero_gallery"'
omero config append omero.web.ui.top_links '["Gallery", "webgallery_index", {"title": "Browse Gallery"}]'
omero config set omero.web.gallery.category_queries '{"all":{"label":"All Studies", "index":0, "query":"FIRST50:Name"}}'
# OMERO.mapr installation
pip install git+https://github.com/$SPACE_USER/omero-mapr.git@$MERGE_PUSH_BRANCH#egg=omero-mapr
omero config append omero.web.apps '"omero_mapr"'
omero config append omero.web.mapr.config '{"menu": "anyvalue", "config":{"default":["Any Value"], "all":[], "ns":["openmicroscopy.org/omero/client/mapAnnotation"], "label":"Any"}}'
omero config append omero.web.ui.top_links '["Any Map Value", {"viewname": "maprindex_anyvalue"}, {"title": "Search for values in any Key-Value pair"}]'
# OMERO.weberror installation
pip install git+https://github.com/$SPACE_USER/omero-weberror.git@$MERGE_PUSH_BRANCH#egg=omero-weberror
omero config append omero.web.apps '"omero_weberror"'
# OMERO.webtest
pip install git+https://github.com/$SPACE_USER/omero-webtest.git@$MERGE_PUSH_BRANCH#egg=omero-webtest
omero config append omero.web.apps '"omero_webtest"'
# OMERO.omero-webtagging-autotag installation
pip install omero-autotag
# Add autotag to webclient
omero config append omero.web.apps '"omero_autotag"'
# Add autotag to centre panel
omero config append omero.web.ui.center_plugins '["Auto Tag", "omero_autotag/auto_tag_init.js.html", "auto_tag_panel"]'
pip install omero-tagsearch
# Add tagsearch to webclient
omero config append omero.web.apps '"omero_tagsearch"'
omero config append omero.web.ui.top_links '["Tag Search", "tagsearch"]'
# omero-web-zarr
pip install git+https://github.com/$SPACE_USER/omero-web-zarr.git@$MERGE_PUSH_BRANCH#egg=omero-web-zarr
omero config append omero.web.apps '"omero_web_zarr"'
# OMERO.signup installation
pip install git+https://github.com/$SPACE_USER/omero-signup.git@$MERGE_PUSH_BRANCH#egg=omero-signup
omero config append omero.web.apps '"omero_signup"'
omero config set omero.web.signup.admin.user "root"
omero config set omero.web.signup.admin.password "omero"
omero config set omero.web.signup.group.name "signup-test"
omero config set omero.web.signup.email.enabled True
# virtual microscope
pip install git+https://github.com/$SPACE_USER/omero-virtual-microscope.git@$MERGE_PUSH_BRANCH#egg=omero-virtual-microscope
omero config append omero.web.apps '"virtualmicroscope"'
omero config set omero.web.login_redirect '{"redirect": ["webindex"], "viewname": "webindex_custom"}'
# CORS
omero config append omero.web.apps '"corsheaders"'
omero config append omero.web.middleware '{"index": 0.5, "class": "corsheaders.middleware.CorsMiddleware"}'
omero config append omero.web.middleware '{"index": 10, "class": "corsheaders.middleware.CorsPostCsrfMiddleware"}'
omero config set omero.web.cors_origin_allow_all True
# Twitter testing example
omero config set omero.web.sharing.opengraph '{"omero":"Open Microscopy"}'
omero config set omero.web.sharing.twitter '{"omero":"@openmicroscopy"}'
omero config set omero.web.public.enabled true
omero config set omero.web.public.user public
omero config set omero.web.public.password public
omero config set omero.web.public.url_filter '^/'
# QA feedback configuration
omero config set omero.web.feedback.comment.enabled false
omero config set omero.web.feedback.error.enabled false
BUILD_ID=DONT_KILL_ME omero web start
omero web diagnostics
deactivate</command>
</hudson.tasks.Shell>
</builders>
<publishers/>
<buildWrappers>
<hudson.plugins.timestamper.TimestamperBuildWrapper plugin="timestamper@1.9"/>
</buildWrappers>
</project>