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

Jenkins #190

Merged
merged 44 commits into from
Mar 4, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
44 commits
Select commit Hold shift + click to select a range
7f22c78
test with lts
jburel Jan 15, 2022
4b6ed16
do not use devel
jburel Jan 15, 2022
5481d06
build with develop
jburel Jan 17, 2022
6ea5915
prepare installation
jburel Jan 18, 2022
11c2b5e
do not run omero-install
jburel Jan 18, 2022
c8e2528
build from ome
jburel Jan 18, 2022
eeef545
plugin
jburel Jan 18, 2022
7c8a370
use perso repo
jburel Jan 21, 2022
a75e510
review user
jburel Jan 21, 2022
c691940
point to repo
jburel Jan 21, 2022
257dfc8
point to perso branch
jburel Jan 24, 2022
ef48dc6
remove deprecated plugins
jburel Jan 24, 2022
c5b0e87
drop version
jburel Jan 24, 2022
2aa5f01
remove version
jburel Jan 24, 2022
9455c00
instal plugins using jar file
jburel Jan 24, 2022
2b70888
add plugin
jburel Jan 25, 2022
4d54fd8
update instructions
jburel Jan 26, 2022
1d68244
archive properties file
jburel Jan 26, 2022
041d8fb
bump gradle version
jburel Jan 26, 2022
c7182e5
install ice-devel
jburel Jan 27, 2022
a329b16
create symlink
jburel Jan 27, 2022
4622f3c
set permissions
jburel Jan 31, 2022
e509844
update job
jburel Feb 1, 2022
67312a5
remove optional step. This is required
jburel Feb 1, 2022
14bb27a
add step
jburel Feb 1, 2022
81d969c
adjust ownership
jburel Feb 1, 2022
38c953d
test command
jburel Feb 1, 2022
a0af274
use official tag
jburel Feb 3, 2022
abbc12c
use jar. Previous command failed when deploying on idr1
jburel Feb 3, 2022
c589c94
use tag
jburel Feb 3, 2022
77c3fb1
remove space
jburel Feb 4, 2022
acdbd34
cap report lab
jburel Feb 8, 2022
403941a
create static folder as omero-web
jburel Feb 8, 2022
efdcd08
do not update gradle
jburel Feb 8, 2022
b5b40b9
update instructions
jburel Feb 8, 2022
c9c67bf
do not check url
jburel Feb 8, 2022
42421de
change java version
jburel Feb 9, 2022
69c8dce
bump version
jburel Feb 9, 2022
05f7d15
add new config
jburel Feb 9, 2022
bb14766
install plugins
jburel Feb 9, 2022
4a3f57d
check url
jburel Feb 9, 2022
4e81875
remove comments, this leads to a NPE
jburel Feb 9, 2022
5fb9684
use explicit version
jburel Feb 10, 2022
a9f1ddc
use official image
jburel Feb 10, 2022
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
28 changes: 22 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,17 @@ The following instructions explain how to deploy a devspace on a Docker host.
* Copy the SSH and Git configuration files used for fetching and pushing the
Git repositories under `slave/.ssh` and `slave/.gitconfig`. This is usually
your own SSH and Git configuration files.

You need to use a public key without a passphrase and a `.gitconfig` file containing
the following sections:
```
[user]
name = YOUR_NAME
email = YOUR_EMAIL
[github]
token = YOUR_GITHUB_TOKEN
user = YOUR_GITHUB_NAME
```

* Run `rename.py` to match your topic name. Specify the Git user corresponding to
the confguration files used above. If you do not yet have
topic branches available on origin, use `develop` or one of the
Expand All @@ -71,9 +81,13 @@ The following instructions explain how to deploy a devspace on a Docker host.

Start and configure:

* Build devspace using `docker-compose`:

$ docker-compose -f docker-compose.yml build

* Start devspace using `docker-compose`:

$ docker-compose up -d
$ docker-compose -f docker-compose.yml up -d

By default, this will use the name of the directory as the project name. In the case of a shared Docker host, it is possible to override the project name using

Expand All @@ -85,6 +99,10 @@ Start and configure:

$ docker-compose -p my_project port nginxjenkins 443

* Create the `maven-internal` Nexus repository:

$ docker-compose exec nexus /nexus-data/createRepoMavenInternal.sh

* [Optional] Turn on Basic HTTP authentication for Jenkins

sudo htpasswd -c jenkins/conf.d/passwdfile nginx
Expand All @@ -94,10 +112,6 @@ Start and configure:
auth_basic "Restricted";
auth_basic_user_file /etc/nginx/conf.d/passwdfile;

* [Optional] Create the `maven-internal` Nexus repository:

$ docker-compose exec nexus /nexus-data/createRepoMavenInternal.sh


# GitHub OAuth

Expand All @@ -118,6 +132,8 @@ After the script has completed you can either leave it in place so it will overr

# Job configurations

* When running the OMERO-build job for the first time, select the ``PURGE_DATA`` option to create the database.

# Job workflow

The default deployment initializes a Jenkins server with a [predefined set of
Expand Down
8 changes: 4 additions & 4 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ services:
networks:
- omero-network
volumes:
- ./server:/home/omero
- ./server:/home/omero-server
environment:
- SLAVE_NAME=omero
- SLAVE_EXECUTORS=2
Expand All @@ -74,8 +74,8 @@ services:
networks:
- omero-network
volumes:
- ./web:/home/omero
- ./nginx/conf.d:/home/omero/nginx
- ./web:/home/omero-web
- ./nginx/conf.d:/home/omero-web/nginx
environment:
- SLAVE_NAME=web
- SLAVE_EXECUTORS=2
Expand All @@ -91,7 +91,7 @@ services:
- omero-network
volumes:
- ./nginx/conf.d:/etc/nginx/conf.d
- ./web/static:/home/omero/static
- ./web/static:/home/omero-web/static
- ./nginx/log:/var/log/nginx
- ./nginx/sslcert:/etc/nginx/ssl
environment:
Expand Down
2 changes: 1 addition & 1 deletion docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM openmicroscopy/devslave-c7:0.6.1
FROM openmicroscopy/devslave-c7:0.7.2

MAINTAINER OME

Expand Down
6 changes: 3 additions & 3 deletions home/config.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<disabledAdministrativeMonitors>
<string>jenkins.security.s2m.MasterKillSwitchWarning</string>
</disabledAdministrativeMonitors>
<version>2.150.3</version>
<version>2.319.2</version>
jburel marked this conversation as resolved.
Show resolved Hide resolved
<installStateName>RESTART</installStateName>
<numExecutors>0</numExecutors>
<mode>NORMAL</mode>
Expand All @@ -29,8 +29,8 @@
<properties>
<hudson.tools.InstallSourceProperty>
<installers>
<hudson.tools.JDKInstaller plugin="jdk-tool@1.2">
<id>jdk-8u192-oth-JPR</id>
<hudson.tools.JDKInstaller plugin="jdk-tool@1.5">
<id>jdk-8u221-oth-JPR</id>
<acceptLicense>true</acceptLicense>
</hudson.tools.JDKInstaller>
</installers>
Expand Down
4 changes: 4 additions & 0 deletions home/hudson.plugins.copyartifact.CopyArtifactConfigurat
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<?xml version='1.1' encoding='UTF-8'?>
<hudson.plugins.copyartifact.CopyArtifactConfiguration plugin="[email protected]">
<mode>PRODUCTION</mode>
</hudson.plugins.copyartifact.CopyArtifactConfiguration>
2 changes: 1 addition & 1 deletion home/hudson.plugins.git.GitTool.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version='1.1' encoding='UTF-8'?>
<hudson.plugins.git.GitTool_-DescriptorImpl plugin="git-client@2.7.2">
<hudson.plugins.git.GitTool_-DescriptorImpl plugin="git-client@3.11.0">
<installations class="hudson.plugins.git.GitTool-array">
<hudson.plugins.git.GitTool>
<name>Default</name>
Expand Down
4 changes: 4 additions & 0 deletions home/hudson.plugins.gradle.Gradle.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<?xml version='1.1' encoding='UTF-8'?>
<hudson.plugins.gradle.Gradle_-DescriptorImpl plugin="[email protected]">
<installations/>
</hudson.plugins.gradle.Gradle_-DescriptorImpl>
2 changes: 1 addition & 1 deletion home/hudson.tasks.Ant.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version='1.1' encoding='UTF-8'?>
<hudson.tasks.Ant_-DescriptorImpl plugin="ant@1.8">
<hudson.tasks.Ant_-DescriptorImpl plugin="ant@1.13">
<installations>
<hudson.tasks.Ant_-AntInstallation>
<name>Ant 1.9</name>
Expand Down
4 changes: 2 additions & 2 deletions home/jobs/BIOFORMATS-build/config.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version='1.1' encoding='UTF-8'?>
<matrix-project plugin="[email protected]">
<matrix-project>
<actions/>
<description></description>
<keepDependencies>false</keepDependencies>
Expand All @@ -22,7 +22,7 @@
</parameterDefinitions>
</hudson.model.ParametersDefinitionProperty>
</properties>
<scm class="hudson.plugins.git.GitSCM" plugin="[email protected]">
<scm class="hudson.plugins.git.GitSCM">
<configVersion>2</configVersion>
<userRemoteConfigs>
<hudson.plugins.git.UserRemoteConfig>
Expand Down
4 changes: 2 additions & 2 deletions home/jobs/BIOFORMATS-push/config.xml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
</parameterDefinitions>
</hudson.model.ParametersDefinitionProperty>
</properties>
<scm class="hudson.plugins.git.GitSCM" plugin="[email protected]">
<scm class="hudson.plugins.git.GitSCM">
<configVersion>2</configVersion>
<userRemoteConfigs>
<hudson.plugins.git.UserRemoteConfig>
Expand Down Expand Up @@ -123,7 +123,7 @@ foreach-get-version-as-property &gt; ${WORKSPACE}/target/version.properties</com
</builders>
<publishers>
<hudson.tasks.ArtifactArchiver>
<artifacts>target/version.tsv</artifacts>
<artifacts>target/version.tsv, target/version.properties</artifacts>
<allowEmptyArchive>false</allowEmptyArchive>
<onlyIfSuccessful>false</onlyIfSuccessful>
<fingerprint>false</fingerprint>
Expand Down
18 changes: 15 additions & 3 deletions home/jobs/OMERO-build/config.xml
Original file line number Diff line number Diff line change
Expand Up @@ -57,14 +57,26 @@
<triggers/>
<concurrentBuild>false</concurrentBuild>
<builders>
<hudson.plugins.copyartifact.CopyArtifact plugin="copyartifact">
<project>OMERO-python-superbuild-build</project>
<filter></filter>
<target></target>
<excludes></excludes>
<selector class="hudson.plugins.copyartifact.StatusBuildSelector"/>
<flatten>false</flatten>
<doNotFingerprintArtifacts>false</doNotFingerprintArtifacts>
</hudson.plugins.copyartifact.CopyArtifact>
<hudson.tasks.Shell>
<command>cd src
<command>
mv omero-scripts/dist/*.tar.gz .
cd src
export OMERO_BRANCH=$MERGE_PUSH_BRANCH

virtualenv $WORKSPACE/omero-virtualenv --system-site-packages

source $WORKSPACE/omero-virtualenv/bin/activate
pip install https://github.com/ome/zeroc-ice-py-centos7/releases/download/0.2.1/zeroc_ice-3.6.5-cp36-cp36m-linux_x86_64.whl
pip install -U setuptools &apos;omero-py&gt;=5.6.0.dev9&apos;
pip install -U setuptools omero-py
source docs/hudson/OMERO.sh
</command>
</hudson.tasks.Shell>
Expand Down
16 changes: 1 addition & 15 deletions home/jobs/OMERO-server/config.xml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ source $WORKSPACE/.venv3/bin/activate
pip install https://github.com/ome/zeroc-ice-py-centos7/releases/download/0.2.1/zeroc_ice-3.6.5-cp36-cp36m-linux_x86_64.whl
pip install -U pip future
pip install markdown
pip install reportlab # For figure
pip install &quot;reportlab<3.6&quot; # For figure
pip install omego
pip install tables
pip install jinja2
Expand Down Expand Up @@ -106,7 +106,6 @@ OMERO_DATA_DIR=$DATA_DIR

mkdir -p $OMERO_DATA_DIR

# UNZIP SERVER
OMERO_DIST=$WORKSPACE/OMERO.server
export OMERODIR=$OMERO_DIST

Expand All @@ -122,7 +121,6 @@ unzip $ZIP
rm -f $ZIP
mv $WORKSPACE/$DIST $OMERO_DIST

# INSTALL PYTHON PACKAGES
source $WORKSPACE/.venv3/bin/activate
pip install git+https://github.com/$SPACE_USER/omero-metadata.git@$MERGE_PUSH_BRANCH#egg=omero-metadata
pip install git+https://github.com/$SPACE_USER/omero-cli-render.git@$MERGE_PUSH_BRANCH#egg=omero-cli-render
Expand All @@ -132,12 +130,7 @@ for x in *.tar.gz; do
pip install -U $x # Install marshal, etc. *after* requirements
done

## LOAD CONFIG

# LOAD EXTRA CONFIG
#omero load configfile.omero

# DEFAULT CONFIG
omero config set omero.db.name $OMERO_DB_NAME
omero config set omero.db.host $OMERO_DB_HOST
omero config set omero.db.user $OMERO_DB_USER
Expand All @@ -147,10 +140,6 @@ omero config set omero.db.poolsize 25
omero config set omero.security.trustStore /etc/pki/ca-trust/extracted/java/cacerts
omero config set omero.security.trustStorePassword changeit
omero certificates
## END LOAD CONFIG


## PURGE

if [ &quot;$PURGE_DATA&quot; = &quot;true&quot; ]; then
createdb -h $OMERO_DB_HOST -U $OMERO_DB_USER $OMERO_DB_NAME
Expand All @@ -160,14 +149,11 @@ else
omego db -vvv upgrade --serverdir $OMERO_DIST --dbname $OMERO_DB_NAME
fi

## END PURGE

export LANG=&apos;en_US.UTF-8&apos;
export LANGUAGE=&apos;en_US:en&apos;
export LC_ALL=&apos;en_US.UTF-8&apos;
BUILD_ID=DONT_KILL_ME omero admin start

# WAIT FOR OMERO TO START UP AND ACCEPT CONNECTIONS
omero admin waitup
omero admin diagnostics

Expand Down
4 changes: 4 additions & 0 deletions home/org.jenkinsci.plugins.docker.commons.tools.DockerT
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<?xml version='1.1' encoding='UTF-8'?>
<org.jenkinsci.plugins.docker.commons.tools.DockerTool_-DescriptorImpl plugin="[email protected]">
<installations class="org.jenkinsci.plugins.docker.commons.tools.DockerTool-array"/>
</org.jenkinsci.plugins.docker.commons.tools.DockerTool_-DescriptorImpl>
4 changes: 4 additions & 0 deletions home/org.jenkinsci.plugins.gitclient.JGitApacheTool.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<?xml version='1.1' encoding='UTF-8'?>
<org.jenkinsci.plugins.gitclient.JGitApacheTool_-DescriptorImpl plugin="[email protected]">
<installations class="hudson.plugins.git.GitTool-array"/>
</org.jenkinsci.plugins.gitclient.JGitApacheTool_-DescriptorImpl>
2 changes: 1 addition & 1 deletion home/org.jenkinsci.plugins.gitclient.JGitTool.xml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?xml version='1.1' encoding='UTF-8'?>
<org.jenkinsci.plugins.gitclient.JGitTool_-DescriptorImpl plugin="git-client@2.7.2">
<org.jenkinsci.plugins.gitclient.JGitTool_-DescriptorImpl plugin="git-client@3.11.0">
<installations class="hudson.plugins.git.GitTool-array"/>
</org.jenkinsci.plugins.gitclient.JGitTool_-DescriptorImpl>
5 changes: 3 additions & 2 deletions jenkins/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
FROM jenkins/jenkins:2.150.3
FROM jenkins/jenkins:2.319.2-lts-jdk11
MAINTAINER OME

# Temp fix robot test results
ENV JAVA_OPTS "-Dhudson.model.DirectoryBrowserSupport.CSP="
ENV JAVA_OPTS "-Dhudson.model.DirectoryBrowserSupport.CSP=" -Djenkins.install.runSetupWizard=false

COPY plugins.txt /usr/share/jenkins/ref/plugins.txt

RUN /usr/local/bin/install-plugins.sh < /usr/share/jenkins/ref/plugins.txt

USER root
Expand Down
Loading