Skip to content

Commit ac0f8a7

Browse files
committed
Merge branch 'master' of github.com:InformaticsMatters/pipelines
2 parents 33913d6 + 26465bc commit ac0f8a7

File tree

4 files changed

+68
-1
lines changed

4 files changed

+68
-1
lines changed

Dockerfile-sdloader

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
FROM busybox
22
MAINTAINER Tim Dudgeon <[email protected]>
33

4-
# An image to populate a Service Descriptor desitination directory
4+
# An image to populate a Service Descriptor destination directory
55
# (SD_DST), which is normally mounted when the image is run,
66
# with built-in Service Descriptor files from a source directory (SD_SRC).
77

Dockerfile-sdposter

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
FROM centos
2+
MAINTAINER Tim Dudgeon <[email protected]>
3+
4+
# An image to populate the Core with the contents of the
5+
# Service Descriptors located in SD_SRC.
6+
7+
ENV SD_SRC /sd-src
8+
WORKDIR ${SD_SRC}
9+
10+
# Copy all potential Service Descriptors into the image...
11+
COPY src/python/ ${SD_SRC}/src/python/
12+
COPY src/nextflow/ ${SD_SRC}/src/nextflow/
13+
COPY post-service-descriptors.sh ${SD_SRC}/
14+
RUN chmod 755 post-service-descriptors.sh
15+
16+
# On execution copy files from source to destination...
17+
CMD ./post-service-descriptors.sh

build.gradle

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,10 +92,19 @@ task buildSdLoaderDockerImage(type: DockerBuildImage) {
9292
tag = "informaticsmatters/rdkit_${pipeline}-sdloader:latest"
9393
}
9494

95+
task buildSdPosterDockerImage(type: DockerBuildImage) {
96+
description 'Builds the pipelines SD-poster Docker image'
97+
98+
dockerFile = file('Dockerfile-sdposter')
99+
inputDir = file('.')
100+
tag = "informaticsmatters/rdkit_${pipeline}-sdposter:latest"
101+
}
102+
95103
task buildDockerImages() {
96104
dependsOn buildPliImage // that one depends on buildPipelinesImage
97105
dependsOn buildSmogImage // and so does this one
98106
dependsOn buildSdLoaderDockerImage
107+
dependsOn buildSdPosterDockerImage
99108

100109
group 'Docker'
101110
description 'Builds all the project Docker images'

post-service-descriptors.sh

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
#!/usr/bin/env bash
2+
3+
set -e
4+
5+
POST=${1:-http://coreservices:8080/coreservices/rest/v1/services}
6+
BASE_D='docker://github.com/InformaticsMatters/pipelines'
7+
BASE_N='nextflow://github.com/InformaticsMatters/pipelines'
8+
CT_DJ="application/x-squonk-service-descriptor-docker+json"
9+
CT_MM="multipart/mixed"
10+
11+
12+
for d in 'src/python/pipelines/dmpk' 'src/python/pipelines/docking' 'src/python/pipelines/rdkit'
13+
do
14+
for file in $d/*.dsd.json
15+
do
16+
echo $file
17+
curl -X POST \
18+
-T $file\
19+
-H "Content-Type: $CT_DJ"\
20+
-H "Base-URL: $BASE_D"\
21+
$POST
22+
echo ""
23+
done
24+
done
25+
26+
for d in 'src/nextflow/docking' 'src/nextflow/rdkit'
27+
do
28+
for file in $d/*.nsd.yml
29+
do
30+
basename=${file::-4}
31+
echo $basename
32+
curl -X POST \
33+
-F "nextflow.nsd.yml=@${basename}.yml;type=application/x-squonk-service-descriptor-nextflow+yaml;filename=nextflow.nsd.yml"\
34+
-F "nextflow.nf=@${basename}.nf;type=text/plain;filename=nextflow.nf"\
35+
-F "nextflow.config=@${basename}.config;type=text/plain;filename=nextflow.config"\
36+
-H "Content-Type: $CT_MM"\
37+
-H "Base-URL: $BASE_N"\
38+
$POST
39+
echo ""
40+
done
41+
done

0 commit comments

Comments
 (0)