Skip to content

Commit 278e812

Browse files
authored
Merge pull request #408 from INCATools/odk.1.2.27
All changes for ODK 1.2.27 at once
2 parents b8028cd + e02c571 commit 278e812

18 files changed

+930
-208
lines changed

Changes.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,15 @@
1+
# v1.2.27 (4 April 2021)
2+
- revived odklite image with a minimum install (smaller in size than odkfull, with just robot and owltools!)
3+
- revived robot image with just robot installed
4+
- Added Jena 3.12.0 to odkfull image
5+
- Added module configs (see docs)
6+
- added a complete new documentation system for ontologies using mkdocs (see docs)
7+
- added OWL2 DL profile checking (see [here](tests/test-robot-validate-profile.yaml) for example)
8+
- Added sqlite3, dos2unix, and aha to odkfull image
9+
- Added a `use_custom_import_module` feature (see docs for example)
10+
- Added ability to add completely customised release artefacts (see Uberon repo for example)
11+
- Revised update mechanism. Please run the `make update_repo` *multiple times if you encounter problems and to ensure that all changes are picked up*.
12+
113
# v1.2.26 (10 February 2021): HOTFIXES
214
- Hotfixes:
315
- The new mireot module technique was buggy and is therefore removed again. Sorry; we will try again next time. You can still use the `custom` option to implement mireot yourself!

Dockerfile

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ RUN apt-get update &&\
3939
aha \
4040
dos2unix \
4141
sqlite3 \
42+
libjson-perl \
4243
xlsx2csv &&\
4344
cd /usr/local/bin \
4445
&& ln -s /usr/bin/python3 python \
@@ -94,6 +95,11 @@ ENV FASTOBO_VALIDATOR v0.4.0
9495
RUN wget https://dl.bintray.com/fastobo/fastobo-validator/$FASTOBO_VALIDATOR/fastobo_validator-x86_64-linux-musl.tar.gz -O- | tar xzC /tools \
9596
&& chmod +x /tools/fastobo-validator
9697

98+
###### JENA ######
99+
ENV JENA 3.12.0
100+
RUN wget http://archive.apache.org/dist/jena/binaries/apache-jena-$JENA.tar.gz -O- | tar xzC /tools
101+
ENV PATH "/tools/apache-jena-$JENA/bin:$PATH"
102+
97103
##### Ammonite #####
98104
# LAYERSIZE ~31MB
99105
RUN (echo "#!/usr/bin/env sh" \
@@ -139,6 +145,12 @@ RUN cd /tools/ && chmod +x /tools/obodash && git clone --depth 1 --branch docker
139145
# ls -l /tools/
140146
#RUN chmod +x /tools/droid
141147

148+
# ######
149+
# RUN cd /tools/ && git clone --depth 1 https://github.com/cmungall/blipkit.git && cd blipkit &&\
150+
# ./configure && make && make install && cd /tools/ && rm -rf blipkit
151+
# ENV PATH "/usr/local/bin:$PATH"
152+
153+
142154
### 5. Install ODK
143155
ARG ODK_VERSION=0.0.0
144156
ENV ODK_VERSION=${ODK_VERSION}
@@ -153,5 +165,6 @@ COPY template/ /tools/templates/
153165
RUN chmod +x /tools/*.py
154166
ENV LC_ALL=C.UTF-8
155167
ENV LANG=C.UTF-8
168+
RUN echo "PLEASE DONT FORGET TO UPDATE odklite (docker/odklite/Dockerfile) and robot (docker/robot/Dockerfile) images!"
156169

157170
CMD python /tools/odk.py

Makefile

Lines changed: 50 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -38,58 +38,83 @@ schema/project-schema.json:
3838
./odk/odk.py dump-schema > $@
3939

4040
# Building docker image
41-
VERSION = "v1.2.26"
41+
VERSION = "v1.2.27"
4242
IM=obolibrary/odkfull
43+
IMLITE=obolibrary/odklite
4344
DEV=obolibrary/odkdev
44-
ROBOT_JAR="https://build.obolibrary.io/job/ontodev/job/robot/job/cmd-metrics/6/artifact/bin/robot.jar"
45-
ROBOT_JAR_ARGS=
46-
#--build-arg ROBOT_JAR=$(ROBOT_JAR)
45+
ROB=obolibrary/robot
46+
#ROBOT_JAR="https://github.com/monarch-ebi-dev/odk_utils/raw/master/robot_maven_test.jar"
47+
ROBOT_JAR_ARGS=#--build-arg ROBOT_JAR=$(ROBOT_JAR)
4748

4849
docker-build-no-cache:
4950
@docker build --build-arg ODK_VERSION=$(VERSION) $(ROBOT_JAR_ARGS) --no-cache -t $(IM):$(VERSION) . \
50-
&& docker tag $(IM):$(VERSION) $(IM):latest
51+
&& docker tag $(IM):$(VERSION) $(IM):latest && docker tag $(IM):$(VERSION) $(DEV):latest && \
52+
docker build -f docker/odklite/Dockerfile -t $(IMLITE):$(VERSION) . \
53+
&& docker tag $(IMLITE):$(VERSION) $(IMLITE):latest && cd docker/robot/ && make docker-build
5154

5255
docker-build:
5356
@docker build --build-arg ODK_VERSION=$(VERSION) $(ROBOT_JAR_ARGS) -t $(IM):$(VERSION) . \
54-
&& docker tag $(IM):$(VERSION) $(IM):latest
55-
56-
docker-build-use-cache-dev:
57+
&& docker tag $(IM):$(VERSION) $(IM):latest && docker tag $(IM):$(VERSION) $(DEV):latest && \
58+
docker build -f docker/odklite/Dockerfile -t $(IMLITE):$(VERSION) . \
59+
&& docker tag $(IMLITE):$(VERSION) $(IMLITE):latest && cd docker/robot/ && make docker-build
60+
61+
docker-build-dev:
5762
@docker build --build-arg ODK_VERSION=$(VERSION) -t $(DEV):$(VERSION) . \
5863
&& docker tag $(DEV):$(VERSION) $(DEV):latest
5964

60-
docker-run:
61-
docker run --rm -ti --name odkfull $(IM)
62-
6365
docker-clean:
6466
docker kill $(IM) || echo not running ;
6567
docker rm $(IM) || echo not made
6668

67-
docker-publish-no-build:
68-
@docker push $(IM):$(VERSION) \
69-
&& docker push $(IM):latest
70-
71-
docker-publish-dev-no-build:
72-
@docker push $(DEV):$(VERSION) \
73-
&& docker push $(DEV):latest
74-
75-
docker-publish: docker-build
76-
@docker push $(IM):$(VERSION) \
77-
&& docker push $(IM):latest
69+
#### TESTING #####
7870

79-
docker-test: docker-build
71+
docker-test-full: docker-build
8072
docker images | grep odkfull &&\
8173
make test CMD=./seed-via-docker.sh
8274

75+
docker-test-dev: docker-build-dev
76+
docker images | grep odkdev &&\
77+
make test CMD=./seed-via-docker.sh
78+
79+
docker-test-lite: docker-build
80+
docker images | grep odklite &&\
81+
make test CMD=./seed-via-docker.sh
82+
83+
docker-test: docker-test-full docker-test-dev
84+
8385
docker-test-no-build:
8486
docker images | grep odkfull &&\
8587
make test CMD=./seed-via-docker.sh
8688

8789
docker-test-dev-no-build:
8890
docker images | grep odkdev &&\
8991
make test CMD=./seed-via-docker.sh
92+
93+
docker-test-lite-no-build:
94+
docker images | grep odklite &&\
95+
make test CMD=./seed-via-docker.sh
96+
97+
#### Publishing #####
98+
99+
docker-publish-no-build:
100+
@docker push $(DEV):$(VERSION) \
101+
&& docker push $(DEV):latest \
102+
&& docker push $(IMLITE):latest \
103+
&& docker push $(IMLITE):$(VERSION) \
104+
&& docker push $(IM):latest \
105+
&& docker push $(IM):$(VERSION)
106+
107+
docker-publish: docker-build
108+
@docker push $(DEV):$(VERSION) \
109+
&& docker push $(DEV):latest \
110+
&& docker push $(IMLITE):latest \
111+
&& docker push $(IMLITE):$(VERSION) \
112+
&& docker push $(IM):latest \
113+
&& docker push $(IM):$(VERSION)
90114

91-
docker-publish-all: docker-publish
92-
(cd docker/osklite && make publish VERSION=$(VERSION))
115+
docker-publish-dev-no-build:
116+
@docker push $(DEV):$(VERSION) \
117+
&& docker push $(DEV):latest
93118

94119
clean-tests:
95120
rm -rf target/*

docker/odklite/Dockerfile

Lines changed: 58 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,66 @@
1-
FROM openjdk:8-jdk-alpine
2-
MAINTAINER Chris Mungall <[email protected]>
3-
4-
RUN apk add --update make
1+
### From https://stackoverflow.com/questions/51121875/how-to-run-docker-with-python-and-java
2+
### 1. Get Linux
3+
FROM ubuntu:18.04
4+
LABEL maintainer="[email protected]"
55

6+
### 2. Get Java, Python and all required system libraries (version control etc)
7+
ENV JAVA_HOME="/usr"
68
WORKDIR /tools
9+
ENV PATH "/tools/:$PATH"
10+
COPY requirements.txt.lite /tools/requirements.txt
11+
COPY odk/make-release-assets.py /tools/
712

13+
#ENV JAVA_HOME /usr/lib/jvm/java-8-oracle
14+
# LAYERSIZE ~1000MB
15+
RUN apt-get update &&\
16+
apt-get install -y software-properties-common &&\
17+
apt-get upgrade -y &&\
18+
apt-get install -y build-essential \
19+
git \
20+
openjdk-8-jre \
21+
make \
22+
unzip \
23+
rsync \
24+
curl \
25+
jq \
26+
openssl
27+
28+
###### owltools & OORT ######
829
# For now we get these from jenkins builds, but these should be obtained
930
# by composing existing Dockerfiles, or by obtaining directly from maven
10-
RUN wget http://build.berkeleybop.org/job/robot/lastSuccessfulBuild/artifact/bin/robot -O /tools/robot
11-
RUN wget http://build.berkeleybop.org/job/robot/lastSuccessfulBuild/artifact/bin/robot.jar -O /tools/robot.jar
12-
RUN chmod +x /tools/*
13-
ENV PATH "/tools/:$PATH"
31+
ENV OWLTOOLS 2020-04-06
32+
RUN curl -L https://github.com/owlcollab/owltools/releases/download/$OWLTOOLS/owltools -o /tools/owltools && \
33+
curl -L https://github.com/owlcollab/owltools/releases/download/$OWLTOOLS/ontology-release-runner -o /tools/ontology-release-runner && \
34+
curl -L https://github.com/owlcollab/owltools/releases/download/$OWLTOOLS/owltools-oort-all.jar -o /tools/owltools-oort-all.jar && \
35+
chmod +x /tools/owltools && \
36+
chmod +x /tools/ontology-release-runner && \
37+
chmod +x /tools/owltools-oort-all.jar
38+
39+
###### ROBOT ######
40+
ENV ROBOT v1.8.1
41+
ARG ROBOT_JAR=https://github.com/ontodev/robot/releases/download/$ROBOT/robot.jar
42+
ENV ROBOT_JAR ${ROBOT_JAR}
43+
44+
# LAYERSIZE ~66MB
45+
RUN curl -L $ROBOT_JAR -o /tools/robot.jar &&\
46+
curl -L https://raw.githubusercontent.com/ontodev/robot/$ROBOT/bin/robot -o /tools/robot && \
47+
chmod +x /tools/robot && \
48+
chmod +x /tools/robot.jar
49+
50+
### 5. Install ODK
51+
ARG ODK_VERSION=0.0.0
52+
ENV ODK_VERSION=${ODK_VERSION}
1453

15-
# Setup dosdp tools
16-
ENV V=0.10.1
17-
RUN wget -nv https://github.com/INCATools/dosdp-tools/releases/download/v$V/dosdp-tools-$V.tgz
18-
RUN tar -zxvf dosdp-tools-$V.tgz && mv dosdp-tools-$V /tools/dosdp-tools
19-
ENV PATH "/tools/dosdp-tools/bin:$PATH"
54+
### TODO REVIEW THIS. As we speak, jq is official still stalled at 1.5, but for the walk function, we
55+
### Need 1.6 - once 1.6 is offcial, the following RUN can be removed.
56+
# LAYERSIZE: ~4MB
57+
RUN curl -L https://github.com/stedolan/jq/releases/download/jq-1.6/jq-linux64 -o /tools/jq && chmod +x /tools/jq
2058

21-
CMD make -h
59+
COPY odk/odk.py /tools/
60+
COPY template/ /tools/templates/
61+
RUN chmod +x /tools/*.py
62+
ENV LC_ALL=C.UTF-8
63+
ENV LANG=C.UTF-8
64+
RUN echo "Keep me in sync with obolibrary/odkfull!"
2265

66+
CMD python /tools/odk.py

docker/odklite/Makefile

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,19 @@
11

22
# Building docker image
3-
VERSION = "v1.1.7"
3+
VERSION = "v1.2.27"
44
IM=obolibrary/odklite
55

66
build:
77
@docker build -t $(IM):$(VERSION) . \
88
&& docker tag $(IM):$(VERSION) $(IM):latest
99

10-
run:
11-
docker run --rm -ti --name odklite $(IM)
10+
docker-build-no-cache:
11+
@docker build --build-arg ODK_VERSION=$(VERSION) --no-cache -t $(IM):$(VERSION) . \
12+
&& docker tag $(IM):$(VERSION) $(IM):latest
13+
14+
docker-build:
15+
@docker build --build-arg ODK_VERSION=$(VERSION) -t $(IM):$(VERSION) . \
16+
&& docker tag $(IM):$(VERSION) $(IM):latest
1217

1318
publish: build
1419
@docker push $(IM):$(VERSION) \

docker/robot/Dockerfile

Lines changed: 15 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,24 @@
1-
FROM openjdk:8-jre-alpine3.9
2-
MAINTAINER Chris Mungall <[email protected]>
3-
4-
RUN apk add --no-cache make bash
1+
FROM openjdk:8-slim
2+
LABEL maintainer="[email protected]"
53

64
WORKDIR /tools
75

8-
ENV ROBOT v1.5.0
6+
ENV ROBOT v1.8.1
97
ARG ROBOT_JAR=https://github.com/ontodev/robot/releases/download/$ROBOT/robot.jar
108
ENV ROBOT_JAR ${ROBOT_JAR}
119

12-
RUN wget $ROBOT_JAR -O /tools/robot.jar && \
13-
wget https://raw.githubusercontent.com/ontodev/robot/$ROBOT/bin/robot -O /tools/robot && \
14-
chmod +x /tools/*
10+
RUN apt-get update &&\
11+
apt-get upgrade -y &&\
12+
apt-get install -y make \
13+
unzip \
14+
rsync \
15+
curl
16+
17+
RUN curl -L $ROBOT_JAR -o /tools/robot.jar &&\
18+
curl -L https://raw.githubusercontent.com/ontodev/robot/$ROBOT/bin/robot -o /tools/robot && \
19+
chmod +x /tools/robot && \
20+
chmod +x /tools/robot.jar
1521

1622
ENV PATH "/tools/:$PATH"
23+
RUN echo "Keep me in sync with obolibrary/odkfull!"
1724
CMD robot -h

docker/robot/Makefile

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,12 @@
11

22
# Building docker image
3-
VERSION = "v1.5.0"
3+
VERSION = "v1.8.1"
44
IM=obolibrary/robot
55

6-
build:
6+
docker-build:
77
@docker build -t $(IM):$(VERSION) . \
88
&& docker tag $(IM):$(VERSION) $(IM):latest
99

10-
run:
11-
docker run --rm -ti --name robot $(IM)
12-
1310
clean:
1411
docker kill $(IM) || echo not running ;
1512
docker rm $(IM) || echo not made

docker/testdocker/Dockerfile

Lines changed: 0 additions & 17 deletions
This file was deleted.

0 commit comments

Comments
 (0)