Skip to content

Commit 3ee4ad2

Browse files
committed
merge changes
2 parents 5776b62 + 0aeafd0 commit 3ee4ad2

File tree

6 files changed

+135
-17
lines changed

6 files changed

+135
-17
lines changed

.github/workflows/build-latest.yaml

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,38 @@
11
---
22
name: build and push latest
33

4+
# -----------------
5+
# Control variables (GitHub Secrets)
6+
# -----------------
7+
#
8+
# At the GitHub 'organisation' or 'project' level you must have the following
9+
# GitHub 'Repository Secrets' defined (i.e. via 'Settings -> Secrets'): -
10+
#
11+
# DOCKERHUB_USERNAME
12+
# DOCKERHUB_TOKEN
13+
#
14+
# ------------
15+
# Environments (GitHub Environments)
16+
# ------------
17+
#
18+
# Environment awx/im-main
19+
#
20+
# For automated deployment we expect the following in the environment: -
21+
#
22+
# AWX_HOST The fully-qualified URL to AWX.
23+
# If not set, AWX triggering does not take place.
24+
# AWX_USER The username of someone that can execute the AWX Job.
25+
# AWX_USER_PASSWORD The user's password.
26+
#
27+
# Environment awx/dls-dev
28+
#
29+
# For automated deployment we expect the following in the environment: -
30+
#
31+
# AWX_HOST The fully-qualified URL to AWX.
32+
# If not set, AWX triggering does not take place.
33+
# AWX_USER The username of someone that can execute the AWX Job.
34+
# AWX_USER_PASSWORD The user's password.
35+
436
on:
537
push:
638
branches:
@@ -31,3 +63,35 @@ jobs:
3163
run: |
3264
docker push squonk/fragnet-depict:latest
3365
docker push squonk/fragnet-search:latest
66+
67+
# Deploy 'Depict'
68+
# (to the AWX/im-main Environment)
69+
trigger-awx-depict:
70+
needs: build-and-push-latest
71+
runs-on: ubuntu-latest
72+
environment: awx/im-main
73+
steps:
74+
- uses: informaticsmatters/trigger-awx-action@v1
75+
with:
76+
template: FragnetDepict -staging-
77+
template-host: ${{ secrets.AWX_HOST }}
78+
template-user: ${{ secrets.AWX_USER }}
79+
template-user-password: ${{ secrets.AWX_USER_PASSWORD }}
80+
template-var: fs_image_tag
81+
template-var-value: latest
82+
83+
# Deploy 'Search API'
84+
# (to the AWX/DLS Development Environment)
85+
trigger-awx-search:
86+
needs: build-and-push-latest
87+
runs-on: ubuntu-latest
88+
environment: awx/dls-dev
89+
steps:
90+
- uses: informaticsmatters/trigger-awx-action@v1
91+
with:
92+
template: FragnetSearch API -staging-
93+
template-host: ${{ secrets.AWX_HOST }}
94+
template-user: ${{ secrets.AWX_USER }}
95+
template-user-password: ${{ secrets.AWX_USER_PASSWORD }}
96+
template-var: fs_image_tag
97+
template-var-value: latest

.github/workflows/build-stable.yaml

Lines changed: 23 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,35 @@
22
name: build and push stable
33

44
# Actions for an 'official' tag.
5-
6-
# An official tag is a 3-digit value (i.e. 'N.N.N').
5+
#
6+
# An official tag is a 2 or 3-digit value (i.e. 'N.N[.N]').
77
# We publish images using the tag as a tag and one using 'stable' as s tag.
88

9+
# -----------------
10+
# Control variables (GitHub Secrets)
11+
# -----------------
12+
#
13+
# At the GitHub 'organisation' or 'project' level you must have the following
14+
# GitHub 'Repository Secrets' defined (i.e. via 'Settings -> Secrets'): -
15+
#
16+
# DOCKERHUB_USERNAME
17+
# DOCKERHUB_TOKEN
18+
#
19+
# -----------
20+
# Environment (GitHub Environments)
21+
# -----------
22+
#
23+
# Environment (none)
24+
#
25+
# For automated deployment we expect the following in the environment: -
26+
#
27+
# (none)
28+
929
on:
1030
push:
1131
tags:
1232
- '[0-9]+.[0-9]+.[0-9]+'
33+
- '[0-9]+.[0-9]+'
1334

1435
jobs:
1536
push-stable:

.github/workflows/build-tag.yaml

Lines changed: 23 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,35 @@
22
name: build and push tag
33

44
# Actions for any 'unofficial' tag.
5+
#
6+
# It's not an official tag if it's not formed from 2 or 3 digits
7+
# (i.e. is not 'N.N[.N]'). We publish images using the tag as a tag.
58

6-
# It's not an official tag if it's not formed from three digits
7-
# (i.e. is not 'N.N.N').
8-
# We publish images using the tag as a tag.
9+
# -----------------
10+
# Control variables (GitHub Secrets)
11+
# -----------------
12+
#
13+
# At the GitHub 'organisation' or 'project' level you must have the following
14+
# GitHub 'Repository Secrets' defined (i.e. via 'Settings -> Secrets'): -
15+
#
16+
# DOCKERHUB_USERNAME
17+
# DOCKERHUB_TOKEN
18+
#
19+
# -----------
20+
# Environment (GitHub Environments)
21+
# -----------
22+
#
23+
# Environment (none)
24+
#
25+
# For automated deployment we expect the following in the environment: -
26+
#
27+
# (none)
928

1029
on:
1130
push:
1231
tags:
1332
- '**'
33+
- '![0-9]+.[0-9]+'
1434
- '![0-9]+.[0-9]+.[0-9]+'
1535

1636
jobs:

.github/workflows/build.yaml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,21 @@ name: build
66
# Here we build container images but don't push them
77
# and therefore do not require docker credentials.
88

9+
# -----------------
10+
# Control variables (GitHub Secrets)
11+
# -----------------
12+
#
13+
# At the GitHub 'organisation' or 'project' level you must have the following
14+
# GitHub 'Repository Secrets' defined (i.e. via 'Settings -> Secrets'): -
15+
#
16+
# (none)
17+
#
18+
# -----------
19+
# Environment (GitHub Environments)
20+
# -----------
21+
#
22+
# Environment (none)
23+
924
on:
1025
push:
1126
branches-ignore:

README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ For more information see:
2626

2727
* [Talk at 2018 RDKit UGM](https://github.com/rdkit/UGM_2018/blob/master/Lightning/tim_dudgeon_fragment-network.pdf).
2828
* [Informatics Matters website](https://www.informaticsmatters.com/pages/fragment_network.html)
29+
* [Fragnet Search application](https://fragnet.informaticsmatters.com/)
2930

3031
## Building (CI)
3132
The project containers are built automatically using GitHub Actions
@@ -45,9 +46,9 @@ web app.
4546
Test the container using the [docker-compose.yml](docker-compose.yml)
4647
file:
4748

48-
docker-compose -f docker-compose-test.yml up
49+
docker-compose up
4950

50-
This uses a sample Neo4j database with a small amount of data.
51+
This uses a sample Neo4j database with a small amount of data. It takes a short time to initialise.
5152

5253
## Official deployments
5354
Official deployments (to Kubernetes) use AWX and our [fragnet-ansible]

fragnet-search/build.gradle

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -118,30 +118,27 @@ test {
118118
tasks.test.dependsOn("startNeoContainer")
119119
tasks.test.finalizedBy("stopNeoContainer")
120120

121-
task copyKeycloakJars(type: Copy) {
122-
from "../lib/keycloak-2.1.0-jars-tomcat8"
123-
into "build/libs/keycloak-2.1.0-jars-tomcat8/"
124-
include "*.jar"
125-
}
126121

127122
task buildDockerFile(type: Dockerfile) {
128123

129124
dependsOn = [
130-
war,
131-
copyKeycloakJars
125+
war
132126
]
133127

134128
destFile = project.file('build/Dockerfile')
135129
from "informaticsmatters/rdkit-tomcat-debian:Release_2020_09"
136130
label(['maintainer': 'Tim Dudgeon "[email protected]"'])
137131

138132
// include the keycloak adapters
139-
runCommand('''mkdir keycloak && cd keycloak && curl -s -o keycloak.tar.gz\
140-
https://downloads.jboss.org/keycloak/3.4.3.Final/adapters/keycloak-oidc/keycloak-tomcat8-adapter-dist-3.4.3.Final.tar.gz &&\
133+
runCommand('''mkdir keycloak &&\
134+
cd keycloak &&\
135+
curl -s -o keycloak.tar.gz\
136+
https://downloads.jboss.org/keycloak/10.0.2/adapters/keycloak-oidc/keycloak-tomcat-adapter-dist-10.0.2.tar.gz &&\
141137
tar xfz keycloak.tar.gz &&\
142138
rm keycloak.tar.gz &&\
143139
mv *.jar $CATALINA_HOME/lib &&\
144-
cd $CATALINA_HOME && rm -rf keycloak''')
140+
cd $CATALINA_HOME &&\
141+
rm -rf keycloak''')
145142

146143
addFile('./libs/fragnet-search*.war', "/usr/local/tomcat/webapps/")
147144
// need to unpack the zip as we need to mess with the keycloak related jars

0 commit comments

Comments
 (0)